* pqTraceOutputString: output a string message to the log */
| 160 | * pqTraceOutputString: output a string message to the log |
| 161 | */ |
| 162 | static void |
| 163 | pqTraceOutputString(FILE *pfdebug, const char *data, int *cursor, bool suppress) |
| 164 | { |
| 165 | int len; |
| 166 | |
| 167 | if (suppress) |
| 168 | { |
| 169 | fprintf(pfdebug, " \"SSSS\""); |
| 170 | *cursor += strlen(data + *cursor) + 1; |
| 171 | } |
| 172 | else |
| 173 | { |
| 174 | len = fprintf(pfdebug, " \"%s\"", data + *cursor); |
| 175 | |
| 176 | /* |
| 177 | * This is a null-terminated string. So add 1 after subtracting 3 |
| 178 | * which is the double quotes and space length from len. |
| 179 | */ |
| 180 | *cursor += (len - 3 + 1); |
| 181 | } |
| 182 | } |
| 183 | |
| 184 | /* |
| 185 | * pqTraceOutputNchar: output a string of exactly len bytes message to the log |
no outgoing calls
no test coverage detected