home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 10 Tools / 10-Tools.zip / i18nv104.zip / SAMPLE / WSTR / READ.ME < prev    next >
Text File  |  1996-02-13  |  4KB  |  126 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.  
  27.  
  28. 1.  Overview
  29. ============
  30.  
  31. The sample program in this directory demonstrates the use of the wide character
  32. string functions.  XPG4 provides a whole set of replacement functions for the
  33. string functions found in <string.h>, but for wide characters.  Functions are
  34. provided for copying, appending, scanning, substringing, tokenizing, getting
  35. the length, and others.
  36.  
  37.  
  38. 2.  Files in this directory
  39. ===========================
  40.  
  41. File            Purpose
  42. ------------------------------------------------------------------------------
  43. wstr.c          Source code for the wstr sample program.
  44. wstr.def        Definition file needed for compiling the program.
  45. wstr.mak        Make file used to compile the sample.
  46. wstr.exe        Compiled version of the wstr sample.
  47.  
  48. build.cmd       A command file which will compile and link the sample program.
  49. read.me         This file.
  50.  
  51.  
  52. 3.  How to run the sample program
  53. =================================
  54.  
  55. The following steps show how the program can be run.
  56.  
  57.      1) Run the \i18n\bin\new_vars command file (or have the environment
  58.         variables already set).
  59.  
  60.      2) Set the value of either LC_ALL or LANG to: En_US (US English).
  61.  
  62.           Ex:   set LANG=En_US
  63.  
  64.      3) Execute the wstr.exe program.
  65.  
  66.           Ex:   wstr
  67.  
  68.      4) The output from the program should be:
  69.  
  70.           Copy and concat functions:
  71.           --------------------------
  72.           Original string: This is a wchar_t string.
  73.           Length of the string is: 25
  74.           Add to end of the string: This is a wchar_t string.  Add this on the
  75.            end!
  76.           Copy the first 6 characters of the string: This i
  77.           Concat 13 characters on the end: This iis an added s
  78.  
  79.           Compare functions:
  80.           ------------------
  81.           Are the two strings the same? No
  82.           Are the first 10 characters of the two strings the same? Yes
  83.  
  84.           Scanning functions:
  85.           -------------------
  86.           Using the string: This is string 1.
  87.           First occurance of 's' is: s is string 1.
  88.           First occurance of ' is' is:  is string 1.
  89.           Last occurance of: 's' is: string 1.
  90.           Scan: 'This is string 1.' for first occurance of: 'stuv': 's
  91.            is string 1.'
  92.  
  93.           Substring length functions:
  94.           ---------------------------
  95.           The first 5 characters of "cabbage" are found in "abc"
  96.           The first 2 characters of "cabbage" are not found in "bde"
  97.  
  98.           Tokenizing functions:
  99.           ---------------------
  100.           Tokenizing: 'This line has spaces,commas,and periods.!' based on: ' '
  101.           Token: This
  102.           Token: line
  103.           Token: has
  104.           Token: spaces
  105.           Token: commas
  106.           Token: and
  107.           Token: periods
  108.           Token: !
  109.  
  110.  
  111. 4.  How to compile the sample program
  112. =====================================
  113.  
  114. NOTE: The sample program is already compiled for you.  If you want to see the
  115.  behavior of the program, you can just run it.  The following instructions
  116.  are needed only if you want to modify the program and recompile it.
  117.  
  118. To compile the sample application:
  119.  
  120.      1) Make sure that the CSET/2 compiler and OS/2 toolkit are installed
  121.         correctly on your system.
  122.  
  123.      2) cd to the directory which contains the info source files.
  124.  
  125.      3) Type "build" at the command prompt.
  126.