/*static char *SCCSID = "@(#)pr_strng.h	6.2 91/01/14";*/
/*	SCCSID = "@(#)pr_strng.h	6.2 91/01/14"
 *
 *	IBM/Microsoft Confidential
 *
 *	Copyright (c) IBM Corporation 1987, 1989
 *	Copyright (c) Microsoft Corporation 1987, 1989
 *
 *	All Rights Reserved
 *
 */

/*
 *  PR_STRNG.H
 *
 *    DESCRIPTION
 *    
 *      Prototype for string functions.
 *
 *
 *  REVISION HISTORY (in reverse chronological order)
 *  -----------------------------------------------------------------------
 *  12/14/89    Brian Andrew    Added function CopyVersionToNumber, this 
 *                              an enhanced version of VersionToNumber
 * 
 *  11/17/89    Brian Andrew    Added macro to copy and null terminate
 *                                  string.
 *  8/4/89      Brian Andrew    Initial Blank Template
 *
 *
 *  TO DO
 *  -------------------------------------------------------------------------
 */

/* Prototype for all string functions */

extern USHORT istrlen (UCHAR FAR *sz);

extern VOID    CopyNullTerm (
					PCHAR       pcDest,
					PCHAR       pcSrc,
					USHORT      cbLen,
					USHORT      fConvert);

extern VOID    AppendNull (
					PCHAR      szString,     
					USHORT     cbMaxLen);     

extern SHORT VersionToNumber (
					PCHAR       pcSrc,
					USHORT      cbBytes);

extern SHORT CopyVersionToNumber (
					PCHAR       pcDst,
					PCHAR       pcSrc,
					USHORT      cbBytes,
					PUSHORT     pusVerLen);

extern VOID CopyNumberToString (
					PCHAR       pcString,
					USHORT      usNum);
				
extern USHORT  DecimalToASCII (
					PCHAR   pcDest,
					ULONG   ulSource,
					BOOL    fAppendNull);

/* MACROS */

/*
 *  CopyWithNull ()     This macro copies 'cbBytes' to a destination
 *                      string from a source string.  It then appends
 *                      a Null byte.
 */

#define CopyWithNull(pcDest, pcSrc, cbLen)   \
	memcpy ((PCHAR) pcDest, (PCHAR) pcSrc, cbLen);  \
	*(((PCHAR) pcDest) + cbLen) = '\0'


