File:  [OS/2 SDKs] / pmsdk / samples / opendlg / tool.c
Revision 1.1.1.1 (vendor branch): download - view: text, annotated - select for diffs
Thu Aug 9 12:28:17 2018 UTC (7 years, 9 months ago) by root
Branches: msft, MAIN
CVS tags: pmsdk-1989, HEAD
Microsoft OS/2 SDK PM 02-24-1989

/*
    TOOL.C -- Contains commonly used routines and globals
    Created by Microsoft Corporation, 1989
*/

#define NO_DOS
#define NO_GPI
#include "tool.h"


/****************************************************************************\
* This function returns the character following the current one.
\****************************************************************************/

PSZ  FAR PASCAL NextChar (PSZ lpsz)
    { if (*lpsz) return ++lpsz; else return lpsz; }


/****************************************************************************\
* This function returns the character previous to the current one.
\****************************************************************************/

PSZ  FAR PASCAL PrevChar (PSZ lpszStart, PSZ lpszCurrent)
    { if (lpszCurrent > lpszStart) return --lpszCurrent; else return lpszStart; }


/****************************************************************************\
* This function transforms a string to upper case.
\****************************************************************************/

PSZ  FAR PASCAL Upper (PSZ lpsz) {
    PSZ  lpszPtr = lpsz;

    while (*lpszPtr) {
        if (*lpszPtr >= 'a' && *lpszPtr <= 'z') *lpszPtr &= ~0x20;
        lpszPtr++;
        }
    return lpsz;
    }

unix.superglobalmegacorp.com

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