12 |
|
#include "copyright.h" |
13 |
|
|
14 |
|
#include <time.h> |
15 |
< |
#ifdef _WIN32 |
15 |
> |
#if defined(_WIN32) || defined(_WIN64) |
16 |
|
#include <winsock.h> /* struct timeval. XXX find a replacement? */ |
17 |
|
#else |
18 |
|
#include <sys/time.h> |
20 |
|
#include <ctype.h> |
21 |
|
#include <string.h> |
22 |
|
|
23 |
+ |
#include "platform.h" |
24 |
|
#include "paths.h" |
25 |
|
#include "ranimove.h" |
26 |
|
|
350 |
|
av[ac=0] = NULL; |
351 |
|
/* load options from file, first */ |
352 |
|
if (optf != NULL && *optf) { |
353 |
< |
ac = wordfile(av, optf); |
353 |
> |
ac = wordfile(av, 1024, optf); |
354 |
|
if (ac < 0) { |
355 |
|
sprintf(errmsg, "cannot load options file \"%s\"", |
356 |
|
optf); |
359 |
|
} |
360 |
|
/* then from options string */ |
361 |
|
if (qval != NULL && qval[0] == '-') |
362 |
< |
ac += wordstring(av+ac, qval); |
362 |
> |
ac += wordstring(av+ac, 1024-ac, qval); |
363 |
|
|
364 |
|
/* restore default parameters */ |
365 |
|
ray_restore(NULL); |
853 |
|
} |
854 |
|
|
855 |
|
|
856 |
< |
#ifdef _WIN32 |
856 |
> |
#if defined(_WIN32) || defined(_WIN64) |
857 |
|
/* replacement function for Windoze */ |
858 |
|
static int |
859 |
|
gettimeofday(struct timeval *tp, void *dummy) |