17 |
|
#undef getchar |
18 |
|
#undef putc |
19 |
|
#undef putchar |
20 |
– |
#undef feof |
21 |
– |
#undef ferror |
20 |
|
#define getc getc_unlocked |
21 |
|
#define getchar getchar_unlocked |
22 |
|
#define putc putc_unlocked |
23 |
|
#define putchar putchar_unlocked |
24 |
|
#ifndef __cplusplus |
25 |
+ |
#undef feof |
26 |
+ |
#undef ferror |
27 |
|
#define feof feof_unlocked |
28 |
|
#define ferror ferror_unlocked |
29 |
|
#endif |
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); |
65 |
|
/* defined in fltdepth.c */ |
66 |
|
extern int open_float_depth(const char *fname, long expected_length); |
67 |
|
/* defined in badarg.c */ |
68 |
< |
extern int badarg(int ac, char **av, char *fl); |
68 |
> |
extern int badarg(int ac, char **av, const char *fl); |
69 |
|
/* defined in expandarg.c */ |
70 |
|
extern int envexpchr, filexpchr; |
71 |
|
extern int expandarg(int *acp, char ***avp, int n); |
72 |
|
/* defined in fdate.c */ |
73 |
< |
extern time_t fdate(char *fname); |
74 |
< |
extern int setfdate(char *fname, long ftim); |
73 |
> |
extern time_t fdate(const char *fname); |
74 |
> |
extern time_t fddate(int fd); |
75 |
> |
extern int setfdate(const char *fname, long ftim); |
76 |
|
/* defined in fgetline.c */ |
77 |
|
extern char *fgetline(char *s, int n, FILE *fp); |
78 |
|
/* defined in fgetval.c */ |
108 |
|
extern void expset(char *ep); |
109 |
|
extern char *eindex(char *sp); |
110 |
|
/* defined in savestr.c */ |
111 |
< |
extern char *savestr(char *str); |
111 |
> |
extern char *savestr(const char *str); |
112 |
|
extern void freestr(char *s); |
113 |
< |
extern int shash(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); |