home *** CD-ROM | disk | FTP | other *** search
- /**
- *
- * Name stbfold -- Fold character to upper case in national
- * character set
- *
- * Synopsis outch = stbfold(ch,pinfo);
- *
- * char outch The resulting character
- * int ch The character before folding
- * COUNTRY_INFO *pinfo
- * Pointer to structure with country info
- *
- * Description This function converts a character into "upper case"
- * taking into account DOS's information about national
- * character sets. pinfo must point to a COUNTRY_INFO
- * structure in the format returned by QYGCOUN: in
- * particular, the cmap member of the structure must point
- * to a valid function to do the mapping. (This may not be
- * true if the structure was filled by DOS 2.x, or if
- * QYGCOUN reported an error.)
- *
- * Returns outch Character folded to upper case.
- *
- * Version 3.0 (C)Copyright Blaise Computing Inc. 1986
- *
- **/
-
- #include <ctype.h>
-
- #include <bstring.h>
-
- char stbfold(ch,pinfo)
- char ch;
- COUNTRY_INFO *pinfo;
- {
- return (((unsigned char) ch) <= 0x7f)
- ? ((char) toupper(ch))
- : casemap(ch,&(pinfo->cmap));
- }