41 |
|
|
42 |
|
#define LATLONSTR "LATLONG=" |
43 |
|
#define LLATLONSTR 8 |
44 |
< |
#define islatlon(hl) (!strncmp(hl,LATLONSTR,LLATLONSTR)) |
45 |
< |
#define latlonval(ll,hl) sscanf((hl)+LLATLONSTR, "%f %f", \ |
46 |
< |
&(ll)[0],&(ll)[1]) |
44 |
> |
#define islatlon(hl) !strncmp(hl,LATLONSTR,LLATLONSTR) |
45 |
> |
#define latlonval(ll,hl) (sscanf((hl)+LLATLONSTR, "%f %f", \ |
46 |
> |
&(ll)[0],&(ll)[1]) == 2) |
47 |
|
#define fputlatlon(lat,lon,fp) fprintf(fp,"%s %.6f %.6f\n",LATLONSTR,lat,lon) |
48 |
|
/* defined in header.c */ |
49 |
|
extern void newheader(const char *t, FILE *fp); |
112 |
|
extern void freestr(char *s); |
113 |
|
extern int shash(const char *s); |
114 |
|
/* defined in savqstr.c */ |
115 |
< |
extern char *savqstr(char *s); |
115 |
> |
extern char *savqstr(const char *s); |
116 |
|
extern void freeqstr(char *s); |
117 |
|
/* defined in wordfile.c */ |
118 |
|
extern int wordfile(char **words, int nargs, char *fname); |
136 |
|
#ifndef strlcpy /* defined in option strlcpy.c */ |
137 |
|
extern size_t strlcpy(char *dst, const char *src, size_t siz); |
138 |
|
extern size_t strlcat(char *dst, const char *src, size_t siz); |
139 |
+ |
#endif |
140 |
+ |
#ifndef strncasecmp /* defined in option strncasecmp.c */ |
141 |
+ |
extern int strncasecmp(const char *s1, const char *s2, size_t n); |
142 |
+ |
#endif |
143 |
+ |
#ifndef strnstr /* defined in option strnstr.c */ |
144 |
+ |
extern char * strnstr(const char *haystack, |
145 |
+ |
const char *needle, size_t len); |
146 |
|
#endif |
147 |
|
|
148 |
|
#ifdef __cplusplus |