Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ isupper(3c) — DG/UX 4.30

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

chrtbl(1)

stdio(3S)

ascii(5)

environ(5)



     ctype(3c)                  DG/UX 4.30                   ctype(3c)



     NAME
          isdigit, isxdigit, islower, isupper, isalpha, isalnum,
          isspace, iscntrl, ispunct, isprint, isgraph, isascii,
          tolower, toupper, toascii, _tolower, _toupper, setchrclass -
          character handling

     SYNOPSIS
          #include <ctype.h>

          int isdigit (c);
          int c;

          . . .

          tolower(c)
          int c;

          . . .

          int setchrclass (chrclass)
          char *chrclass;

     DESCRIPTION
          The character classification macros listed below return
          nonzero for true and zero for false.  isascii is defined on
          all integer values; the rest are defined on valid members of
          the character set and on the single value EOF [see
          stdio(3S)] (guaranteed not to be a character set member).

          isdigit        tests for the digits 0 through 9.

          isxdigit       tests for any character for which isdigit is
                         true or for the letters a through f or A
                         through F.

          islower        tests for any lowercase letter as defined by
                         the character set.

          isupper        tests for any uppercase letter as defined by
                         the character set.

          isalpha        tests for any character for which islower or
                         isupper is true and possibly any others as
                         defined by the character set.

          isalnum        tests for any character for which isalpha or
                         isdigit is true.

          isspace        tests for a space, horizontal-tab, carriage
                         return, newline, vertical-tab, or form-feed.

          iscntrl        tests for ``control characters'' as defined



     Licensed material--property of copyright holder(s)         Page 1





     ctype(3c)                  DG/UX 4.30                   ctype(3c)



                         by the character set.

          ispunct        tests for any character other than the ones
                         for which isalnum, iscntrl, or isspace is
                         true or space.

          isprint        tests for a space or any character for which
                         isalnum or ispunct is true or other
                         ``printing character'' as defined by the
                         character set.

          isgraph        tests for any character for which isprint is
                         true, except for space.

          isascii        tests for an ASCII character (a non-negative
                         number less than 0200.)

          The conversion functions and macros translate a character
          from lowercase (uppercase) to uppercase (lowercase).

          tolower        if the character is one for which isupper is
                         true and there a corresponding lowercase
                         character, tolower returns the corresponding
                         lowercase character.  Otherwise, the
                         character is returned unchanged.

          toupper        if the character is one for which islower is
                         true and there is a corresponding uppercase
                         character, toupper returns the corresponding
                         uppercase character.  Otherwise, the
                         character is returned unchanged.

          toascii        turns off the bits that are not part of the
                         ASCII character set.

          _tolower       returns the lowercase representation of a
                         character for which isupper is true,
                         otherwise undefined.

          _toupper       returns the uppercase representation of a
                         character for which islower is true,
                         otherwise undefined.

          The conversion macros have the same functionality of the
          functions on valid input, but the macros are faster because
          they do not do range checking.

          All the character classification macros and the conversion
          functions and macros do a table lookup.

          setchrclass initializes the table used by these functions
          and macros to a specific character classification set.



     Licensed material--property of copyright holder(s)         Page 2





     ctype(3c)                  DG/UX 4.30                   ctype(3c)



          setchrclass uses the value of its argument or the value of
          the environment variable CHRCLASS as the name of the
          datafile containing the information for the desired
          character set. These datafiles are searched for in the
          special directory /lib/chrclass.

          If chrclass is (char *)0, the value of the environment
          variable CHRCLASS is used. If CHRCLASS is not set or is
          undefined, the table retains its current value, which at
          initialization time is ascii.

     FILES
          /lib/chrclass  - directory containing the datafiles for
          setchrclass

     SEE ALSO
          chrtbl(1), stdio(3S), ascii(5), environ(5).

     DIAGNOSTICS
          If the argument to any of the character handling macros is
          not in the domain of the function, the result is undefined.

          If setchrclass does not successfully fill the table, the
          table will not change (initially ``ascii'') and -1 is
          returned.  If everything works, setchrclass returns 0.






























     Licensed material--property of copyright holder(s)         Page 3



Typewritten Software • bear@typewritten.org • Edmonds, WA 98026