| 1 |
– |
/* Copyright (c) 1992 Regents of the University of California */ |
| 2 |
– |
|
| 1 |
|
#ifndef lint |
| 2 |
< |
static char SCCSid[] = "$SunId$ LBL"; |
| 2 |
> |
static const char RCSid[] = "$Id$"; |
| 3 |
|
#endif |
| 6 |
– |
|
| 4 |
|
/* |
| 5 |
|
* Get additional command arguments from file or environment. |
| 6 |
+ |
* |
| 7 |
+ |
* External symbols declared in standard.h |
| 8 |
|
*/ |
| 9 |
|
|
| 10 |
+ |
#include "copyright.h" |
| 11 |
+ |
|
| 12 |
|
#include "standard.h" |
| 13 |
|
|
| 14 |
|
#define MAXARGEXP 512 /* maximum argument expansion */ |
| 15 |
|
|
| 16 |
|
/* set the following to suit, -1 to disable */ |
| 17 |
|
int envexpchr = '$'; /* environment expansion character */ |
| 18 |
< |
int filexpchr = '^'; /* file expansion character */ |
| 18 |
> |
int filexpchr = '@'; /* file expansion character */ |
| 19 |
|
|
| 20 |
|
|
| 21 |
+ |
int |
| 22 |
|
expandarg(acp, avp, n) /* expand list at argument n */ |
| 23 |
|
int *acp; |
| 24 |
|
register char ***avp; |
| 28 |
|
char *ave[MAXARGEXP]; |
| 29 |
|
char **newav; |
| 30 |
|
/* check argument */ |
| 31 |
+ |
if (n >= *acp) |
| 32 |
+ |
return(0); |
| 33 |
|
errno = 0; |
| 34 |
|
if ((*avp)[n][0] == filexpchr) { /* file name */ |
| 35 |
|
ace = wordfile(ave, (*avp)[n]+1); |