Annotation of os2sdk/demos/apps/lqh/stringsc.c, revision 1.1

1.1     ! root        1: /****************************************************************************
        !             2: 
        !             3:     PROGRAM: strings.c
        !             4: 
        !             5:     PURPOSE: Contains C string handling functions
        !             6: 
        !             7:     FUNCTIONS:
        !             8:         Dstrcpy(PSZ, PSZ);                    string copy
        !             9:         Dstrcat(PSZ, PSZ);                    string concatenation
        !            10: 
        !            11: ****************************************************************************/
        !            12: 
        !            13: #define INCL_BASE           /* Includes all of the OS/2 base        */
        !            14: 
        !            15: #include <os2.h>            /* OS/2 include file                    */
        !            16: #include "lqhdll.h"           /* general-purpose defines and typedefs */
        !            17: 
        !            18: /****************************************************************************
        !            19: 
        !            20:     FUNCTION:
        !            21:         Dstrcpy(PSZ, PSZ);
        !            22: 
        !            23:     PURPOSE: Copies the second string to the first string
        !            24: 
        !            25:     COMMENTS:
        !            26:         This is similar to the C run-time version of strcpy(). The difference
        !            27:         is that it requires a far pointer to the strings, and it does not
        !            28:         return the address of the destination string.
        !            29: 
        !            30: ****************************************************************************/
        !            31: 
        !            32: VOID FAR PASCAL Dstrcpy(pszTo, pszFrom)
        !            33: PSZ pszTo, pszFrom;
        !            34: {
        !            35:     while (*pszTo++ = *pszFrom++);
        !            36: }
        !            37: 
        !            38: /****************************************************************************
        !            39: 
        !            40:     FUNCTION:
        !            41:         Dstrcat(PSZ, PSZ);
        !            42: 
        !            43:     PURPOSE: Copies the second string to the end of the first string
        !            44: 
        !            45:     COMMENTS:
        !            46:         This is similar to the C run-time version of strcat(). The difference
        !            47:         is that it requires a far pointer to the strings, and it does not
        !            48:         return the address of the destination string.
        !            49: 
        !            50: ****************************************************************************/
        !            51: 
        !            52: VOID FAR PASCAL Dstrcat(pszTo, pszFrom)
        !            53: PSZ pszTo, pszFrom;
        !            54: {
        !            55:     pszTo += Dstrlen(pszTo);
        !            56:     while (*pszTo++ = *pszFrom++);
        !            57: }

unix.superglobalmegacorp.com

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