locale10.zip - C-source setlocale() etc. for DOS,Win3x,Win32

The source codes of POSIX-compatible locales for DOS, Windows 3.x, Win32.
Version 1.0

Copyright (c) 1995-1997  by Timofei Bondarenko

License agreements
------------------
    You may use and redistribute (possibly in modified form) this
software free of charge for any purposes, except military, while you
observe following ordinary rules of "bon ton":

1) You must keep my copyrights in all sources through all
   modifications which you make.

2) When you change this sources or making your own software based on
   this sources don't forget to add your copyrights so.

3) When you redistribute this software in any form (modified or
   unmodified or in binary or as part of another product) you must
   include in that distribution my copyrights (at least in
   documentation) and notice about availability of sourse codes of
   this software.

Finally, when you employ this software in a your final product
please notify me in couple lines about.
---------------------------------------------------------------------------


How to contact
--------------
All your notes are welcomed. Feel free to write me at   tim@ipi.ac.ru
-------------------------------------------------------===============

How to use
----------
   The small library (named locale.lib) provides the actual
locale-dependent information according POSIX rules under DOS, 
Windows 3.x and Win32.
No environment variables used (because it is not a general way
under DOS/Windws). No additional databases or buil-in data used -
for clarity. All information obtained from OS only.

This C-sources was successfully tested with few versions of
Borland C and Microsoft C and can be easy ported on most other
cmpilers.

The locale-dependent information includes date, time and monetary
formats, character classification (isupper(), islower(), sometime
ispunct() and isspace()), character convertion (toupper(), tolower()
and strupr(), strlwr()) and string sorting. Full list of the supported
functions and details contained in file "locale.h".

For building this library:
1) Go to subdirectory named LOCALE.
2) Look up files locale.h and opt.h!. These files contains actual
   information about building modes and compile-time options.
3) Edit "makefile" for desired platform and run your MAKE.
4) Make sure that you are using in your projects this locale.h
   and functions from locale.lib instead your standard SDK.

This library can be compiled for DOS, Windows 3.x, Windows 3.x
with ole2nls.dll and Win32 (Win32s, Windows 95 or Widows NT).
Service is very similar on all three OS.

DOS
---
   For accessing to the actual information you must use COUNTRY
statement in your CONFIG.SYS. That is not decrease amount of memory,
but simple change DOS defaults from USA to the specified locale.
   For changing locales "on the fly" you should load NLSFUNC and
probally DISPLAY.SYS. Subdirectory UTILS contains some useful
tools for it.
   Oh, lc_chars.c designed for LARGE model only. When use any "near
DATA" models you must explictly declare all pointers related to
dlt->t as "far" and use fmemcpy() instead memcpy().

Win3x
-----
   I think COMPAT31=1 and USE_OLENLS is undefined are most
prefferable combination because it works quite well on both
Windows 3.x and Windoes 95/NT.
   Only "C" and "" locales will be allowed but you can play
with ControlPanel/International, win.ini/Intl/* and in some
cases with win.ini/Intl/sLanguage.

TIME
----
   Borland's and Microsoft's standard libraries contains tzset() which
can't handle non-USA DST rules. Subdirectory TIME contains more correctly
version of this function and simple utility for automatic switch
your computer's clock to/from DST.

------------------------------------------------------------------------
