13 |
|
|
14 |
|
#include "platform.h" |
15 |
|
#include "paths.h" |
16 |
– |
#include "rtprocess.h" /* win_popen() */ |
16 |
|
#include "rtio.h" |
17 |
|
#include "rtmath.h" |
18 |
|
#include "object.h" |
19 |
|
#include "otypes.h" |
20 |
|
|
21 |
+ |
#ifdef getc_unlocked /* avoid horrendous overhead of flockfile */ |
22 |
+ |
#undef getc |
23 |
+ |
#define getc getc_unlocked |
24 |
+ |
#endif |
25 |
+ |
|
26 |
|
int xac; /* global xform argument count */ |
27 |
|
char **xav; /* global xform argument pointer */ |
28 |
|
int xfa; /* start of xf arguments */ |
102 |
|
if (idprefix == NULL) |
103 |
|
idprefix = argv[a]; |
104 |
|
else { |
105 |
< |
register char *newp; |
105 |
> |
char *newp; |
106 |
|
newp = (char *)malloc(strlen(idprefix)+ |
107 |
|
strlen(argv[a])+2); |
108 |
|
if (newp == NULL) |
188 |
|
char argbuf[2048]; |
189 |
|
char *newid, newidbuf[128]; |
190 |
|
char *oldid; |
191 |
< |
register char *cp; |
191 |
> |
char *cp; |
192 |
|
FILE *argfp; |
193 |
|
int n, i, k, newac, err; |
194 |
|
|
347 |
|
void |
348 |
|
xform( /* transform stream by tot.xfm */ |
349 |
|
char *name, |
350 |
< |
register FILE *fin |
350 |
> |
FILE *fin |
351 |
|
) |
352 |
|
{ |
353 |
|
int nobjs = 0; |
354 |
< |
register int c; |
354 |
> |
int c; |
355 |
|
|
356 |
|
while ((c = getc(fin)) != EOF) { |
357 |
|
if (isspace(c)) /* blank */ |
460 |
|
FILE *fin |
461 |
|
) |
462 |
|
{ |
463 |
< |
register int i; |
463 |
> |
int i; |
464 |
|
FUNARGS fa; |
465 |
|
|
466 |
|
if (readfargs(&fa, fin) != 1) |
496 |
|
FILE *fin |
497 |
|
) |
498 |
|
{ |
499 |
< |
register int i; |
499 |
> |
int i; |
500 |
|
int resetarr = 0; |
501 |
|
FUNARGS fa; |
502 |
|
|
609 |
|
else |
610 |
|
for (i = 0; i < fa.nsargs; i++) { |
611 |
|
char sname[256], *sp; |
612 |
< |
register char *cp1, *cp2 = sname; |
612 |
> |
char *cp1, *cp2 = sname; |
613 |
|
/* add idprefix */ |
614 |
|
for (sp = fa.sarg[i]; *sp; sp = cp1) { |
615 |
|
for (cp1 = idprefix; *cp1; ) |
779 |
|
) |
780 |
|
{ |
781 |
|
FVECT p; |
782 |
< |
register int i; |
782 |
> |
int i; |
783 |
|
FUNARGS fa; |
784 |
|
|
785 |
|
if (readfargs(&fa, fin) != 1) |
893 |
|
void |
894 |
|
initotypes(void) /* initialize ofun[] array */ |
895 |
|
{ |
896 |
< |
register int i; |
896 |
> |
int i; |
897 |
|
|
898 |
|
if (ofun[OBJ_SOURCE].funp == o_source) |
899 |
|
return; /* done already */ |
971 |
|
static char origdir[PATH_MAX]; |
972 |
|
static char curfn[PATH_MAX]; |
973 |
|
static int diffdir; |
974 |
< |
register char *fpath; |
974 |
> |
char *fpath; |
975 |
|
|
976 |
|
if (iname == NULL) { /* standard input */ |
977 |
|
if (mainfp == NULL) { |
978 |
< |
register int c; |
978 |
> |
int c; |
979 |
|
strcpy(mainfn, "standard input"); |
980 |
|
if (nrept <= 1) { |
981 |
|
mainfp = stdin; |
1019 |
|
/* record path name */ |
1020 |
|
strcpy(mainfn, fpath); |
1021 |
|
if (expand) { /* change to local directory */ |
1022 |
< |
register char *cp = fpath + strlen(fpath); /* get dir. */ |
1022 |
> |
char *cp = fpath + strlen(fpath); /* get dir. */ |
1023 |
|
while (cp > fpath) { |
1024 |
|
cp--; |
1025 |
|
if (ISDIRSEP(*cp)) { |