home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / i18nv104.zip / SAMPLE / IO / READ.ME < prev   
Text File  |  1996-02-13  |  4KB  |  118 lines

  1.  
  2. ===============================================================================
  3.                   Internationalization (I18N) For OS/2                 
  4. ===============================================================================
  5.  
  6.                 Copyright IBM Corporation -- 1993, 1994, 1995
  7.  
  8. DISCLAIMER: This package is not a full implementation of the X/Open XPG4 
  9. specification and does not make any claims of XPG4 branding. It implements 
  10. only the portions of the XPG4 specification which deal with 
  11. internationalization.
  12.  
  13. X/Open is a trademark of the X/Open Company Limited.
  14.  
  15. ===============================================================================
  16.  
  17.  
  18. /************************/
  19. /***     Contents     ***/
  20. /************************/
  21.  
  22. 1.  Overview
  23. 2.  Files in this directory
  24. 3.  How to run the sample program
  25. 4.  How to compile the sample program
  26. 5.  Notes
  27.  
  28.  
  29. 1.  Overview
  30. ============
  31.  
  32. The sample program in this directory demonstrates the use of the basic IO
  33. functions for wide characters and strings.  Specifically, the following APIs
  34. are used:  fgetwc, fgetws, fputwc, fputws, getwc, putwc, ungetwc, getwchar,
  35. and putwchar.
  36.  
  37. These functions are used to put and get wide characters and strings from
  38. stdin, stdout, and files.  More sophisticated get/put functions are
  39. demonstrated in the "scan" sample program.
  40.  
  41. The sample program in this directory creates a file "OUTPUT", and then reads
  42. from it.  If you delete the file from disk, running the program will create
  43. it again.
  44.  
  45.  
  46. 2.  Files in this directory
  47. ===========================
  48.  
  49. File            Purpose
  50. ------------------------------------------------------------------------------
  51. io.c            Source code for the io sample program.
  52. io.def          Definition file needed for compiling the program.
  53. io.mak          Make file used to compile the sample.
  54. io.exe          Compiled version of the io sample.
  55.  
  56. OUTPUT          Output from executing the program.
  57. build.cmd       A command file which will compile and link the sample program.
  58. read.me         This file.
  59.  
  60.  
  61. 3.  How to run the sample program
  62. =================================
  63.  
  64. The following steps show how the program can be run.
  65.  
  66.      1) Run the \i18n\bin\new_vars command file (or have the environment
  67.         variables already set).
  68.  
  69.      2) Execute the io.exe program.
  70.  
  71.           Ex:   io
  72.  
  73.      3) This program requires you to enter a character.  Assuming that you
  74.         enter the character 'j', the output from the program should be:
  75.  
  76.           Demonstrate the 'put' functions for wchar_t:
  77.           String: A wchar_t string!
  78.  
  79.           Demonstrate the 'get' functions for wchar_t:
  80.           Reading the first line from the file: A wchar_t string!
  81.  
  82.           Next 10 wchar_t from file: ?Another w
  83.  
  84.           Please enter a character, and then press <ENTER>:
  85.           The character entered was: j
  86.  
  87.      4) The contents of the 'OUTPUT' file should be:
  88.  
  89.           A wchar_t string!
  90.           Another wchar_t string to put in the file!
  91.  
  92.      5) Alter the program as desired to see how the APIs work.
  93.  
  94.  
  95. 4.  How to compile the sample program
  96. =====================================
  97.  
  98. NOTE: The sample program is already compiled for you.  If you want to see the
  99.  behavior of the program, you can just run it.  The following instructions
  100.  are needed only if you want to modify the program and recompile it.
  101.  
  102. To compile the sample application:
  103.  
  104.      1) Make sure that the CSET/2 compiler and OS/2 toolkit are installed
  105.         correctly on your system.
  106.  
  107.      2) cd to the directory which contains the info source files.
  108.  
  109.      3) Type "build" at the command prompt.
  110.  
  111.  
  112. 5.  Notes
  113. =========
  114.  
  115. 1. Note that this sample program is compiled with the /Gm option.  This is a
  116.    requirement of the APIs involved.  Make sure that your programs are compiled
  117.    with this option.
  118.