Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ fkverify(3K) — Reliant UNIX 5.44c4

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

fkcode(3K)

fkconv(3K)

ftell(3S)

fkverify(3K)                      2/4/92                       fkverify(3K)

NAME
     fkverify - validate a kanji code stream

SYNOPSIS
     cc [flag...] file... -lkanji [library...]

     #include <mlx-j/kanji.h>

     int fkverify(FILE *stream, FILE *save, int ifmt, int shift);

DESCRIPTION
     fkverify checks  if  an  input  stream  contains  invalid  kanji  byte
     sequences.

     stream is the input stream  to  be  examined.  It  must  be  open  for
     reading.

     save is a stream open for writing,  and  input  read  from  stream  is
     written to save. This is useful if the input is connected to a pipe or
     a device which cannot be rewound. save may be set to NULL if  consumed
     input does not need to be saved.

     ifmt indicates the encoding to be verified and may take the  following
     values:

          KJJIS       - (New) JIS
          KJOJIS      - Old JIS
          KJNECJIS   - NEC-JIS
          KJSJIS      - Shift-JIS
          KJEUC       - Extended UNIX Code

     If  ifmt  indicates  one  of  the  7-bit  codes  (KJJIS,  KJOJIS  or
     KJNECJIS),  shift  must be set to 1 if the input stream is initially
     in shifted-in mode. A value of 0 indicates that the  input  stream  is
     initially  in  shifted-out  mode. shift is ignored for other values of
     ifmt.

RETURN VALUE
     fkverify returns -1  if  an  I/O  error  occurs  on  stream  or  save.
     Otherwise,  if  no invalid byte sequence is detected, the return value
     is the value of ifmt. If the input stream  contains  an  invalid  byte
     sequence, the return value is KJUNKNOWN.

NOTES
     Neither stream nor save are rewound when fkverify returns.

     7-bit input streams must be in shifted-out mode at  EOF  in  order  to
     pass verification.

     If fkverify finds an invalid byte sequence in the  input,  the  stream
     file  pointer  may be examined to determine where the problem occured.
     It points at the byte following the one  that  caused  the  error.  If



Page 1                       Reliant UNIX 5.44                       2, 194

fkverify(3K)                      2/4/92                       fkverify(3K)

     stream  is positioned at EOF after the call, either the last byte read
     was invalid, or the verification failed due to a  truncated  character
     or escape sequence. If the input is in a 7-bit encoding, and stream is
     positioned at EOF after the call, the failure may also  be  due  to  a
     missing shift-out sequence.

     fkverify gives incorrect results if the input stream is not aligned on
     a character boundary.

FILES
     /usr/lib/libkanji.a

SEE ALSO
     fkcode(3K), fkconv(3K), ftell(3S).








































Page 2                       Reliant UNIX 5.44                       2, 194

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