home *** CD-ROM | disk | FTP | other *** search
- .Na "dbstrcpy"
- .Aa
- .Fu
- Copy a portion of the command buffer.
- .Ih "command buffer, copying a portion of"
- .Ih "debugging"
- .Sy
- .Sf "RETCODE dbstrcpy(dbproc, start, numbytes, dest)"
- .Sp "DBPROCESS" "*dbproc"
- .Sp "int" "start"
- .Sp "int" "numbytes"
- .Sp "char" "*dest"
- .Co
- .Bl
- .I "dbstrcpy()"
- copies a portion of the command buffer to a program variable.
- The copy is null-terminated.
- .Bl
- Internally,
- the command buffer is a linked list of non-null-terminated text strings.
- .I "dbgetchar(), dbstrcpy(),"
- and
- .I "dbstrlen()"
- together provide a way to locate and copy parts of the command buffer.
- .Bl
- .I "dbstrcpy()"
- assumes that the destination is large enough to receive the
- source string. If not, a segmentation fault is likely.
- .Bz
- .Pa
- .Pi dbproc
- A pointer to the DBPROCESS structure that provides the connection
- for a particular front-end/\*S process. It contains all the
- information that \*L uses to manage communications and data between the
- front end and \*S.
- .Pi start
- Indicates which character in the command buffer to start copying from.
- The first character is the 0'th character.
- If \f2start\f1 is greater than the length of the command buffer,
- \f2dbstrcpy()\f1 inserts
- a null terminator at dest[0].
- .Pi numbytes
- The number of characters to copy. If
- .I numbytes
- is -1, \f2dbstrcpy()\f1 will copy as many bytes as possible.
- It is legal to copy 0 bytes, in which case
- \f2dbstrcpy()\f1 inserts a null
- terminator at dest[0]. If there are not
- .I numbytes
- available to copy, \f2dbstrcpy()\f1 copies the number of bytes available
- and returns SUCCEED.
- .Pi dest
- A pointer to the data space to copy the source string into.
- .in -.375i
- .Re
- .br
- SUCCEED or FAIL.
- \f2dbstrcpy()\f1 returns FAIL if
- .I start
- is negative.
- .Sa
- dbcmd,
- dbfcmd,
- dbfreebuf,
- dbgetchar,
- dbstrlen
-