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