--- ray/src/util/rpiece.c 1997/05/20 11:54:55 2.33 +++ ray/src/util/rpiece.c 1998/06/18 09:23:49 2.36 @@ -47,6 +47,11 @@ char *argv[]; #define guard_io() 0 #define unguard() 0 #endif + +#ifndef linux +extern char *sys_errlist[]; +#endif + /* rpict command */ char *rpargv[128] = {"rpict", "-S", "1"}; int rpargc = 3; @@ -72,8 +77,6 @@ int verbose = 0; unsigned timelim = 0; int rvrlim = -1; -extern long lseek(), ftell(); - int gotalrm = 0; int onalrm() { gotalrm++; } @@ -119,7 +122,7 @@ char *argv[]; case 'p': /* pixel aspect ratio? */ if (argv[i][2] != 'a' || argv[i][3]) break; - pixaspect = atof(argv[i+1]); + pixaspect = atof(argv[++i]); continue; case 'T': /* time limit (hours) */ if (argv[i][2]) @@ -193,7 +196,6 @@ int fd; int ltyp; { static struct flock fls; /* static so initialized to zeroes */ - extern char *sys_errlist[]; fls.l_type = ltyp; if (fcntl(fd, F_SETLKW, &fls) < 0) { @@ -506,7 +508,7 @@ int xpos, ypos; filerr("lock"); #endif /* write new piece to file */ - if (lseek(outfd, fls.l_start, 0) == -1) + if (lseek(outfd, fls.l_start, 0) < 0) filerr("seek"); if (hmult == 1) { if (writebuf(outfd, (char *)pbuf, @@ -519,7 +521,7 @@ int xpos, ypos; filerr("write"); if (y < vr-1 && lseek(outfd, (long)(hmult-1)*hr*sizeof(COLR), - 1) == -1) + 1) < 0) filerr("seek"); } #if NFS @@ -548,8 +550,6 @@ int xpos, ypos; filerr(t) /* report file error and exit */ char *t; { - extern char *sys_errlist[]; - fprintf(stderr, "%s: %s error on file \"%s\": %s\n", progname, t, outfile, sys_errlist[errno]); _exit(1);