Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 214068 | Differences between
and this patch

Collapse All | Expand All

(-)cups-1.2.12/filter/hpgl-input.c (-6 / +7 lines)
Lines 56-61 ParseCommand(FILE *fp, /* I - File to Link Here
56
		i;		/* Looping var */
56
		i;		/* Looping var */
57
  char		buf[262144],	/* String buffer */
57
  char		buf[262144],	/* String buffer */
58
		*bufptr;	/* Pointer into buffer */
58
		*bufptr;	/* Pointer into buffer */
59
  float		temp;		/* Temporary parameter value */
59
  static param_t p[MAX_PARAMS];	/* Parameter buffer */
60
  static param_t p[MAX_PARAMS];	/* Parameter buffer */
60
61
61
62
Lines 220-229 ParseCommand(FILE *fp, /* I - File to Link Here
220
      case '-' :
221
      case '-' :
221
      case '+' :
222
      case '+' :
222
          ungetc(ch, fp);
223
          ungetc(ch, fp);
223
          fscanf(fp, "%f", &(p[num_params].value.number));
224
          if (fscanf(fp, "%f", &temp) == 1 && num_params < MAX_PARAMS)
224
          if (num_params < MAX_PARAMS)
225
          {
225
          {
226
            p[num_params].type = PARAM_RELATIVE;
226
            p[num_params].type         = PARAM_RELATIVE;
227
            p[num_params].value.number = temp;
227
            num_params ++;
228
            num_params ++;
228
          }
229
          }
229
          break;
230
          break;
Lines 239-248 ParseCommand(FILE *fp, /* I - File to Link Here
239
      case '9' :
240
      case '9' :
240
      case '.' :
241
      case '.' :
241
          ungetc(ch, fp);
242
          ungetc(ch, fp);
242
          fscanf(fp, "%f", &(p[num_params].value.number));
243
          if (fscanf(fp, "%f", &temp) == 1 && num_params < MAX_PARAMS)
243
          if (num_params < MAX_PARAMS)
244
          {
244
          {
245
            p[num_params].type = PARAM_ABSOLUTE;
245
            p[num_params].type         = PARAM_ABSOLUTE;
246
            p[num_params].value.number = temp;
246
            num_params ++;
247
            num_params ++;
247
          }
248
          }
248
          break;
249
          break;

Return to bug 214068