
===============================================================================
                  Internationalization (I18N) For OS/2                 
===============================================================================

                Copyright IBM Corporation -- 1993, 1994, 1995

DISCLAIMER: This package is not a full implementation of the X/Open XPG4 
specification and does not make any claims of XPG4 branding. It implements 
only the portions of the XPG4 specification which deal with 
internationalization.

X/Open is a trademark of the X/Open Company Limited.

===============================================================================


/************************/
/***     Contents     ***/
/************************/

1.  Overview
2.  Files in this directory
3.  How to run the sample program
4.  How to compile the sample program
5.  Notes


1.  Overview
============

The sample program in this directory demonstrates the use of the basic IO
functions for wide characters and strings.  Specifically, the following APIs
are used:  fgetwc, fgetws, fputwc, fputws, getwc, putwc, ungetwc, getwchar,
and putwchar.

These functions are used to put and get wide characters and strings from
stdin, stdout, and files.  More sophisticated get/put functions are
demonstrated in the "scan" sample program.

The sample program in this directory creates a file "OUTPUT", and then reads
from it.  If you delete the file from disk, running the program will create
it again.


2.  Files in this directory
===========================

File            Purpose
------------------------------------------------------------------------------
io.c            Source code for the io sample program.
io.def          Definition file needed for compiling the program.
io.mak          Make file used to compile the sample.
io.exe          Compiled version of the io sample.

OUTPUT          Output from executing the program.
build.cmd       A command file which will compile and link the sample program.
read.me         This file.


3.  How to run the sample program
=================================

The following steps show how the program can be run.

     1) Run the \i18n\bin\new_vars command file (or have the environment
        variables already set).

     2) Execute the io.exe program.

          Ex:   io

     3) This program requires you to enter a character.  Assuming that you
        enter the character 'j', the output from the program should be:

          Demonstrate the 'put' functions for wchar_t:
          String: A wchar_t string!

          Demonstrate the 'get' functions for wchar_t:
          Reading the first line from the file: A wchar_t string!

          Next 10 wchar_t from file: ?Another w

          Please enter a character, and then press <ENTER>:
          The character entered was: j

     4) The contents of the 'OUTPUT' file should be:

          A wchar_t string!
          Another wchar_t string to put in the file!

     5) Alter the program as desired to see how the APIs work.


4.  How to compile the sample program
=====================================

NOTE: The sample program is already compiled for you.  If you want to see the
 behavior of the program, you can just run it.  The following instructions
 are needed only if you want to modify the program and recompile it.

To compile the sample application:

     1) Make sure that the CSET/2 compiler and OS/2 toolkit are installed
        correctly on your system.

     2) cd to the directory which contains the info source files.

     3) Type "build" at the command prompt.


5.  Notes
=========

1. Note that this sample program is compiled with the /Gm option.  This is a
   requirement of the APIs involved.  Make sure that your programs are compiled
   with this option.
