| 1064 | } |
| 1065 | |
| 1066 | bool Translator::FormatString(char *buffer, |
| 1067 | size_t maxlength, |
| 1068 | const char *format, |
| 1069 | IPhraseCollection *pPhrases, |
| 1070 | void **params, |
| 1071 | unsigned int numparams, |
| 1072 | size_t *pOutLength, |
| 1073 | const char **pFailPhrase) |
| 1074 | { |
| 1075 | unsigned int arg; |
| 1076 | |
| 1077 | arg = 0; |
| 1078 | if (!gnprintf(buffer, maxlength, format, pPhrases, params, numparams, arg, pOutLength, pFailPhrase)) |
| 1079 | { |
| 1080 | return false; |
| 1081 | } |
| 1082 | |
| 1083 | if (arg != numparams) |
| 1084 | { |
| 1085 | if (pFailPhrase != NULL) |
| 1086 | { |
| 1087 | *pFailPhrase = NULL; |
| 1088 | } |
| 1089 | return false; |
| 1090 | } |
| 1091 | |
| 1092 | return true; |
| 1093 | } |
no test coverage detected