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

Comparing ray/src/px/pcompos.c (file contents):
Revision 2.1 by greg, Tue Nov 12 16:04:44 1991 UTC vs.
Revision 2.6 by greg, Mon Jun 22 14:14:40 1992 UTC

# Line 70 | Line 70 | main(argc, argv)
70   int  argc;
71   char  *argv[];
72   {
73        double  atof();
73          int  ncolumns = 0;
74          int  autolabel = 0;
75          int  curcol = 0, curx = 0, cury = 0;
# Line 120 | Line 119 | dofiles:
119          for (nfile = 0; an < argc; nfile++) {
120                  if (nfile >= MAXFILE)
121                          goto toomany;
122 <                if (autolabel)
124 <                        thislabel = argv[an];
125 <                else
126 <                        thislabel = NULL;
122 >                thislabel = NULL;
123                  input[nfile].hasmin = input[nfile].hasmax = 0;
124                  while (an < argc && (argv[an][0] == '-' || argv[an][0] == '+'))
125                          switch (argv[an][1]) {
# Line 147 | Line 143 | dofiles:
143                          case 'l':
144                                  if (strcmp(argv[an], "-l"))
145                                          goto userr;
146 <                                thislabel = argv[++an];
146 >                                thislabel = argv[an+1];
147 >                                an += 2;
148                                  break;
149                          case '\0':
150                                  if (argv[an][0] == '-')
# Line 159 | Line 156 | dofiles:
156   getfile:
157                  if (argc-an < (ncolumns ? 1 : 3))
158                          goto userr;
159 +                if (autolabel && thislabel == NULL)
160 +                        thislabel = argv[an];
161                  if (!strcmp(argv[an], "-")) {
162                          input[nfile].name = "<stdin>";
163                          input[nfile].fp = stdin;
164                  } else {
165 <                        input[nfile].name = argv[an];
166 <                        if ((input[nfile].fp = argv[an][0] == '!' ?
167 <                                        popen(argv[an]+1, "r") :
168 <                                        fopen(argv[an], "r")) == NULL) {
165 >                        if (argv[an][0] == '!') {
166 >                                input[nfile].name = "<Command>";
167 >                                input[nfile].fp = popen(argv[an]+1, "r");
168 >                        } else {
169 >                                input[nfile].name = argv[an];
170 >                                input[nfile].fp = fopen(argv[an], "r");
171 >                        }
172 >                        if (input[nfile].fp == NULL) {
173                                  perror(argv[an]);
174                                  quit(1);
175                          }
# Line 334 | Line 337 | int  *xp, *yp;
337          char  com[128];
338          FILE  *fp;
339  
340 <        sprintf(com, "psign -h %d '%.30s' | pfilt -1 -x /2 -y /2",
338 <                        2*labelht, s);
340 >        sprintf(com, "psign -s -.2 -h %d '%.30s'", labelht, s);
341          if ((fp = popen(com, "r")) == NULL)
342                  return(NULL);
343          if (checkheader(fp, COLRFMT, NULL) < 0)

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines