File:  [OS/2 SDKs] / os2sdk / demos / apps / lqh / stringsc.c
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Thu Aug 9 12:26:06 2018 UTC (7 years, 9 months ago) by root
Branches: msft, MAIN
CVS tags: os2sdk-1988, HEAD
Microsoft OS/2 SDK 03-01-1988

/****************************************************************************

    PROGRAM: strings.c

    PURPOSE: Contains C string handling functions

    FUNCTIONS:
        Dstrcpy(PSZ, PSZ);                    string copy
        Dstrcat(PSZ, PSZ);                    string concatenation

****************************************************************************/

#define INCL_BASE           /* Includes all of the OS/2 base        */

#include <os2.h>            /* OS/2 include file                    */
#include "lqhdll.h"           /* general-purpose defines and typedefs */

/****************************************************************************

    FUNCTION:
        Dstrcpy(PSZ, PSZ);

    PURPOSE: Copies the second string to the first string

    COMMENTS:
        This is similar to the C run-time version of strcpy(). The difference
        is that it requires a far pointer to the strings, and it does not
        return the address of the destination string.

****************************************************************************/

VOID FAR PASCAL Dstrcpy(pszTo, pszFrom)
PSZ pszTo, pszFrom;
{
    while (*pszTo++ = *pszFrom++);
}

/****************************************************************************

    FUNCTION:
        Dstrcat(PSZ, PSZ);

    PURPOSE: Copies the second string to the end of the first string

    COMMENTS:
        This is similar to the C run-time version of strcat(). The difference
        is that it requires a far pointer to the strings, and it does not
        return the address of the destination string.

****************************************************************************/

VOID FAR PASCAL Dstrcat(pszTo, pszFrom)
PSZ pszTo, pszFrom;
{
    pszTo += Dstrlen(pszTo);
    while (*pszTo++ = *pszFrom++);
}

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.