changes to dblib.c

Mark J. Lilback mark at lilback.com
Mon Mar 26 16:20:20 EST 2001


Here's some code to implement two unimplemented functions in dblib.c.


int dbstrlen(DBPROCESS *dbproc)
{
	return dbproc->dbbufsz;
}
RETCODE dbstrcpy(DBPROCESS *dbproc, int start, int numbytes, char *dest)
{
	dest[0] = 0; /* start with empty string being returned */
	if (0 < dbproc->dbbufsz) {
		strncpy(dest, (char*)&dbproc->dbbuf[start], numbytes);
	}
	return SUCCEED;
}

-- 

__________________________________________________________________________
                                          "The best assumption to have
Mark J. Lilback                           is that any commonly held
<mark at lilback.com>                        belief is wrong." -- Ken Olsen,
http://www.lilback.com/                   founder, Digital Equip. Corp.



More information about the FreeTDS mailing list