2 * Implementation of things missing in Windows
6 #define M_PI 3.14159265358979323846
13 #ifdef WINDOWS_FUNCTIONS
19 char getopt(int argc
, char **argv
, char *args
) {
20 int n
,nlen
=strlen(args
),nLen
=0;
23 if (argv
[optind
] && *argv
[optind
]=='-') {
24 nCmd
=*((argv
[optind
]+1));
26 for (n
=0;n
<nlen
;n
++) {
27 if (args
[n
] == ':') continue;
28 if (args
[n
] == nCmd
) {
31 retVal
=*(argv
[optind
]+1);
32 optarg
=argv
[optind
+1];
33 if (!optarg
) optarg
="";
38 retVal
=*(argv
[optind
]+1);
51 unsigned short ntohs(unsigned short inv
);
52 unsigned long ntohl(unsigned long inv
);
53 unsigned long htonl(unsigned long inv
);
58 char getopt(int argc
, char **argv
, char *args
);