| 1132 | */ |
| 1133 | |
| 1134 | const 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 | /* |
no test coverage detected