Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ NLescstr(3) — AIX/RT 2.2.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

ctype

getc, fgetc, getchar, getw

NCctype

NCstring

NLchar

NLstring

display symbols

     NLescstr, NLunescstr, NLflatstr

Purpose

     Translates strings of characters.

Library

     Standard C Library (libc.a)

Syntax

     #include <ctype.h>

     int NLescstr (src, dest, dlen)     |      int NLunescstr (src, dest, dlen)
     char *src, *dest;                  |      char *src, *dest;
     int dlen;                          |      int dlen;

     int NLflatstr (src, dest, dlen)
     char *src, *dest;
     int dlen
     Description

     These  subroutines use  the  subroutines described  under
     "conv" to convert an entire  string of type char, perhaps
     containing  extended characters,  into a  string of  pure
     ASCII  bytes.  Each  of these  subroutines require  three
     parameters:  the  src address  of the source  string, the
     dest  address of  the  destination string,  and the  dlen
     value, giving the total number  of bytes available in the
     destination string.   Each writes a result  string termi-
     nated  by a  null  character and  returns  its length  in
     bytes.  The dlen value should  include space for the null
     character.  If  dest is too  short to contain  the entire
     output string, not all of src is translated.

     The NLescstr uses the  NCesc subroutine to translate each
     ASCII or extended  character in src to  pure ASCII.  Each
     extended character encountered is  translated to a print-
     able ASCII  escape sequence that uniquely  identifies the
     extended character.  See "display  symbols" for a list of
     these escape sequences.

     The  NLunescstr subroutine  performs  the inverse  trans-
     lation  using the  NCunesc subroutine  to translate  each
     ASCII byte  of src  into dest,  and translate  each ASCII
     escape  sequence  back  into the  extended  character  it
     represents.

     The NLflatstr subroutine uses the NCflatchr subroutine to
     translate each character, ASCII or  extended, in src to a
     single  ASCII byte  in dest.   The dest  string may  have
     fewer  bytes  than the  src  string,  but the  number  of
     logical characters,  or the display length,  is the same.
     See "NLstring."

     Related Information

     In this  book:  "ctype,"  "getc, fgetc,  getchar, getw,"
     "NCctype,"   "NCstring,"    "NLchar,"   "NLstring,"   and
     "display symbols."

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