ViewVC Help
View File | Revision Log | Show Annotations | Download File | Root Listing
root/radiance/ray/src/common/expandarg.c
(Generate patch)

Comparing ray/src/common/expandarg.c (file contents):
Revision 2.1 by greg, Sat Oct 17 08:41:37 1992 UTC vs.
Revision 2.5 by greg, Tue Feb 25 02:47:21 2003 UTC

# Line 1 | Line 1
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;
# Line 26 | Line 28 | int    n;
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);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines