MCPcopy Create free account
hub / github.com/OpenPrinting/cups / _ppdCacheCreateWithPPD

Function _ppdCacheCreateWithPPD

cups/ppd-cache.c:1049–2075  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1047 */
1048
1049_ppd_cache_t * /* O - PPD cache and mapping data */
1050_ppdCacheCreateWithPPD(ppd_file_t *ppd) /* I - PPD file */
1051{
1052 int i, j, k; /* Looping vars */
1053 _ppd_cache_t *pc; /* PWG mapping data */
1054 ppd_option_t *input_slot, /* InputSlot option */
1055 *media_type, /* MediaType option */
1056 *output_bin, /* OutputBin option */
1057 *color_model, /* ColorModel option */
1058 *duplex, /* Duplex option */
1059 *ppd_option; /* Other PPD option */
1060 ppd_choice_t *choice; /* Current InputSlot/MediaType */
1061 pwg_map_t *map; /* Current source/type map */
1062 ppd_attr_t *ppd_attr; /* Current PPD preset attribute */
1063 int num_options; /* Number of preset options and props */
1064 cups_option_t *options; /* Preset options and properties */
1065 ppd_size_t *ppd_size; /* Current PPD size */
1066 pwg_size_t *pwg_size; /* Current PWG size */
1067 char pwg_keyword[3 + PPD_MAX_NAME + 1 + 12 + 1 + 12 + 3],
1068 /* PWG keyword string */
1069 ppd_name[PPD_MAX_NAME];
1070 /* Normalized PPD name */
1071 const char *pwg_name; /* Standard PWG media name */
1072 pwg_media_t *pwg_media, /* PWG media data */
1073 pwg_mediatemp; /* Temporary PWG media data */
1074 _pwg_print_color_mode_t pwg_print_color_mode;
1075 /* print-color-mode index */
1076 _pwg_print_quality_t pwg_print_quality;
1077 /* print-quality index */
1078 int similar; /* Are the old and new size similar? */
1079 pwg_size_t *old_size; /* Current old size */
1080 int old_imageable, /* Old imageable length in 2540ths */
1081 old_borderless, /* Old borderless state */
1082 old_known_pwg; /* Old PWG name is well-known */
1083 int new_width, /* New width in 2540ths */
1084 new_length, /* New length in 2540ths */
1085 new_left, /* New left margin in 2540ths */
1086 new_bottom, /* New bottom margin in 2540ths */
1087 new_right, /* New right margin in 2540ths */
1088 new_top, /* New top margin in 2540ths */
1089 new_imageable, /* New imageable length in 2540ths */
1090 new_borderless, /* New borderless state */
1091 new_known_pwg; /* New PWG name is well-known */
1092 pwg_size_t *new_size; /* New size to add, if any */
1093 const char *filter; /* Current filter */
1094 _pwg_finishings_t *finishings; /* Current finishings value */
1095 char msg_id[256]; /* Message identifier */
1096
1097
1098 DEBUG_printf(("_ppdCacheCreateWithPPD(ppd=%p)", ppd));
1099
1100 /*
1101 * Range check input...
1102 */
1103
1104 if (!ppd)
1105 return (NULL);
1106

Callers 10

get_optionsFunction · 0.85
load_ppd_attributesFunction · 0.85
add_printer_filtersFunction · 0.85
add_ppd_filtersFunction · 0.85
load_ppdFunction · 0.85
mainFunction · 0.85
cupsMarkOptionsFunction · 0.85
mainFunction · 0.85
mainFunction · 0.85
mainFunction · 0.85

Calls 15

_cupsMessageNewFunction · 0.85
_cups_strcasecmpFunction · 0.85
pwgMediaForSizeFunction · 0.85
pwg_unppdize_nameFunction · 0.85
pwgFormatSizeNameFunction · 0.85
_pwgMediaNearSizeFunction · 0.85
ppdFindOptionFunction · 0.85
_cups_strncasecmpFunction · 0.85
pwg_add_messageFunction · 0.85
ppdFindAttrFunction · 0.85
_ppdParseOptionsFunction · 0.85
cupsGetOptionFunction · 0.85

Tested by 4

add_ppd_filtersFunction · 0.68
mainFunction · 0.68
mainFunction · 0.68
mainFunction · 0.68