Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit21d1e47

Browse files
author
Thomas G. Lockhart
committed
Some old cleanup fixes for close_ps() from G. Thaker.
1 parent6912bee commit21d1e47

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

‎src/backend/utils/adt/geo_ops.c

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
*
88
*
99
* IDENTIFICATION
10-
* $Header: /cvsroot/pgsql/src/backend/utils/adt/geo_ops.c,v 1.33 1998/06/1519:29:34 momjian Exp $
10+
* $Header: /cvsroot/pgsql/src/backend/utils/adt/geo_ops.c,v 1.34 1998/08/1506:45:10 thomas Exp $
1111
*
1212
*-------------------------------------------------------------------------
1313
*/
@@ -768,6 +768,7 @@ box_diagonal(BOX *box)
768768
**
769769
***********************************************************************/
770770

771+
#defineLINEDEBUG
771772
LINE*
772773
line_in(char*str)
773774
{
@@ -801,6 +802,7 @@ char *
801802
line_out(LINE*line)
802803
{
803804
char*result;
805+
LSEGlseg;
804806

805807
if (!PointerIsValid(line))
806808
return (NULL);
@@ -2340,7 +2342,7 @@ close_pl(Point *pt, LINE *line)
23402342
*
23412343
* Some tricky code here, relying on boolean expressions
23422344
*evaluating to only zero or one to use as an array index.
2343-
* bug fixes by gthaker@atl.lmco.com; May 1,98
2345+
* bug fixes by gthaker@atl.lmco.com; May 1,1998
23442346
*/
23452347
Point*
23462348
close_ps(Point*pt,LSEG*lseg)
@@ -2351,9 +2353,10 @@ close_ps(Point *pt, LSEG *lseg)
23512353
intxh,
23522354
yh;
23532355

2354-
2355-
/* fprintf(stderr,"close_sp:pt->x %f pt->y %f\nlseg(0).x %f lseg(0).y %f lseg(1).x %f lseg(1).y %f\n", */
2356-
/* pt->x, pt->y, lseg->p[0].x, lseg->p[0].y, lseg->p[1].x, lseg->p[1].y); */
2356+
#ifdefGEODEBUG
2357+
printf("close_sp:pt->x %f pt->y %f\nlseg(0).x %f lseg(0).y %f lseg(1).x %f lseg(1).y %f\n",
2358+
pt->x,pt->y,lseg->p[0].x,lseg->p[0].y,lseg->p[1].x,lseg->p[1].y);
2359+
#endif
23572360

23582361
result=NULL;
23592362
xh=lseg->p[0].x<lseg->p[1].x;
@@ -2411,7 +2414,6 @@ close_ps(Point *pt, LSEG *lseg)
24112414
if (pt->y< (tmp->A*pt->x+tmp->C)) {/* we are below the lower edge */
24122415
result=point_copy(&lseg->p[!yh]);/* below the lseg, take lower end pt */
24132416
/* fprintf(stderr,"below: tmp A %f B %f C %f m %f\n",tmp->A,tmp->B,tmp->C, tmp->m); */
2414-
24152417
returnresult;
24162418
}
24172419
tmp=line_construct_pm(&lseg->p[yh],invm);/* upper edge of the "band" */
@@ -2430,6 +2432,7 @@ close_ps(Point *pt, LSEG *lseg)
24302432
return (result);
24312433
}/* close_ps() */
24322434

2435+
24332436
/* close_lseg()
24342437
* Closest point to l1 on l2.
24352438
*/

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp