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.5 by greg, Tue Feb 25 02:47:21 2003 UTC vs.
Revision 2.8 by schorsch, Mon Jun 30 14:59:11 2003 UTC

# Line 4 | Line 4 | static const char      RCSid[] = "$Id$";
4   /*
5   * Get additional command arguments from file or environment.
6   *
7 < *  External symbols declared in standard.h
7 > *  External symbols declared in rtio.h
8   */
9  
10   #include "copyright.h"
11  
12 < #include "standard.h"
12 > #include <errno.h>
13 > #include <string.h>
14  
15 + #include "rtio.h"
16 + #include "rtmisc.h"
17 +
18 +
19   #define MAXARGEXP       512             /* maximum argument expansion */
20  
21                          /* set the following to suit, -1 to disable */
# Line 46 | Line 51 | int    n;
51          if (newav == NULL)
52                  return(-1);
53                                          /* copy preceeding arguments */
54 <        bcopy((char *)*avp, (char *)newav, n*sizeof(char *));
54 >        memcpy((void *)newav, (void *)*avp, n*sizeof(char *));
55                                          /* copy expanded argument */
56 <        bcopy((char *)ave, (char *)(newav+n), ace*sizeof(char *));
56 >        memcpy((void *)(newav+n), (void *)ave, ace*sizeof(char *));
57                                          /* copy trailing arguments + NULL */
58 <        bcopy((char *)(*avp+n+1), (char *)(newav+n+ace), (*acp-n)*sizeof(char *));
58 >        memcpy((void *)(newav+n+ace), (void *)(*avp+n+1), (*acp-n)*sizeof(char *));
59                                          /* free old list */
60          bfree((char *)*avp, (*acp+1)*sizeof(char *));
61                                          /* assign new list */

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines