--- ray/src/gen/xform.c 1991/12/24 18:08:25 2.2 +++ ray/src/gen/xform.c 1992/05/28 12:33:20 2.4 @@ -207,19 +207,13 @@ FILE *fin; fgetline(buf, sizeof(buf), fin); if (expand) { - if (xac > 2) { - if ((pin = popen(buf+1, "r")) == NULL) { - fprintf(stderr, - "%s: (%s): cannot execute \"%s\"\n", - progname, fname, buf); - exit(1); - } - xform(buf, pin); - pclose(pin); - } else { - fflush(stdout); - system(buf+1); + if ((pin = popen(buf+1, "r")) == NULL) { + fprintf(stderr, "%s: (%s): cannot execute \"%s\"\n", + progname, fname, buf); + exit(1); } + xform(buf, pin); + pclose(pin); } else { printf("\n%s", buf); if (xac > 1) { @@ -248,17 +242,17 @@ FILE *fin; progname, fname, typ); exit(1); } - if (issurface(fn)) + if (ismodifier(fn)) + printf("\n%s %s ", nam, typ); + else printf("\n%s %s ", newmod != NULL ? newmod : nam, invert ? ofun[tinvers[fn]].funame : typ); - else - printf("\n%s %s ", nam, typ); /* object name */ fgetword(nam, sizeof(nam), fin); - if (idprefix != NULL && issurface(fn)) - printf("%s.%s\n", idprefix, nam); - else + if (idprefix == NULL || ismodifier(fn)) printf("%s\n", nam); + else + printf("%s.%s\n", idprefix, nam); /* transform arguments */ if ((*ofun[fn].funp)(fin) < 0) { fprintf(stderr, "%s: (%s): bad %s \"%s\"\n",