home *** CD-ROM | disk | FTP | other *** search
-
- 1 Version 4.0 -- 5/1/89 dbstrcpy
- ______________________________________________________________________
-
- NAME: dbstrcpy
-
- FUNCTION:
- Copy a portion of the command buffer.
-
- SYNTAX:
- RETCODE dbstrcpy(dbproc, start, numbytes, dest)
-
- DBPROCESS *dbproc;
- int start;
- int numbytes;
- char *dest;
-
-
-
-
-
-
-
- dbstrcpy Version 4.0 -- 5/1/89 2
- ______________________________________________________________________
-
- COMMENTS:
-
- o dbstrcpy() copies a portion of the command buffer to a program
- variable. The copy is null-terminated.
- o 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.
-
- o dbstrcpy() assumes that the destination is large enough to
- receive the source string. If not, a segmentation fault is
- likely.
-
- PARAMETERS:
- dbproc - A pointer to the DBPROCESS structure that provides the
- connection for a particular front-end/SQL Server process. It
- contains all the information that DB-Library uses to manage
-
-
- 3 Version 4.0 -- 5/1/89 dbstrcpy
- ______________________________________________________________________
- communications and data between the front end and SQL Server.
- start - Indicates which character in the command buffer to start
- copying from. The first character is the 0'th character. If
- start is greater than the length of the command buffer,
- dbstrcpy() inserts a null terminator at dest[0].
- numbytes - The number of characters to copy. If numbytes is -1,
- dbstrcpy() will copy as many bytes as possible. It is legal
- to copy 0 bytes, in which case dbstrcpy() inserts a null ter-
- minator at dest[0]. If there are not numbytes available to
- copy, dbstrcpy() copies the number of bytes available and
- returns SUCCEED.
- dest - A pointer to the data space to copy the source string
- into.
-
- RETURNS:
- SUCCEED or FAIL. dbstrcpy() returns FAIL if start is negative.
-
-
-
-
- dbstrcpy Version 4.0 -- 5/1/89 4
- ______________________________________________________________________
-
- SEE ALSO:
- dbcmd, dbfcmd, dbfreebuf, dbgetchar, dbstrlen
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-