home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / i18nv102.zip / SAMPLE / WSTR / READ.ME < prev    next >
Text File  |  1995-09-19  |  5KB  |  129 lines

  1.  
  2. ===============================================================================
  3.                   Internationalization (I18N) For OS/2                 
  4. ===============================================================================
  5.  
  6.                 Copyright IBM Corporation -- 1993, 1994, 1995
  7.  
  8. DISCLAIMER: This I18N package has been made available solely to gauge OS/2
  9. developer interest in the industry standard XPG4 internationalization 
  10. programming model. This does not mean that IBM will introduce a product based
  11. on the contents of this package. This package is not a full implementation of 
  12. the X/Open XPG4 specification and does not make any claims of XPG4 branding. 
  13. It implements only the portions of the XPG4 specification which deal with 
  14. internationalization.
  15.  
  16. X/Open is a trademark of the X/Open Company Limited.
  17.  
  18. ===============================================================================
  19.  
  20.  
  21. /************************/
  22. /***     Contents     ***/
  23. /************************/
  24.  
  25. 1.  Overview
  26. 2.  Files in this directory
  27. 3.  How to run the sample program
  28. 4.  How to compile the sample program
  29.  
  30.  
  31. 1.  Overview
  32. ============
  33.  
  34. The sample program in this directory demonstrates the use of the wide character
  35. string functions.  XPG4 provides a whole set of replacement functions for the
  36. string functions found in <string.h>, but for wide characters.  Functions are
  37. provided for copying, appending, scanning, substringing, tokenizing, getting
  38. the length, and others.
  39.  
  40.  
  41. 2.  Files in this directory
  42. ===========================
  43.  
  44. File            Purpose
  45. ------------------------------------------------------------------------------
  46. wstr.c          Source code for the wstr sample program.
  47. wstr.def        Definition file needed for compiling the program.
  48. wstr.mak        Make file used to compile the sample.
  49. wstr.exe        Compiled version of the wstr sample.
  50.  
  51. build.cmd       A command file which will compile and link the sample program.
  52. read.me         This file.
  53.  
  54.  
  55. 3.  How to run the sample program
  56. =================================
  57.  
  58. The following steps show how the program can be run.
  59.  
  60.      1) Run the \i18n\bin\new_vars command file (or have the environment
  61.         variables already set).
  62.  
  63.      2) Set the value of either LC_ALL or LANG to: en_us (US English).
  64.  
  65.           Ex:   set LANG=en_us
  66.  
  67.      3) Execute the wstr.exe program.
  68.  
  69.           Ex:   wstr
  70.  
  71.      4) The output from the program should be:
  72.  
  73.           Copy and concat functions:
  74.           --------------------------
  75.           Original string: This is a wchar_t string.
  76.           Length of the string is: 25
  77.           Add to end of the string: This is a wchar_t string.  Add this on the
  78.            end!
  79.           Copy the first 6 characters of the string: This i
  80.           Concat 13 characters on the end: This iis an added s
  81.  
  82.           Compare functions:
  83.           ------------------
  84.           Are the two strings the same? No
  85.           Are the first 10 characters of the two strings the same? Yes
  86.  
  87.           Scanning functions:
  88.           -------------------
  89.           Using the string: This is string 1.
  90.           First occurance of 's' is: s is string 1.
  91.           First occurance of ' is' is:  is string 1.
  92.           Last occurance of: 's' is: string 1.
  93.           Scan: 'This is string 1.' for first occurance of: 'stuv': 's
  94.            is string 1.'
  95.  
  96.           Substring length functions:
  97.           ---------------------------
  98.           The first 5 characters of "cabbage" are found in "abc"
  99.           The first 2 characters of "cabbage" are not found in "bde"
  100.  
  101.           Tokenizing functions:
  102.           ---------------------
  103.           Tokenizing: 'This line has spaces,commas,and periods.!' based on: ' '
  104.           Token: This
  105.           Token: line
  106.           Token: has
  107.           Token: spaces
  108.           Token: commas
  109.           Token: and
  110.           Token: periods
  111.           Token: !
  112.  
  113.  
  114. 4.  How to compile the sample program
  115. =====================================
  116.  
  117. NOTE: The sample program is already compiled for you.  If you want to see the
  118.  behavior of the program, you can just run it.  The following instructions
  119.  are needed only if you want to modify the program and recompile it.
  120.  
  121. To compile the sample application:
  122.  
  123.      1) Make sure that the CSET/2 compiler and OS/2 toolkit are installed
  124.         correctly on your system.
  125.  
  126.      2) cd to the directory which contains the info source files.
  127.  
  128.      3) Type "build" at the command prompt.
  129.