- (void) fscanf(file, "%f%f", &x, &y);
- }
- (void) fscanf(file, "%d%d", &brush, &size);
- (void) fscanf(file, "%d", &len);
+
+ lastpoint = FALSE;
+ do {
+ fgets(string, MAXSTRING, file);
+ if (string[0] == '*') { /* SUN gremlin file */
+ lastpoint = TRUE;
+ }
+ else {
+ (void) sscanf(string, "%f%f", &x, &y);
+ if ((x == -1.00 && y == -1.00) && (!SUNFILE)) {
+ lastpoint = TRUE;
+ } else {
+ savebounds(xorn(x, y), yorn(x, y));
+ }
+ }
+ } while (!lastpoint);
+ }
+ else { /* not TEXT element */
+ lastpoint = FALSE;
+ while (!lastpoint) {
+ nx = xorn(x, y);
+ y = yorn(x, y);
+ (void) PTMakePoint(nx, y, &plist);
+ savebounds(nx, y);
+
+ fgets(string, MAXSTRING, file);
+ if (string[0] == '*') { /* SUN gremlin file */
+ lastpoint = TRUE;
+ }
+ else {
+ (void) sscanf(string, "%f%f", &x, &y);
+ if ((x == -1.00 && y == -1.00) && (!SUNFILE))
+ lastpoint = TRUE;
+ }
+ }
+ }
+ (void) fscanf(file, "%d%d\n", &brush, &size);
+ (void) fscanf(file, "%d", &len); /* text length */
+ (void) getc(file); /* eat blank */