| Absolute File Name: | /home/opencoverage/opencoverage/guest-scripts/coreutils/src/lib/gettext.h |
| Switch to Source code | Preprocessed file |
| Line | Source | Count | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 1 | - | |||||||||||||
| 2 | __inline | - | ||||||||||||
| 3 | - | |||||||||||||
| 4 | - | |||||||||||||
| 5 | - | |||||||||||||
| 6 | - | |||||||||||||
| 7 | - | |||||||||||||
| 8 | static const char * | - | ||||||||||||
| 9 | pgettext_aux (const char *domain, | - | ||||||||||||
| 10 | const char *msg_ctxt_id, const char *msgid, | - | ||||||||||||
| 11 | int category) | - | ||||||||||||
| 12 | { | - | ||||||||||||
| 13 | const char *translation = dcgettext (domain, msg_ctxt_id, category); | - | ||||||||||||
| 14 | if (translation == msg_ctxt_id
| 0 | ||||||||||||
| 15 | return never executed: msgid;return msgid;never executed: return msgid; | 0 | ||||||||||||
| 16 | else | - | ||||||||||||
| 17 | return never executed: translation;return translation;never executed: return translation; | 0 | ||||||||||||
| 18 | } | - | ||||||||||||
| 19 | - | |||||||||||||
| 20 | - | |||||||||||||
| 21 | __inline | - | ||||||||||||
| 22 | - | |||||||||||||
| 23 | - | |||||||||||||
| 24 | - | |||||||||||||
| 25 | - | |||||||||||||
| 26 | - | |||||||||||||
| 27 | static const char * | - | ||||||||||||
| 28 | npgettext_aux (const char *domain, | - | ||||||||||||
| 29 | const char *msg_ctxt_id, const char *msgid, | - | ||||||||||||
| 30 | const char *msgid_plural, unsigned long int n, | - | ||||||||||||
| 31 | int category) | - | ||||||||||||
| 32 | { | - | ||||||||||||
| 33 | const char *translation = | - | ||||||||||||
| 34 | dcngettext (domain, msg_ctxt_id, msgid_plural, n, category); | - | ||||||||||||
| 35 | if (translation == msg_ctxt_id
| 0 | ||||||||||||
| 36 | return never executed: (n == 1 ? msgid : msgid_plural);return (n == 1 ? msgid : msgid_plural);never executed: return (n == 1 ? msgid : msgid_plural); | 0 | ||||||||||||
| 37 | else | - | ||||||||||||
| 38 | return never executed: translation;return translation;never executed: return translation; | 0 | ||||||||||||
| 39 | } | - | ||||||||||||
| 40 | - | |||||||||||||
| 41 | - | |||||||||||||
| 42 | - | |||||||||||||
| 43 | - | |||||||||||||
| 44 | - | |||||||||||||
| 45 | __inline | - | ||||||||||||
| 46 | - | |||||||||||||
| 47 | - | |||||||||||||
| 48 | - | |||||||||||||
| 49 | - | |||||||||||||
| 50 | - | |||||||||||||
| 51 | static const char * | - | ||||||||||||
| 52 | dcpgettext_expr (const char *domain, | - | ||||||||||||
| 53 | const char *msgctxt, const char *msgid, | - | ||||||||||||
| 54 | int category) | - | ||||||||||||
| 55 | { | - | ||||||||||||
| 56 | size_t msgctxt_len = strlen (msgctxt) + 1; | - | ||||||||||||
| 57 | size_t msgid_len = strlen (msgid) + 1; | - | ||||||||||||
| 58 | const char *translation; | - | ||||||||||||
| 59 | - | |||||||||||||
| 60 | char msg_ctxt_id[msgctxt_len + msgid_len]; | - | ||||||||||||
| 61 | { | - | ||||||||||||
| 62 | int found_translation; | - | ||||||||||||
| 63 | memcpy (msg_ctxt_id, msgctxt, msgctxt_len - 1); | - | ||||||||||||
| 64 | msg_ctxt_id[msgctxt_len - 1] = '\004'; | - | ||||||||||||
| 65 | memcpy (msg_ctxt_id + msgctxt_len, msgid, msgid_len); | - | ||||||||||||
| 66 | translation = dcgettext (domain, msg_ctxt_id, category); | - | ||||||||||||
| 67 | found_translation = (translation != msg_ctxt_id); | - | ||||||||||||
| 68 | - | |||||||||||||
| 69 | - | |||||||||||||
| 70 | - | |||||||||||||
| 71 | - | |||||||||||||
| 72 | if (found_translation
| 0 | ||||||||||||
| 73 | return never executed: translation;return translation;never executed: return translation; | 0 | ||||||||||||
| 74 | } | - | ||||||||||||
| 75 | return never executed: msgid;return msgid;never executed: return msgid; | 0 | ||||||||||||
| 76 | } | - | ||||||||||||
| 77 | - | |||||||||||||
| 78 | - | |||||||||||||
| 79 | - | |||||||||||||
| 80 | - | |||||||||||||
| 81 | - | |||||||||||||
| 82 | - | |||||||||||||
| 83 | - | |||||||||||||
| 84 | __inline | - | ||||||||||||
| 85 | - | |||||||||||||
| 86 | - | |||||||||||||
| 87 | - | |||||||||||||
| 88 | - | |||||||||||||
| 89 | - | |||||||||||||
| 90 | static const char * | - | ||||||||||||
| 91 | dcnpgettext_expr (const char *domain, | - | ||||||||||||
| 92 | const char *msgctxt, const char *msgid, | - | ||||||||||||
| 93 | const char *msgid_plural, unsigned long int n, | - | ||||||||||||
| 94 | int category) | - | ||||||||||||
| 95 | { | - | ||||||||||||
| 96 | size_t msgctxt_len = strlen (msgctxt) + 1; | - | ||||||||||||
| 97 | size_t msgid_len = strlen (msgid) + 1; | - | ||||||||||||
| 98 | const char *translation; | - | ||||||||||||
| 99 | - | |||||||||||||
| 100 | char msg_ctxt_id[msgctxt_len + msgid_len]; | - | ||||||||||||
| 101 | { | - | ||||||||||||
| 102 | int found_translation; | - | ||||||||||||
| 103 | memcpy (msg_ctxt_id, msgctxt, msgctxt_len - 1); | - | ||||||||||||
| 104 | msg_ctxt_id[msgctxt_len - 1] = '\004'; | - | ||||||||||||
| 105 | memcpy (msg_ctxt_id + msgctxt_len, msgid, msgid_len); | - | ||||||||||||
| 106 | translation = dcngettext (domain, msg_ctxt_id, msgid_plural, n, category); | - | ||||||||||||
| 107 | found_translation = !(translation == msg_ctxt_id
| 0 | ||||||||||||
| 108 | - | |||||||||||||
| 109 | - | |||||||||||||
| 110 | - | |||||||||||||
| 111 | - | |||||||||||||
| 112 | if (found_translation
| 0 | ||||||||||||
| 113 | return never executed: translation;return translation;never executed: return translation; | 0 | ||||||||||||
| 114 | } | - | ||||||||||||
| 115 | return never executed: (n == 1 ? msgid : msgid_plural);return (n == 1 ? msgid : msgid_plural);never executed: return (n == 1 ? msgid : msgid_plural); | 0 | ||||||||||||
| 116 | } | - | ||||||||||||
| Switch to Source code | Preprocessed file |