• Home
  • Raw
  • Download

Lines Matching refs:fp

290 ppdcSource::get_attr(ppdcFile *fp, 	// I - File to read  in get_attr()  argument
302 if (!get_token(fp, name, sizeof(name))) in get_attr()
306 loc ? "LocAttribute" : "Attribute", fp->line, fp->filename); in get_attr()
310 if (!get_token(fp, selector, sizeof(selector))) in get_attr()
314 loc ? "LocAttribute" : "Attribute", fp->line, fp->filename); in get_attr()
321 if (!get_token(fp, value, sizeof(value))) in get_attr()
325 loc ? "LocAttribute" : "Attribute", fp->line, fp->filename); in get_attr()
338 ppdcSource::get_boolean(ppdcFile *fp) // I - File to read in get_boolean() argument
343 if (!get_token(fp, buffer, sizeof(buffer))) in get_boolean()
347 fp->line, fp->filename); in get_boolean()
363 buffer, fp->line, fp->filename); in get_boolean()
374 ppdcSource::get_choice(ppdcFile *fp) // I - File to read in get_choice() argument
384 if (!get_token(fp, name, sizeof(name))) in get_choice()
388 fp->line, fp->filename); in get_choice()
397 if (!get_token(fp, code, sizeof(code))) in get_choice()
400 fp->line, fp->filename); in get_choice()
414 ppdcSource::get_color_model(ppdcFile *fp) in get_color_model() argument
428 if (!get_token(fp, name, sizeof(name))) in get_color_model()
432 "line %d of %s."), fp->line, fp->filename); in get_color_model()
441 if (!get_token(fp, temp, sizeof(temp))) in get_color_model()
445 "%s."), fp->line, fp->filename); in get_color_model()
452 if (!get_token(fp, temp, sizeof(temp))) in get_color_model()
456 "%s."), fp->line, fp->filename); in get_color_model()
463 if (!get_token(fp, temp, sizeof(temp))) in get_color_model()
467 "%s."), fp->line, fp->filename); in get_color_model()
508 ppdcFile *fp) // I - File to read in get_color_profile() argument
521 if (!get_token(fp, resolution, sizeof(resolution))) in get_color_profile()
526 fp->line, fp->filename); in get_color_profile()
535 g = get_float(fp); in get_color_profile()
536 d = get_float(fp); in get_color_profile()
538 m[i] = get_float(fp); in get_color_profile()
628 ppdcSource::get_constraint(ppdcFile *fp)// I - File to read in get_constraint() argument
644 if (!get_token(fp, temp, sizeof(temp))) in get_constraint()
648 "line %d of %s."), fp->line, fp->filename); in get_constraint()
658 fp->line, fp->filename); in get_constraint()
681 fp->line, fp->filename); in get_constraint()
704 ppdcSource::get_custom_size(ppdcFile *fp) in get_custom_size() argument
722 if (!get_token(fp, name, sizeof(name))) in get_custom_size()
730 if ((width = get_measurement(fp)) < 0.0f) in get_custom_size()
733 if ((length = get_measurement(fp)) < 0.0f) in get_custom_size()
736 if ((left = get_measurement(fp)) < 0.0f) in get_custom_size()
739 if ((bottom = get_measurement(fp)) < 0.0f) in get_custom_size()
742 if ((right = get_measurement(fp)) < 0.0f) in get_custom_size()
745 if ((top = get_measurement(fp)) < 0.0f) in get_custom_size()
748 if (!get_token(fp, size_code, sizeof(size_code))) in get_custom_size()
751 if (!get_token(fp, region_code, sizeof(region_code))) in get_custom_size()
765 ppdcSource::get_duplex(ppdcFile *fp, // I - File to read from in get_duplex() argument
775 if (!get_token(fp, temp, sizeof(temp))) in get_duplex()
779 "%s."), fp->line, fp->filename); in get_duplex()
859 temp, fp->line, fp->filename); in get_duplex()
868 ppdcSource::get_filter(ppdcFile *fp) // I - File to read in get_filter() argument
881 if (!get_token(fp, type, sizeof(type))) in get_filter()
885 fp->line, fp->filename); in get_filter()
902 cost = get_integer(fp); in get_filter()
904 if (!get_token(fp, program, sizeof(program))) in get_filter()
908 fp->line, fp->filename); in get_filter()
917 "%s."), fp->line, fp->filename); in get_filter()
925 fp->line, fp->filename); in get_filter()
933 "of %s."), fp->line, fp->filename); in get_filter()
946 ppdcSource::get_float(ppdcFile *fp) // I - File to read in get_float() argument
954 if (!get_token(fp, temp, sizeof(temp))) in get_float()
957 fp->line, fp->filename); in get_float()
967 "on line %d of %s."), temp, fp->line, fp->filename); in get_float()
980 ppdcSource::get_font(ppdcFile *fp) // I - File to read in get_font() argument
1007 if (!get_token(fp, name, sizeof(name))) in get_font()
1011 fp->line, fp->filename); in get_font()
1026 if (!get_token(fp, encoding, sizeof(encoding))) in get_font()
1030 "%s."), fp->line, fp->filename); in get_font()
1034 if (!get_token(fp, version, sizeof(version))) in get_font()
1038 "%s."), fp->line, fp->filename); in get_font()
1042 if (!get_token(fp, charset, sizeof(charset))) in get_font()
1046 "%s."), fp->line, fp->filename); in get_font()
1050 if (!get_token(fp, temp, sizeof(temp))) in get_font()
1054 fp->line, fp->filename); in get_font()
1066 temp, fp->line, fp->filename); in get_font()
1082 ppdcSource::get_generic(ppdcFile *fp, // I - File to read in get_generic() argument
1101 val = get_integer(fp); in get_generic()
1105 if (!get_token(fp, name, sizeof(name))) in get_generic()
1109 keyword, fp->line, fp->filename); in get_generic()
1143 ppdcSource::get_group(ppdcFile *fp, // I - File to read in get_group() argument
1154 if (!get_token(fp, name, sizeof(name))) in get_group()
1158 fp->line, fp->filename); in get_group()
1183 ppdcSource::get_installable(ppdcFile *fp) in get_installable() argument
1194 if (!get_token(fp, name, sizeof(name))) in get_installable()
1198 "of %s."), fp->line, fp->filename); in get_installable()
1447 ppdcSource::get_integer(ppdcFile *fp) // I - File to read in get_integer() argument
1452 if (!get_token(fp, temp, sizeof(temp))) in get_integer()
1455 fp->line, fp->filename); in get_integer()
1468 ppdcSource::get_measurement(ppdcFile *fp) in get_measurement() argument
1477 if (!get_token(fp, buffer, sizeof(buffer))) in get_measurement()
1506 ppdcSource::get_option(ppdcFile *fp, // I - File to read in get_option() argument
1523 if (!get_token(fp, name, sizeof(name))) in get_option()
1527 fp->line, fp->filename); in get_option()
1536 if (!get_token(fp, type, sizeof(type))) in get_option()
1539 fp->line, fp->filename); in get_option()
1553 type, fp->line, fp->filename); in get_option()
1557 if (!get_token(fp, type, sizeof(type))) in get_option()
1561 fp->line, fp->filename); in get_option()
1581 "%s."), type, fp->line, fp->filename); in get_option()
1585 order = get_float(fp); in get_option()
1597 "%d of %s."), name, fp->line, fp->filename); in get_option()
1604 "%d of %s."), name, fp->line, fp->filename); in get_option()
1617 ppdcSource::get_po(ppdcFile *fp) // I - File to read in get_po() argument
1630 if (!get_token(fp, locale, sizeof(locale))) in get_po()
1634 fp->line, fp->filename); in get_po()
1638 if (!get_token(fp, poname, sizeof(poname))) in get_po()
1642 "%s."), locale, fp->line, fp->filename); in get_po()
1651 locale, fp->line, fp->filename); in get_po()
1656 strlcpy(basedir, fp->filename, sizeof(basedir)); in get_po()
1683 poname, fp->line, fp->filename); in get_po()
1694 ppdcSource::get_resolution(ppdcFile *fp)// I - File to read in get_resolution() argument
1714 if (!get_token(fp, temp, sizeof(temp))) in get_resolution()
1718 "%d of %s."), fp->line, fp->filename); in get_resolution()
1726 depth = get_integer(fp); in get_resolution()
1727 row_count = get_integer(fp); in get_resolution()
1728 row_feed = get_integer(fp); in get_resolution()
1729 row_step = get_integer(fp); in get_resolution()
1731 if (!get_token(fp, name, sizeof(name))) in get_resolution()
1735 "%s."), fp->line, fp->filename); in get_resolution()
1754 "%s."), name, fp->line, fp->filename); in get_resolution()
1798 ppdcSource::get_simple_profile(ppdcFile *fp) in get_simple_profile() argument
1814 if (!get_token(fp, resolution, sizeof(resolution))) in get_simple_profile()
1819 fp->line, fp->filename); in get_simple_profile()
1829 kd = get_float(fp); in get_simple_profile()
1830 yellow = get_float(fp); in get_simple_profile()
1831 rd = get_float(fp); in get_simple_profile()
1832 g = get_float(fp); in get_simple_profile()
1833 red = get_float(fp); in get_simple_profile()
1834 green = get_float(fp); in get_simple_profile()
1835 blue = get_float(fp); in get_simple_profile()
1892 ppdcSource::get_size(ppdcFile *fp) // I - File to read in get_size() argument
1903 if (!get_token(fp, name, sizeof(name))) in get_size()
1911 if ((width = get_measurement(fp)) < 0.0f) in get_size()
1914 if ((length = get_measurement(fp)) < 0.0f) in get_size()
1927 ppdcSource::get_token(ppdcFile *fp, // I - File to read in get_token() argument
1952 while ((ch = fp->get()) != EOF) in get_token()
1966 for (nameptr = name; (ch = fp->peek()) != EOF;) in get_token()
1971 *nameptr++ = (char)fp->get(); in get_token()
1981 *bufptr++ = (char)fp->get(); in get_token()
1988 "of %s."), ch, fp->line, fp->filename); in get_token()
2009 "%s."), name, fp->line, fp->filename); in get_token()
2019 nextch = fp->peek(); in get_token()
2024 fp->get(); in get_token()
2025 ch = fp->get(); in get_token()
2026 while ((nextch = fp->get()) != EOF) in get_token()
2040 while ((nextch = fp->get()) != EOF) in get_token()
2074 startline = fp->line; in get_token()
2082 startline = fp->line; in get_token()
2098 if ((ch = fp->get()) == EOF) in get_token()
2119 "of %s."), quote, startline, fp->filename); in get_token()
2138 ppdcSource::get_variable(ppdcFile *fp) // I - File to read in get_variable() argument
2147 if (!get_token(fp, name, sizeof(name))) in get_variable()
2150 if (!get_token(fp, value, sizeof(value))) in get_variable()
2163 ppdcSource::quotef(cups_file_t *fp, // I - File to write to in quotef() argument
2182 if (!fp || !format) in quotef()
2199 cupsFilePutChar(fp, *format++); in quotef()
2251 bytes += cupsFilePrintf(fp, tformat, va_arg(ap, double)); in quotef()
2270 bytes += cupsFilePrintf(fp, tformat, va_arg(ap, long long)); in quotef()
2274 bytes += cupsFilePrintf(fp, tformat, va_arg(ap, long)); in quotef()
2276 bytes += cupsFilePrintf(fp, tformat, va_arg(ap, int)); in quotef()
2286 bytes += cupsFilePrintf(fp, tformat, va_arg(ap, void *)); in quotef()
2293 cupsFilePutChar(fp, va_arg(ap, int)); in quotef()
2297 cupsFileWrite(fp, va_arg(ap, char *), (size_t)width); in quotef()
2316 cupsFilePutChar(fp, ' '); in quotef()
2323 cupsFilePutChar(fp, '\\'); in quotef()
2327 cupsFilePutChar(fp, *s); in quotef()
2333 cupsFilePutChar(fp, ' '); in quotef()
2340 cupsFilePutChar(fp, *format++); in quotef()
2360 ppdcFile *fp = new ppdcFile(f, ffp); in read_file() local
2361 scan_file(fp); in read_file()
2362 delete fp; in read_file()
2374 ppdcSource::scan_file(ppdcFile *fp, // I - File to read in scan_file() argument
2415 while (get_token(fp, temp, sizeof(temp))) in scan_file()
2441 scan_file(fp, d); in scan_file()
2449 fp->line, fp->filename); in scan_file()
2454 if (get_integer(fp) > 0) in scan_file()
2467 fp->line, fp->filename); in scan_file()
2473 get_integer(fp); in scan_file()
2476 else if (get_integer(fp) > 0) in scan_file()
2502 fp->line, fp->filename); in scan_file()
2532 fp->line, fp->filename); in scan_file()
2554 get_variable(fp); in scan_file()
2569 if (!get_token(fp, inctemp, sizeof(inctemp))) in scan_file()
2573 "%s."), fp->line, fp->filename); in scan_file()
2581 strlcpy(basedir, fp->filename, sizeof(basedir)); in scan_file()
2605 "of %s."), inctemp, fp->line, fp->filename); in scan_file()
2615 m = get_size(fp); in scan_file()
2630 cat = get_po(fp); in scan_file()
2646 a = get_attr(fp, !_cups_strcasecmp(temp, "LocAttribute")); in scan_file()
2658 c = get_choice(fp); in scan_file()
2674 "Option."), fp->line, fp->filename); in scan_file()
2687 get_boolean(fp); in scan_file()
2689 d->color_device = get_boolean(fp); in scan_file()
2694 c = get_color_model(fp); in scan_file()
2726 p = get_color_profile(fp); in scan_file()
2745 if (!get_token(fp, copytemp, sizeof(temp))) in scan_file()
2749 "of %s."), fp->line, fp->filename); in scan_file()
2771 m = get_custom_size(fp); in scan_file()
2791 have_cutter = get_boolean(fp); in scan_file()
2815 c = get_generic(fp, "Darkness", NULL, "cupsCompression"); in scan_file()
2837 "line %d of %s."), "cupsDarkness", fp->line, in scan_file()
2838 fp->filename); in scan_file()
2856 if (!get_token(fp, temp, sizeof(temp))) in scan_file()
2861 fp->line, fp->filename); in scan_file()
2879 temp, fp->line, fp->filename); in scan_file()
2882 get_duplex(fp, d); in scan_file()
2889 f = get_filter(fp); in scan_file()
2901 c = get_generic(fp, "Finishing", "OutputType", NULL); in scan_file()
2923 "line %d of %s."), "cupsFinishing", fp->line, in scan_file()
2924 fp->filename); in scan_file()
2943 f = get_font(fp); in scan_file()
2963 ppdcGroup *tempg = get_group(fp, d); in scan_file()
2984 d->left_margin = get_measurement(fp); in scan_file()
2985 d->bottom_margin = get_measurement(fp); in scan_file()
2986 d->right_margin = get_measurement(fp); in scan_file()
2987 d->top_margin = get_measurement(fp); in scan_file()
2992 c = get_generic(fp, "InputSlot", NULL, "MediaPosition"); in scan_file()
3016 "line %d of %s."), "InputSlot", fp->line, in scan_file()
3017 fp->filename); in scan_file()
3032 o = get_installable(fp); in scan_file()
3049 get_boolean(fp); in scan_file()
3051 d->manual_copies = get_boolean(fp); in scan_file()
3059 if (!get_token(fp, name, sizeof(name))) in scan_file()
3063 "of %s."), fp->line, fp->filename); in scan_file()
3075 get_measurement(fp); in scan_file()
3076 get_measurement(fp); in scan_file()
3080 d->max_width = get_measurement(fp); in scan_file()
3081 d->max_length = get_measurement(fp); in scan_file()
3092 if (get_token(fp, name, sizeof(name)) == NULL) in scan_file()
3096 "%s."), fp->line, fp->filename); in scan_file()
3109 "%s."), name, fp->line, fp->filename); in scan_file()
3126 c = get_generic(fp, "MediaType", "MediaType", "cupsMediaType"); in scan_file()
3149 "line %d of %s."), "MediaType", fp->line, in scan_file()
3150 fp->filename); in scan_file()
3167 get_measurement(fp); in scan_file()
3168 get_measurement(fp); in scan_file()
3172 d->min_width = get_measurement(fp); in scan_file()
3173 d->min_length = get_measurement(fp); in scan_file()
3182 if (!get_token(fp, name, sizeof(name))) in scan_file()
3186 "%s."), fp->line, fp->filename); in scan_file()
3197 get_integer(fp); in scan_file()
3199 d->model_number = get_integer(fp); in scan_file()
3204 ppdcOption *tempo = get_option(fp, d, g); in scan_file()
3228 if (!get_token(fp, name, sizeof(name))) in scan_file()
3232 "%s."), fp->line, fp->filename); in scan_file()
3245 if (!get_token(fp, name, sizeof(name))) in scan_file()
3249 "%s."), fp->line, fp->filename); in scan_file()
3259 c = get_resolution(fp); in scan_file()
3282 "line %d of %s."), "Resolution", fp->line, in scan_file()
3283 fp->filename); in scan_file()
3301 p = get_simple_profile(fp); in scan_file()
3315 get_integer(fp); in scan_file()
3317 d->throughput = get_integer(fp); in scan_file()
3324 con = get_constraint(fp); in scan_file()
3338 get_boolean(fp); in scan_file()
3340 d->variable_paper_size = get_boolean(fp); in scan_file()
3348 if (!get_token(fp, name, sizeof(name))) in scan_file()
3352 "%s."), fp->line, fp->filename); in scan_file()
3363 temp, fp->line, fp->filename); in scan_file()
3425 cups_file_t *fp; // Output file in write_file() local
3450 fp = cupsFileOpen(f, "w"); in write_file()
3452 if (!fp) in write_file()
3459 cupsFilePuts(fp, "// CUPS PPD Compiler " CUPS_SVERSION "\n\n"); in write_file()
3462 cupsFilePuts(fp, "// Include necessary files...\n"); in write_file()
3463 cupsFilePuts(fp, "#include <font.defs>\n"); in write_file()
3464 cupsFilePuts(fp, "#include <media.defs>\n"); in write_file()
3471 cupsFilePrintf(fp, "#include <%s.h>\n", driver_types[d->type]); in write_file()
3479 cupsFilePrintf(fp, "\n// %s %s\n", d->manufacturer->value, in write_file()
3481 cupsFilePuts(fp, "{\n"); in write_file()
3487 quotef(fp, " Copyright \"%s\"\n", st->value); in write_file()
3491 quotef(fp, " Manufacturer \"%s\"\n", d->manufacturer->value); in write_file()
3493 quotef(fp, " ModelName \"%s\"\n", d->model_name->value); in write_file()
3495 quotef(fp, " FileName \"%s\"\n", d->file_name->value); in write_file()
3497 quotef(fp, " PCFileName \"%s\"\n", d->pc_file_name->value); in write_file()
3499 quotef(fp, " Version \"%s\"\n", d->version->value); in write_file()
3501 cupsFilePrintf(fp, " DriverType %s\n", driver_types[d->type]); in write_file()
3508 cupsFilePuts(fp, " ModelNumber "); in write_file()
3513 cupsFilePuts(fp, "$DYMO_3x0\n"); in write_file()
3517 cupsFilePuts(fp, "$ZEBRA_EPL_LINE\n"); in write_file()
3521 cupsFilePuts(fp, "$ZEBRA_EPL_PAGE\n"); in write_file()
3525 cupsFilePuts(fp, "$ZEBRA_ZPL\n"); in write_file()
3529 cupsFilePuts(fp, "$ZEBRA_CPCL\n"); in write_file()
3533 cupsFilePuts(fp, "$INTELLITECH_PCL\n"); in write_file()
3537 cupsFilePrintf(fp, "%d\n", d->model_number); in write_file()
3543 cupsFilePuts(fp, " ModelNumber "); in write_file()
3548 cupsFilePuts(fp, "$EPSON_9PIN\n"); in write_file()
3552 cupsFilePuts(fp, "$EPSON_24PIN\n"); in write_file()
3556 cupsFilePuts(fp, "$EPSON_COLOR\n"); in write_file()
3560 cupsFilePuts(fp, "$EPSON_PHOTO\n"); in write_file()
3564 cupsFilePuts(fp, "$EPSON_ICOLOR\n"); in write_file()
3568 cupsFilePuts(fp, "$EPSON_IPHOTO\n"); in write_file()
3572 cupsFilePrintf(fp, "%d\n", d->model_number); in write_file()
3578 cupsFilePuts(fp, " ModelNumber "); in write_file()
3582 cupsFilePuts(fp, "$HP_LASERJET\n"); in write_file()
3586 cupsFilePuts(fp, "$HP_DESKJET\n"); in write_file()
3590 cupsFilePuts(fp, "$HP_DESKJET2\n"); in write_file()
3594 cupsFilePrintf(fp, "%d\n", d->model_number); in write_file()
3598 cupsFilePuts(fp, ")\n"); in write_file()
3602 cupsFilePrintf(fp, " ModelNumber %d\n", d->model_number); in write_file()
3608 cupsFilePuts(fp, " ManualCopies Yes\n"); in write_file()
3611 cupsFilePuts(fp, " ColorDevice Yes\n"); in write_file()
3614 cupsFilePrintf(fp, " Throughput %d\n", d->throughput); in write_file()
3621 quotef(fp, " Attribute \"%s\" \"%s/%s\" \"%s\"\n", in write_file()
3625 quotef(fp, " Attribute \"%s\" \"%s\" \"%s\"\n", in write_file()
3635 cupsFilePrintf(fp, " UIConstraints \"%s %s", co->option1->value, in write_file()
3638 cupsFilePrintf(fp, " UIConstraints \"*%s %s", co->option1->value, in write_file()
3642 cupsFilePrintf(fp, " %s %s\"\n", co->option2->value, in write_file()
3645 cupsFilePrintf(fp, " *%s %s\"\n", co->option2->value, in write_file()
3653 cupsFilePrintf(fp, " Filter \"%s %d %s\"\n", in write_file()
3661 cupsFilePuts(fp, " Font *\n"); in write_file()
3663 cupsFilePrintf(fp, " Font \"%s\" \"%s\" \"%s\" \"%s\" %s\n", in write_file()
3677 quotef(fp, " Group \"%s/%s\"\n", g->name->value, g->text->value); in write_file()
3679 cupsFilePrintf(fp, " Group \"%s\"\n", g->name->value); in write_file()
3689 quotef(fp, " Option \"%s/%s\"", o->name->value, o->text->value); in write_file()
3691 cupsFilePrintf(fp, " Option \"%s\"", o->name->value); in write_file()
3693 cupsFilePrintf(fp, " %s %s %.1f\n", in write_file()
3709 quotef(fp, " %sChoice \"%s/%s\" \"%s\"\n", in write_file()
3714 quotef(fp, " %sChoice \"%s\" \"%s\"\n", in write_file()
3726 cupsFilePrintf(fp, " ColorProfile \"%s/%s\" %.3f %.3f " in write_file()
3746 quotef(fp, " %sCustomMedia \"%s/%s\" %.2f %.2f %.2f %.2f %.2f %.2f \"%s\" \"%s\"\n", in write_file()
3760 cupsFilePrintf(fp, " HWMargins %.2f %.2f %.2f %.2f\n", in write_file()
3769 cupsFilePrintf(fp, " %sMediaSize %s\n", in write_file()
3776 cupsFilePuts(fp, " VariablePaperSize Yes\n"); in write_file()
3783 cupsFilePrintf(fp, " HWMargins %.2f %.2f %.2f %.2f\n", in write_file()
3788 cupsFilePrintf(fp, " MinSize %.2f %.2f\n", d->min_width, d->min_length); in write_file()
3789 cupsFilePrintf(fp, " MaxSize %.2f %.2f\n", d->max_width, d->max_length); in write_file()
3793 cupsFilePuts(fp, "}\n"); in write_file()
3797 cupsFileClose(fp); in write_file()