| 1143 | */ |
| 1144 | |
| 1145 | static int /* O - 1 if set, 0 otherwise */ |
| 1146 | cups_apple_get_string( |
| 1147 | CFStringRef key, /* I - Key (name) */ |
| 1148 | char *value, /* O - String value */ |
| 1149 | size_t valsize) /* I - Size of value buffer */ |
| 1150 | { |
| 1151 | CFStringRef sval; /* String value */ |
| 1152 | |
| 1153 | |
| 1154 | if ((sval = CFPreferencesCopyAppValue(key, kCUPSPrintingPrefs)) != NULL) |
| 1155 | { |
| 1156 | Boolean result = CFStringGetCString(sval, value, (CFIndex)valsize, kCFStringEncodingUTF8); |
| 1157 | |
| 1158 | CFRelease(sval); |
| 1159 | |
| 1160 | if (result) |
| 1161 | return (1); |
| 1162 | } |
| 1163 | |
| 1164 | return (0); |
| 1165 | } |
| 1166 | #endif /* __APPLE__ */ |
| 1167 | |
| 1168 |
no outgoing calls
no test coverage detected