i have written a code using c programming in Xlib interface where i calculate the shortest distance between two mouse clicks having line segment obstacles. I wanted to know where is the mistake in my logic.