|
|
1.1 root 1: /*
2: TOOL.C -- Contains commonly used routines and globals
3: Created by Microsoft Corporation, 1989
4: */
5:
6: #define NO_DOS
7: #define NO_GPI
8: #include "tool.h"
9:
10:
11: /****************************************************************************\
12: * This function returns the character following the current one.
13: \****************************************************************************/
14:
15: PSZ FAR PASCAL NextChar (PSZ lpsz)
16: { if (*lpsz) return ++lpsz; else return lpsz; }
17:
18:
19: /****************************************************************************\
20: * This function returns the character previous to the current one.
21: \****************************************************************************/
22:
23: PSZ FAR PASCAL PrevChar (PSZ lpszStart, PSZ lpszCurrent)
24: { if (lpszCurrent > lpszStart) return --lpszCurrent; else return lpszStart; }
25:
26:
27: /****************************************************************************\
28: * This function transforms a string to upper case.
29: \****************************************************************************/
30:
31: PSZ FAR PASCAL Upper (PSZ lpsz) {
32: PSZ lpszPtr = lpsz;
33:
34: while (*lpszPtr) {
35: if (*lpszPtr >= 'a' && *lpszPtr <= 'z') *lpszPtr &= ~0x20;
36: lpszPtr++;
37: }
38: return lpsz;
39: }
This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.