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

Function _cupsMessageLookup

cups/language.c:1134–1156  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1132 */
1133
1134const char * /* O - Localized message */
1135_cupsMessageLookup(cups_array_t *a, /* I - Message array */
1136 const char *m) /* I - Message */
1137{
1138 _cups_message_t key, /* Search key */
1139 *match; /* Matching message */
1140
1141
1142 DEBUG_printf(("_cupsMessageLookup(a=%p, m=\"%s\")", (void *)a, m));
1143
1144 /*
1145 * Lookup the message string; if it doesn't exist in the catalog,
1146 * then return the message that was passed to us...
1147 */
1148
1149 key.msg = (char *)m;
1150 match = (_cups_message_t *)cupsArrayFind(a, &key);
1151
1152 if (match && match->str)
1153 return (match->str);
1154 else
1155 return (m);
1156}
1157
1158
1159/*

Callers 2

ppd_put_stringFunction · 0.85
_cupsLangStringFunction · 0.85

Calls 1

cupsArrayFindFunction · 0.85

Tested by

no test coverage detected