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

Comparing ray/src/gen/xform.c (file contents):
Revision 2.2 by greg, Tue Dec 24 18:08:25 1991 UTC vs.
Revision 2.4 by greg, Thu May 28 12:33:20 1992 UTC

# Line 207 | Line 207 | FILE  *fin;
207  
208          fgetline(buf, sizeof(buf), fin);
209          if (expand) {
210 <                if (xac > 2) {
211 <                        if ((pin = popen(buf+1, "r")) == NULL) {
212 <                                fprintf(stderr,
213 <                                "%s: (%s): cannot execute \"%s\"\n",
214 <                                                progname, fname, buf);
215 <                                exit(1);
216 <                        }
217 <                        xform(buf, pin);
218 <                        pclose(pin);
219 <                } else {
220 <                        fflush(stdout);
221 <                        system(buf+1);
210 >                if ((pin = popen(buf+1, "r")) == NULL) {
211 >                        fprintf(stderr, "%s: (%s): cannot execute \"%s\"\n",
212 >                                        progname, fname, buf);
213 >                        exit(1);
214                  }
215 +                xform(buf, pin);
216 +                pclose(pin);
217          } else {
218                  printf("\n%s", buf);
219                  if (xac > 1) {
# Line 248 | Line 242 | FILE  *fin;
242                                  progname, fname, typ);
243                  exit(1);
244          }
245 <        if (issurface(fn))
245 >        if (ismodifier(fn))
246 >                printf("\n%s %s ", nam, typ);
247 >        else
248                  printf("\n%s %s ", newmod != NULL ? newmod : nam,
249                                  invert ? ofun[tinvers[fn]].funame : typ);
254        else
255                printf("\n%s %s ", nam, typ);
250                                                  /* object name */
251          fgetword(nam, sizeof(nam), fin);
252 <        if (idprefix != NULL && issurface(fn))
259 <                printf("%s.%s\n", idprefix, nam);
260 <        else
252 >        if (idprefix == NULL || ismodifier(fn))
253                  printf("%s\n", nam);
254 +        else
255 +                printf("%s.%s\n", idprefix, nam);
256                                                  /* transform arguments */
257          if ((*ofun[fn].funp)(fin) < 0) {
258                  fprintf(stderr, "%s: (%s): bad %s \"%s\"\n",

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines