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.3 by greg, Fri Jul 16 12:40:37 1993 UTC vs.
Revision 2.7 by greg, Fri Jun 27 06:53: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 rtio.h
8   */
9  
10 < #include "standard.h"
10 > #include "copyright.h"
11  
12 + #include "rtio.h"
13 +
14 + #include "rtmisc.h"
15 +
16 + #include <errno.h>
17 +
18   #define MAXARGEXP       512             /* maximum argument expansion */
19  
20                          /* set the following to suit, -1 to disable */
# Line 17 | Line 22 | int    envexpchr = '$';                /* environment expansion charact
22   int     filexpchr = '@';                /* file expansion character */
23  
24  
25 + int
26   expandarg(acp, avp, n)          /* expand list at argument n */
27   int     *acp;
28   register char   ***avp;
# Line 44 | Line 50 | int    n;
50          if (newav == NULL)
51                  return(-1);
52                                          /* copy preceeding arguments */
53 <        bcopy((char *)*avp, (char *)newav, n*sizeof(char *));
53 >        bcopy((void *)*avp, (void *)newav, n*sizeof(char *));
54                                          /* copy expanded argument */
55 <        bcopy((char *)ave, (char *)(newav+n), ace*sizeof(char *));
55 >        bcopy((void *)ave, (void *)(newav+n), ace*sizeof(char *));
56                                          /* copy trailing arguments + NULL */
57 <        bcopy((char *)(*avp+n+1), (char *)(newav+n+ace), (*acp-n)*sizeof(char *));
57 >        bcopy((void *)(*avp+n+1), (void *)(newav+n+ace), (*acp-n)*sizeof(char *));
58                                          /* free old list */
59          bfree((char *)*avp, (*acp+1)*sizeof(char *));
60                                          /* assign new list */

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines