Ignore:
Timestamp:
Nov 11, 2009 4:07:27 PM (7 years ago)
Author:
nicklas
Message:

removed all void-functions and replaced with integer, as a start.
Makes better error handling possible

File:
1 edited

Legend:

Unmodified
Added
Removed
  • spike/nicklas/distcalc/liblwgeom/measures.h

    r4782 r4792  
    5757int lw_dist2d_recursive(uchar *lw,W_BBOX flatlist[], int j );
    5858int struct_cmp_by_dist(const void *a, const void *b);
    59 void lw_dist2d_bboxdist2(BBOXDIST bblist[],int cursor,DISTPTS *dl);
    60 void lw_dist2d_check_overlap(W_BBOX *geom1,W_BBOX *geom2,DISTPTS *dl);
    61 void lw_dist2d_bboxdist1(uchar *lw1, uchar *lw2, DISTPTS *dl);
     59int lw_dist2d_bboxdist2(BBOXDIST bblist[],int cursor,DISTPTS *dl);
     60int lw_dist2d_check_overlap(W_BBOX *geom1,W_BBOX *geom2,DISTPTS *dl);
     61int lw_dist2d_bboxdist1(uchar *lw1, uchar *lw2, DISTPTS *dl);
    6262int lw_dist2d_number_of_geom(uchar *lw, int j );
    63 void lw_dist2d_distribute(W_BBOX *geom1,W_BBOX *geom2,DISTPTS *dl);
    64 void lw_dist2d_comp2(uchar *lw1, uchar *lw2, DISTPTS *dl);
    65 void lw_dist2d_comp(uchar *lw1, uchar *lw2, DISTPTS *dl);
     63int lw_dist2d_distribute(W_BBOX *geom1,W_BBOX *geom2,DISTPTS *dl);
     64int lw_dist2d_comp2(uchar *lw1, uchar *lw2, DISTPTS *dl);
     65int lw_dist2d_comp(uchar *lw1, uchar *lw2, DISTPTS *dl);
    6666
    6767/*
     
    6969*/
    7070
    71 void lw_dist2d_seg_seg(POINT2D *A, POINT2D *B, POINT2D *C, POINT2D *D, DISTPTS *dl);
    72 void lw_dist2d_pt_ptarray(POINT2D *p, POINTARRAY *pa, DISTPTS *dl);
    73 void lw_dist2d_ptarray_ptarray(POINTARRAY *l1, POINTARRAY *l2, DISTPTS *dl);
    74 void lw_dist2d_ptarray_poly(POINTARRAY *pa, LWPOLY *poly, DISTPTS *dl);
    75 void lw_dist2d_point_point(LWPOINT *point1, LWPOINT *point2, DISTPTS *dl);
    76 void lw_dist2d_point_line(LWPOINT *point, LWLINE *line, DISTPTS *dl);
    77 void lw_dist2d_line_line(LWLINE *line1, LWLINE *line2, DISTPTS *dl);
    78 void lw_dist2d_point_poly(LWPOINT *point, LWPOLY *poly, DISTPTS *dl);
    79 void lw_dist2d_poly_poly(LWPOLY *poly1, LWPOLY *poly2, DISTPTS *dl);
    80 void lw_dist2d_line_poly(LWLINE *line, LWPOLY *poly, DISTPTS *dl);
     71int lw_dist2d_seg_seg(POINT2D *A, POINT2D *B, POINT2D *C, POINT2D *D, DISTPTS *dl);
     72int lw_dist2d_pt_ptarray(POINT2D *p, POINTARRAY *pa, DISTPTS *dl);
     73int lw_dist2d_ptarray_ptarray(POINTARRAY *l1, POINTARRAY *l2, DISTPTS *dl);
     74int lw_dist2d_ptarray_poly(POINTARRAY *pa, LWPOLY *poly, DISTPTS *dl);
     75int lw_dist2d_point_point(LWPOINT *point1, LWPOINT *point2, DISTPTS *dl);
     76int lw_dist2d_point_line(LWPOINT *point, LWLINE *line, DISTPTS *dl);
     77int lw_dist2d_line_line(LWLINE *line1, LWLINE *line2, DISTPTS *dl);
     78int lw_dist2d_point_poly(LWPOINT *point, LWPOLY *poly, DISTPTS *dl);
     79int lw_dist2d_poly_poly(LWPOLY *poly1, LWPOLY *poly2, DISTPTS *dl);
     80int lw_dist2d_line_poly(LWLINE *line, LWPOLY *poly, DISTPTS *dl);
    8181/*
    8282New faster distance calculations
    8383*/
    8484
    85 void lw_dist2d_pre_seg_seg(POINTARRAY *l1, POINTARRAY *l2,LISTSTRUCT *list1, LISTSTRUCT *list2,double k, DISTPTS *dl);
    86 void lw_dist2d_selected_seg_seg(POINT2D *A, POINT2D *B, POINT2D *C, POINT2D *D, DISTPTS *dl);
     85int lw_dist2d_pre_seg_seg(POINTARRAY *l1, POINTARRAY *l2,LISTSTRUCT *list1, LISTSTRUCT *list2,double k, DISTPTS *dl);
     86int lw_dist2d_selected_seg_seg(POINT2D *A, POINT2D *B, POINT2D *C, POINT2D *D, DISTPTS *dl);
    8787int struct_cmp_by_measure(const void *a, const void *b);
    88 void lw_dist2d_fast_ptarray_ptarray(POINTARRAY *l1,POINTARRAY *l2, DISTPTS *dl, POINT2D *c1, POINT2D *c2);
     88int lw_dist2d_fast_ptarray_ptarray(POINTARRAY *l1,POINTARRAY *l2, DISTPTS *dl, POINT2D *c1, POINT2D *c2);
    8989/*
    9090Functions in common for Brute force and new calculation
    9191*/
    92 void lw_dist2d_pt_pt(POINT2D *p1, POINT2D *p2, DISTPTS *dl);
    93 void lw_dist2d_pt_seg(POINT2D *p, POINT2D *A, POINT2D *B, DISTPTS *dl);
     92int lw_dist2d_pt_pt(POINT2D *p1, POINT2D *p2, DISTPTS *dl);
     93int lw_dist2d_pt_seg(POINT2D *p, POINT2D *A, POINT2D *B, DISTPTS *dl);
Note: See TracChangeset for help on using the changeset viewer.