* pqTraceOutputByte1: output a 1-char message to the log */
| 103 | * pqTraceOutputByte1: output a 1-char message to the log |
| 104 | */ |
| 105 | static void |
| 106 | pqTraceOutputByte1(FILE *pfdebug, const char *data, int *cursor) |
| 107 | { |
| 108 | const char *v = data + *cursor; |
| 109 | |
| 110 | /* |
| 111 | * Show non-printable data in hex format, including the terminating \0 |
| 112 | * that completes ErrorResponse and NoticeResponse messages. |
| 113 | */ |
| 114 | if (!isprint((unsigned char) *v)) |
| 115 | fprintf(pfdebug, " \\x%02x", *v); |
| 116 | else |
| 117 | fprintf(pfdebug, " %c", *v); |
| 118 | *cursor += 1; |
| 119 | } |
| 120 | |
| 121 | /* |
| 122 | * pqTraceOutputInt16: output a 2-byte integer message to the log |
no outgoing calls
no test coverage detected