Return a pointer to a character in the command buffer.
char *dbgetchar(dbproc, n) DBPROCESS *dbproc; int n;
A pointer to the DBPROCESS structure that provides the connection for a particular front-end/server process. It contains all the information that DB-Library uses to manage communications and data between the front end and server.
The position of the desired character in the command buffer. The first character position is 0.
dbgetchar returns a pointer to the nth character in the command buffer. If n is not in range, dbgetchar returns NULL.
You can use dbgetchar to retrieve a pointer to a particular character in the command buffer. dbgetchar returns a pointer to a character in the command buffer whose position is indicated by n. The first character has position 0.
Internally, the command buffer is a linked list of non-null-terminated text strings. dbgetchar, dbstrcpy, and dbstrlen together provide a way to locate and copy parts of the command buffer.
Since the command buffer is not just one large text string, but rather a linked list of text strings, you must use dbgetchar to index through the buffer. If you just get a pointer using dbgetchar and then increment it yourself, it will probably fall off the end of a string and cause a segmentation fault.