* pqGetnchar: * get a string of exactly len bytes in buffer s, no null termination */
| 170 | * get a string of exactly len bytes in buffer s, no null termination |
| 171 | */ |
| 172 | int |
| 173 | pqGetnchar(char *s, size_t len, PGconn *conn) |
| 174 | { |
| 175 | if (len > (size_t) (conn->inEnd - conn->inCursor)) |
| 176 | return EOF; |
| 177 | |
| 178 | memcpy(s, conn->inBuffer + conn->inCursor, len); |
| 179 | /* no terminating null */ |
| 180 | |
| 181 | conn->inCursor += len; |
| 182 | |
| 183 | return 0; |
| 184 | } |
| 185 | |
| 186 | /* |
| 187 | * pqSkipnchar: |
no outgoing calls
no test coverage detected