Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ conv(S) — System V/386 Software Development System 3.2.2b

Media Vault

Software Library

Restoration Projects

Artifacts Sought



     CONV(S)                   UNIX System V                   CONV(S)



     Name
          conv, toupper, tolower, toascii - translates characters

     Syntax
          #include <ctype.h>

          int toupper (c)
          int c;

          int tolower (c)
          int c;

          int _toupper (c)
          int c;

          int _tolower (c)
          int c;

          int toascii (c)
          int c;

     Description
          toupper and tolower convert the argument c to a letter of
          opposite case.  Arguments may be the integers -1 through 255
          (the same values returned by getc(S)).  If the argument of
          toupper represents a lowercase letter, the result is the
          corresponding uppercase letter.  If the argument of tolower
          represents an uppercase letter, the result is the
          corresponding lowercase letter.  All other arguments are
          returned unchanged.

          _toupper and _tolower are macros that accomplish the same
          thing as toupper and tolower but have restricted argument
          values and are faster.  _toupper requires a lowercase letter
          as its argument; its result is the corresponding uppercase
          letter.  _tolower requires an uppercase letter as its
          argument; its result is the corresponding lowercase letter.
          All other arguments cause unpredictable results.

          toascii converts integer values to ASCII characters.  The
          function clears all bits of the integer that are not part of
          a standard ASCII character; it is intended for compatibility
          with other systems.

     See Also
          ctype(S)

     Notes
          Because _toupper and _tolower are implemented as macros,
          they should not be used where unwanted side effects may
          occur.  Removing the _toupper and _tolower macros with the
          #undef directive causes the corresponding library functions
          to be linked instead.  This allows any arguments to be used
          without worry about side effects.

     Standards Conformance
          toascii is conformant with:
          AT&T SVID Issue 2, Select Code 307-127.

          tolower and toupper are conformant with:
          AT&T SVID Issue 2, Select Code 307-127;
          The X/Open Portability Guide II of January 1987;
          ANSI X3.159-198X C Language Draft Standard, May 13,
          1988;
          IEEE POSIX Std 1003.1-1988 with C Standard Language-
          Dependent System Support;
          and NIST FIPS 151-1.

                                                (printed 6/20/89)



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