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

Comparing ray/src/cv/mgflib/object.c (file contents):
Revision 1.3 by greg, Wed May 10 17:18:45 1995 UTC vs.
Revision 1.6 by greg, Fri Feb 28 20:11:29 2003 UTC

# Line 1 | Line 1
1 /* Copyright (c) 1994 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   * Header file for tracking hierarchical object names
6   */
7  
8   #include <stdio.h>
9 + #include <stdlib.h>
10   #include <string.h>
11   #include "parser.h"
12  
# Line 28 | Line 26 | char   **av;
26   {
27          if (ac == 1) {                          /* just pop top object */
28                  if (obj_nnames < 1)
29 <                        return(MG_OK);          /* should be error? */
29 >                        return(MG_ECNTXT);
30                  free((MEM_PTR)obj_name[--obj_nnames]);
31                  obj_name[obj_nnames] = NULL;
32                  return(MG_OK);
33          }
34          if (ac != 2)
35                  return(MG_EARGC);
36 +        if (!isname(av[1]))
37 +                return(MG_EILL);
38          if (obj_nnames >= obj_maxname-1) {      /* enlarge array */
39                  if (!obj_maxname)
40                          obj_name = (char **)malloc(

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines