--- ray/src/px/protate.c 1990/01/18 23:58:15 1.3 +++ ray/src/px/protate.c 1990/06/26 09:09:35 1.5 @@ -45,8 +45,7 @@ char *argv[]; exit(1); } /* copy header */ - while (fgets(buf, sizeof(buf), fin) != NULL && buf[0] != '\n') - fputs(buf, stdout); + copyheader(fin, stdout); /* add new header info. */ printf("%s\n\n", progname); /* get picture size */ @@ -66,11 +65,11 @@ char *argv[]; rotate(fp) /* rotate picture */ FILE *fp; { - register COLR *inline; + register COLR *inln; register int xoff, inx, iny; long start, ftell(); - if ((inline = (COLR *)malloc(xres*sizeof(COLR))) == NULL) { + if ((inln = (COLR *)malloc(xres*sizeof(COLR))) == NULL) { fprintf(stderr, "%s: out of memory\n", progname); exit(1); } @@ -81,12 +80,12 @@ FILE *fp; exit(1); } for (iny = yres-1; iny >= 0; iny--) { - if (freadcolrs(inline, xres, fp) < 0) { + if (freadcolrs(inln, xres, fp) < 0) { fprintf(stderr, "%s: read error\n", progname); exit(1); } for (inx = 0; inx < nrows && xoff+inx < xres; inx++) - bcopy((char *)inline[xoff+inx], + bcopy((char *)inln[xoff+inx], (char *)scanbar[inx*yres+iny], sizeof(COLR)); } @@ -96,5 +95,5 @@ FILE *fp; exit(1); } } - free((char *)inline); + free((char *)inln); }