145 |
|
static char * |
146 |
|
oconv_command(int ac, char *av[]) |
147 |
|
{ |
148 |
< |
static char oconvbuf[2048] = "!oconv -f"; |
149 |
< |
char *cp = oconvbuf + 9; |
150 |
< |
|
148 |
> |
static char oconvbuf[2048] = "!oconv -f "; |
149 |
> |
char *cp = oconvbuf + 10; |
150 |
> |
char *recv = *av++; |
151 |
> |
|
152 |
> |
if (ac-- <= 0) |
153 |
> |
return(NULL); |
154 |
|
while (ac-- > 0) { |
155 |
+ |
strcpy(cp, *av++); |
156 |
+ |
while (*cp) cp++; |
157 |
+ |
*cp++ = ' '; |
158 |
|
if (cp >= oconvbuf+(sizeof(oconvbuf)-32)) { |
159 |
|
fputs(progname, stderr); |
160 |
|
fputs(": too many file arguments!\n", stderr); |
161 |
|
exit(1); |
162 |
|
} |
157 |
– |
*cp++ = ' '; |
158 |
– |
strcpy(cp, *av++); |
159 |
– |
while (*cp) cp++; |
163 |
|
} |
164 |
< |
*cp = '\0'; |
164 |
> |
strcpy(cp, recv); /* receiver goes last */ |
165 |
|
return(oconvbuf); |
166 |
|
} |
167 |
|
|
1356 |
|
userr: |
1357 |
|
if (a < argc-2) |
1358 |
|
fprintf(stderr, "%s: unsupported option '%s'", progname, argv[a]); |
1359 |
< |
fprintf(stderr, "Usage: %s [-v][rcontrib options] sender.rad receiver.rad [system.rad ..]\n", |
1359 |
> |
fprintf(stderr, "Usage: %s [-v][rcontrib options] sender.rad receiver.rad [-i system.oct] [system.rad ..]\n", |
1360 |
|
progname); |
1361 |
|
return(1); |
1362 |
|
} |