SoftIntegration, Inc.
http://www.softintegration.com 

***********************************************************************
The Ch language environment is released with the 
following subdirectories under the Ch home directory.

README    --- this file
config    --- configuration files for startup and exit
demos     --- demo programs
bin       --- computer/OS-dependent executable files, 
              not executable by safe Ch
dl        --- dynamically loaded libraries
docs      --- documentation 
extern    --- interface with other languages.
include   --- C-style include *.h header files used in Ch
lib       --- lib of C and Ch
license   --- license information 
package   --- Ch packages
sbin      --- program accessed by both regular and safe shells
toolkit   --- contain commands, scripts, and function files.
              toolkit/demos directory contains demos for all
              installed toolkits.

***********************************************************************
Type "help" in Ch shell to start using Ch.


************************************************************************
SoftIntegration Products
   Ch Standard Edition (free for commercial and non-commercial use)
   Ch Professionl Edition (free for academic use)
      Features in Ch Standard Edition 
      2D/3D plotting
      Computational arrays
      Advanced high-level numerical analysis functions
      C LAPACK 
   Ch Control System Toolkit (free for academic use)
   Ch NAG Statistics Toolkit
   SoftIntegration Graphical Library (SIGL) in C++ 
   Embedded Ch to embed Ch as a C/C++ scripting engine in C/C++ programs
   Ch Mechanism Toolkit
   (more to come)

******************************************************************
Free Ch Toolkits and third party Packages added frequently can be found 
at http://www.softintegration.com/products/thirdparty/ 


******************************************************************
Release Notes for Ch

Version 5.1.0 build 12781 September, 2006 
*) added new C99 feature of the variable  argument  list macro
   using the ellipsis notation.
   The identifier __VA_ARGS__    occurs   in   the replacement list is
   treated as if it were a parameter, and the variable  arguments  shall  
   form  the  preprocessing tokens used to replace it.
   For example,
         #define debug(...)    fprintf(stderr, __VA_ARGS__)
         debug("Flag");
         debug("x = %d\n", x);
   results in
         fprintf(stderr,  "Flag" );
         fprintf(stderr,  "x = %d\n", x );
*) added two examples on how to callback a C function in Embedded Ch from 
   the Ch space in Embedded Ch User's Guide embedch.pdf.
*) fixed ioctl() in Linux, Solaris, and HP-UX.
*) added sys/io.h for Linux.
Version 5.1.0 build 12771 August, 2006
*) fixed _pathext = stradd(_pathext, ";.ch")
*) fixed macros __FILE__, __LINE__, __DATE__, __TIME__  so that they are
   defined when tested by #ifdef or #ifndef preprocessing directives, and
   operation defined(__FILE__).
*) fixed string concatination with __FILE__, __DATE__, __TIME__ such as
   char s[] = "str1" __FILE__ "str2";
Version 5.1.0 build 12761 August, 2006
*) updated 'which' command to display the alias or first command only.
   The -a option, it will display the alias, all commands, function file,
   header file, value of a environment variable.
Version 5.1.0 build 12761 July, 2006
*) fixed argument of member function with class type of its own.
   For example,
          class Point {
              public:
                Point();
                double Distance(Point other, Point &another);
          };
*) fixed int (func)(int i);
         typedef int(FUNC)(int i);
         FUNC *f2;
*) fixed vsnsprintf().
Version 5.1.0 build 12751 June, 2006
*) fixed Ch_SymbolAddrByName(interp, "a") when a is an array.
Version 5.1.0 build 12741 June, 2006
*) added the return type ChVarType_t for Ch_IsVariable() with the following values
    CH_NOTVARTYPE, 
    CH_GLOBALVARTYPE,
    CH_LOCALVARTYPE, 
    CH_FUNCPROTOTYPE 
*) fixed Ch_SymbolAddrByName(interp, "a") when a is an array.
*) changed so that functions 
   va_elementtype(), elementtype(), Ch_VaDataType() return the same value for the same data type
*) fixed wide character and wide string for multi-byte languages
*) fixed macros in CHHOME/include/locale.h
*) fixed CHHOME/include/wctype.h 
*) added system variable _ignoretrigraph
   add
      _ignoretrigraph = 1;
   in _chrc or .chrc to ignore trigraphs.
*) fixed plotting of 1/sin(x)
*) fixed pkginstall.ch for installation of packages in C:/Program Files/Ch/package
*) fixed int a[3][4], (*p)[4];
         p=a;
         printf("a[2][3]=%d\n",*(*(p+2)+3));
Version 5.1.0 build 12721 April, 2006 
*) fixed char *arg[]; (*arg)[index];
Version 5.1.0 build 12711 March, 2006
*) fixed pow(). It conforms to the C99 standard, except for the following cases:
       Function             C         Ch
       -----------------------------------
       pow(1, NaN)          1.0       NaN
       pow(NaN, +/-0.0)     1.0       NaN
       -----------------------------------
   For example,
     pow(-5.0, 0) = 1.000000
     pow(5.0, 0) = 1.000000
     pow(0.0, 0.0) = 1.000000
     pow(-5.0, 0.0) = 1.000000
     pow(5.0, 0.0) = 1.000000
     pow(Inf, 0.0) = 1.000000
     pow(-Inf, 0.0) = 1.000000
     pow(0.0, 0.0) = 1.000000
     pow(NaN, 0.0) = NaN
     pow(1.0, NaN) = NaN
*) added demos for kbhit() function in Windows
    C:/Ch/toolkit/demos/Windows/demos/kbhit.c
Version 5.1.0 build 12701 March, 2006
*) changed generic function recv() to regular function.
*) fixed
       typedef int BUF[100];
       BUF *p;
       BUF a; int b[10][100];
       p = &a; p = b;          /* fixed the bug here */
*) fixed
       int (*p)[100];
       int buf[3][100];
       p = buf;
       (*p)[1];               /* fixed the bug here */
*) fixed
     If the built-in command "cd" fails,
     the value of _status for the command is 1
Version 5.1.0 build 12691 March, 2006
*) fixed
       int a, b, c, d, e, f, g, h, i, j, k;
       k = a ? b++, c : d ? e++, f : g ? h++, i : j;
*) fixed using format "%d" for negative value of short type
      char str[90] ;
      short s = -10;
      sprintf(s, "%d", s);
*) fixed  a += a -= a*a;
*) fixed casting from a small array to a big array, the remaining part is padded with 0
      > array double a[3] = {1,2,3}
      > (array int [2])a
      1 2
      > (array int [4])a
      1 2 3 0
*) fixed giving an error message for an extra } in code.
*) fixed memory leak for a multiple return statements within if-statement or 
   switch-statement block.
Version 5.1.0 build 12681 March, 2006
*) fixed a bug in typedef for function type with argument of array type
      int (*FUNC)(int a[2], int b[]);
      typedef FUNC fun;
Version 5.1.0 build 12671 February, 2006
*) fixed memory leak for a single return statement within if-statement or 
   switch-statement block.
Version 5.1.0 build 12661 January, 2006
*) added inet_aton() in supported platforms such as Linux, HPUX, and Mac OS X.
Version 5.1.0 build 12661 January, 2006
*) fixed CLOCKS_PER_SEC for time.h in Windows.
Version 5.1.0 build 12661 December, 2005
*) added a numerical function oderungekutta() for solving ODE.
   odesolve() is obsolete and will be phased out.
*) fixed a bug for handling of element of array of string_t 
   as a function argument.
Version 5.1.0 build 12651 December, 2005 
*) fixed the bug for system() in Ch v5.1.0.12641
Version 5.1.0 build 12641 December, 2005
*) fixed memory leak for 
         struct tag {
           int a[3];
         }s, *sp;
    using  s.a or sp->a as an operand or argument for generic functions.
*) fixed the crash for
         struct tag {
           int a[3];
         }s;
         *(s.a) = 2;
Version 5.1.0 build 12631 November, 2005
*) fixed memory leak for
     (type *)s.arrayfield;
     (type *)sp->arrayfield;
*) fixed bugs for cout, cin, cerr for the first syntax error followed
   by statements with correct syntax, such as
      cout << "error
      cout << "ok"
Version 5.1.0 build 12621 November, 2005 
*) fixed bugs for readline() 
Version 5.1.0 build 12621 November, 2005 
*) fixed crash for "if(a==)) {a = 10;}" and "while(a==)) {a = 10;}"
Version 5.1.0 build 12611 November, 2005 
*) fixed atoi() for int f(){ if() ... else return x;};
Version 5.1.0 build 12591 October, 2005 
*) fixed (double)(-1) and dblvalue=-1 etc.
Version 5.1.0 build 12581 October, 2005
*) fixed cp-rfp as cp -rf in pkginstall.ch for Windows.
Version 5.1.0 build 12581 October, 2005
*) fixed memory leak for a return statement inside a block with local variables.
*) fixed memory leak for calling function with multiple arguments in Embedded Ch
   using  Ch_CallFuncByNameVar().
Version 5.1.0 build 12561 October, 2005
*) fixed memory leak for ptr += ivalue and ptr -= ivalue.
Version 5.1.0 build 12551 October, 2005
*) updated CHHOME/config/vim/_vimrc
   for handling tab of other file types.
*) added  
     size_t strlen(const char *s);
   in string.h and strlen.chf for generic function strlen().
*) fixed int_val = unsigned_val casting when unsigned_value is large
Version 5.1.0 build 12541 October, 2005
*) updated inttypes.h with macros define in C99
Version 5.1.0 build 12541 October, 2005
*) fixed pkginstall.ch for copying header file dir without warning.
*) fixed processing character '\r' in code for Ch_AppendRunScript()
   and Ch_AppendParseScript().
*) added /sw/bin to _path and /sw/share/man to environment variable MANPATH
   by default for Mac OS X
*) added demo examples for using Embedded Ch with GUI for VC++ 6.0 and .NET
*) updated stdlib.h to remove an extra ^M
Version 5.1.0 build 12531 September, 2005
*) Added Embedded Ch API 
      int Ch_Abort(ChInterp_t interpi);
*) added macro CH_ABORT for handling Ch_Abort() in Embedded Ch.
*) added 
      #pragma package _path  <name>
      #pragma package _fpath <name>
      #pragma package _ipath <name>
      #pragma package _lpath <name>
      #pragma package _path  "name"
      #pragma package _fpath "name"
      #pragma package _ipath "name"
      #pragma package _lpath "name"
*) support Ch SDK for MingW C/C++ compiler in Windows
*) support Embedded Ch SDK for MingW C/C++ compiler in Windows
*) added the command path /sbin to the system variable _path
   for Unix by default.
*) updated help command
*) fixed crash for
        if(cond) badcode here
        {}
        while(cond) badcode here
        {}
        for(init; cond; expr) badcode here
        {}
*) updated CHHOME/lib/libc/sprintf.chf for generic function sprintf() 
*) separated Ch GTK+ as an add-on Ch package
*) fixed 22e12345678986954869058609
*) fixed calling Ch function with arugment and return type of string_t 
   from Embedded Ch
*) changed the error message format.
*) fixed bug for 
    Ch_SetVar(interp, "s", CH_STRUCTTYPE, "tag", &s);
*) updated Ch_AppendScript() and Ch_AppendScript()
   can handle script with header files and macros using preprocessing directives
Version 5.0.3 build 12401 September, 2005
*) fixed crash for Embedded Ch when function file name and 
   function name do not match.
Version 5.0.3 build 12371 August, 2005 
*) updated Embedded Ch, chmt1.dl, chmt2.dl, etc can be located in other
   dir such as C:/Application/bin by specifying option->chmtdir for
   Ch_Initialize(interp, option).
Version 5.0.3 build 12361 August, 2005
*) updated processhfile() to handle 'EXPORT typedef int (*fun)();'
   handle "LOAD_CHDL()" 
*) updated cat.exe in Windows 
*) updated rm.exe in Windows 
*) updated mv.exe in Windows 
*) updated cp.exe in Windows 
*) updated make.exe in Windows 
*) changed
      alias("ls", "ls --color=auto");
   to
      // alias("ls", "ls -F");
   for CHHOME/config/_chrc.sample_win for ~/_chrc for Windows.
Version 5.0.3 build 12351 July, 2005
*) updated CHHOME/lib/libch/processhfile.chf to handle windows header 
   with ^M in Unix. 
Version 5.0.3 build 12351 July, 2005
*) fixed c2chf to handle
     rettype func(enum type_t);
     rettype func(struct type_t);
  added an option -s to handle a function return struct type which is typedefed.
  For example,
     c2chf file.h -s structtype_t -s structtype2_t
  added an option -l to handle a function with variable number of arguments.
  For example,
     c2chf file.h -l func vfunc
*) updated chsdk.pdf
Version 5.0.3 build 12341 July, 2005
*) fixed c2chf to handle
     rettype func(enum type_t);
     rettype func(struct type_t);
  added an option -s to handle a function return struct type which is typedefed.
  For example, 
     c2chf file.h -s structtype_t -s structtype2_t
Version 5.0.3 build 12341 July, 2005
*) fixed c2chf in Ch SDK to handle function with arguments 
   of 'interp' and 'varg'.
*) fixed c2chf in Ch SDK to handle function with arguments 
   of 'interp' and 'varg'.
*) fix processhfile.chf with { in extern "C" \n { .
   Fixed processhfile.chf for function of agument type of "const enum"
   Fixed to handle inline functions.
   Fixed to handle global variables.
*) modified C:/Ch/toolkit/include/gtk/gtk.h in Windows by default with 
       #define GDK_DISABLE_COMPAT_H
*) fixed putenc() as putenv() in C:/ch/config/_chrc.sample_win
Version 5.0.3 build 12331 June, 2005
*) fixed struct tag func1(type arg), fuc2();
Version 5.0.3 build 12321 June, 2005
*) fixed pkginstall.ch in Unix
*) fixed CHHOME/include/arpa/inet.h
Version 5.0.3 build 12311 June, 2005
*) support Ch and toolkits in LinuxPPC on Power architecture.
*) added ChVaList_t data type for variable number of arguments in
   Ch SDK and Embedded Ch, instead of using va_list.
*) fixed c2chf for argument name of ap such as int funct(int ap);
*) fixed Sleep() in Windows
Version 5.0.1 build 12251 June, 2005
*) fixed int_value = (unsigned_int_value) - (int_value);
*) fixed  struct { int size; } z[1]; i = z->size; 
Version 5.0.1 build 12241 May, 2005
*) fixed int_value = -(unsigned_int_value);
   long_long_value = -(unsigned_long_long_value);
Version 5.0.1 build 12231 May, 2005
*) added command pkginstall.ch for installation of Ch packages.
*) for char s[5]; the datatype of s is treated as a pointer to char in
   va_elementtype(), Ch_DataType(), Ch_VaDatatype(), Ch_FuncArgDataType().
*) updated removeFuncProto()
Version 5.0.1 build 12221 May, 2005
*) updated select() so that it works in Windows
*) updated removeFuncProto() so that it can handle "int *func();"
*) updated embedch.pdf for Ch_Append*() and callchvla2d.c
*) distribution of evaluation edition of Embedded Ch for all platforms.
*) updated c2chf.exe in Windows without changing mode for .chf files.
Version 5.0.1 build 12211 April, 2005
*) fixed 'edit' command in Mac OS X
Version 5.0.1 build 12211 April, 2005
*) added removeFuncProto()  in Ch SDK to simplify building Ch packages.
*) updated chsdk.pdf
Version 5.0.1 build 12211 April, 2005
*) updated Ch SDK
     added rmcom command for removing C/C++ comments
     fixed processhfile(), it will remove comments first.
     updated c2chf 
*) fixed handling of comment /* /* comments */
*) added support of const member functions
*) fixed strstr(str1, str2)+value when strstr() returns NULL.
*) fixed. allow pointer arithmetic of  p+value or p-value
   when pointer p is NULL.
Version 5.0.1 build 12201 March, 2005
*) Make it easy to interface with packages built from C/C++ libraries.
*) added member field verbuild in   struct chinfo_t in chshell.h
*) updated DJGPP Unix utilities for Ch in Windows
*) added macro LOAD_CHDL(module_name)  in chdl.h
*) updated ch2chf, by default, the handle is _Chfile_handle,
   instead of _ChFile_handle,  for command
      c2chf file.h
Version 5.0.0 build 12191 March, 2005
*) updated GnuWin32 Unix utilities for Ch in Windows
*) fixed error message for 'sizeof type' with
  ERROR: missing '(' and ')' in sizeof(type)
*) suppressed a warning message  for $comd/dir in command
Version 5.0.0 build 12181 March, 2005
*) Ch SDK is bundled with both Ch Standard and Professional Editions
*) Support multi-threads for Embedded Ch up to 500 simultaneously
   running Ch interpreters in an application. 
   All APIs in Ch SDK and Embedded Ch SDK
   need a valid interpreter argument. For example,
   Ch SDK API for Ch_Home() and Ch_VaStart() are changed from
      char* Ch_Home(void);
      int Ch_VaEnd(va_list ap);
   to
      char* Ch_Home(ChInterp_t interp);
      int Ch_VaEnd(ChInterp_t interp, va_list ap);
   The old programs with Ch API can be modified using a Ch script
   port47to50.ch
*) added Embedded Ch API
     int Ch_ExecScriptM(ChInterp_t interp, const char *progname); 
     int Ch_RunScriptM(ChInterp_t interp, char **argv);
   to process multiple Ch programs in a single instance of 
   Ch interpreter.
*) added Embedded Ch API Ch_IsVariable()
*) support QNX 6.30
*) Table of contents, programs, and index in all PDF documents are clickable 
   with hyper references and links for convenient reading.
*) added and integrated more than 100 Unix utility programs from 
   GnuWin32 for Windows. Ch has a total of over 200 Unix utility programs
*) added built-in command 'exec'
*) added directories "/usr/lib:/usr/local/lib:" to the environment variable
   LD_LIBRARY_PATH in Linux by default.
*) added gif file format for plotting
*) Added commands curl.exe and wget.exe in Windows.
   Commands curl.exe and wget.exe can retrieve files
   using HTTP, HTTPS and FTP. It is a non-interactive commandline tool,
   so it may easily be called from Ch scripts.  the command can run as
         wget.exe http://xxx.com/file_name
   instead of opening a browser.
*) added strtoll() and atoll()
*) added function
        clock_t clock();
   as a generic function
*) added commented default setup for VC++ in _chrc
*) updated 'which' command to display the first command, function file,
   header file, and value of a environment variable.
*) updated sprintf() to handle the first argument of both types of
   pointer to char and string_t.
*) updated select.chf to include header file sys/time.h 
*) updated c2chf for Ch 5.0 SDK and Embedded SDK API
*) updated processhfile() and processcfile() for SDK
*) updated c2chf for handling header file and output files with directories. 
   updated command c2chf with option -o c dir_c -o chf dir_chf
   For example,
      c2chf dir/header.h -o c output/dir_c -o chf output/dir_chf
*) updated .pdf files with hyper reference and link
*) updated CHHOME/include/ch/sys/wait.h for Linux for macros __WAIT_*
*) updated sys/types.h with conditional typedef for unchar, ushort, uint, ulong.
*) updated dlerror() as generic functions. Function dlerror() can be 
   used to obtain error message during the initialization for global variables.
*) fixed closing the file if Ch_ParseScript() fail to parse the script file.
*) fixed using gdb when ch is used as a login shell.
*) fixed ch -c[option] cmd option
*) fixed abort() and exit() in Ch programs processed by Embedded Ch
*) fixed bug for foreach using default delimiter such as
      foreach(toke,str)
      foreach(toke,str,cond)
   fixed bug for foreach when str in foreach(token, str) is
   a pointer to char.
*) fixed crash for 
       if(expr1)
          a-bad-single-statement1
       else if(expr2)
          a-bad-single-statement2
       else 
          a-bad-single-statement3
*) fixed memory leak for computational arrays
*) fixed memory leak for passing argument of string_t type
*) fixed memory leak for class and array of class
*) fixed casting operation for
   array int a[4] = {1, 2, 3, 4};
   d = (double)a;
   array double b[4] = {1, 2, 3, 4};
   i = (int )b;
*) fixed i?ptr:0 and  i?0:ptr
*) fixed sprintf() and other C functions using argument of (int arg, ...) in Unix.
*) fixed sprintf(), scanf(), `cmd` inside a finite loop in Windows.
*) fixed passing a structure as an argument to a binary C/C++ function. 
*) fixed using an array of pointer to class in binary C++ space.
*) fixed command line option with space for Embedded Ch
     char *argvv[]={
                 "C:/program files/cmmand.ch"
                 "opt1 opt2",
                 "opt3 opt4",
                 NULL};
Version 4.7.0 build 11921 November, 2004
*) support new API in Ch SDK 
      ChType_t Ch_VaFuncArgDataType(void *ap, int argnum);
*) fixed warning message for passing int funcptr(int*) to
   int fun(int funcptr(void *)); for a demo in GTK+
*) fixed passing a function in function file to fun(int i, ...);
*) added GetScrollInfo() and SetScrollInfo() for windows.h in Windows
*) using 4 white space for tab in vim by default in Windows
*) commented "set ruler" in _vimrc so that
   Ctrl+g displays the current line number and cursor position.
*) changed alias for command 'ls'
*) updated CHHOME/include/sys/mman.h for Unix and Linux 
   for mbuff.h in RTLinux
Version 4.7.0 build 11831 November, 2004
*) updated CHHOME/include/sys/mman.h for Linux
Version 4.7.0 build 11821 October, 2004
*) added option -u for unbuffer the stdout stream mainly 
   for handling I/O in IDE
*) fixed structure/class with size over 32767
*) changed command which.ch and alias for command 'which'
*) changed alias for command 'ls' in Windows
Version 4.7.0 build 11711 October, 2004
*) fixed #define for floating point values
Version 4.7.0 build 11701 October, 2004
*) For Ch SDK
   Changed Ch_VaIsArray() to Ch_VaArrayType()
   added data type ChType_t
   Changed
    CH_NOTARRAY
    CH_CARRAY
    CH_CARRAYPTR
    CH_CARRAYVLA
    CH_CHARRAY
    CH_CHARRAYPTR
    CH_CHARRAYVLA
   to
    CH_UNDEFINETYPE
    CH_CARRAYTYPE
    CH_CARRAYPTRTYPE
    CH_CARRAYVLATYPE
    CH_CHARRAYTYPE
    CH_CHARRAYPTRTYPE
    CH_CHARRAYVLATYPE
*) For Embedded Ch
   Changed Ch_IsArray() to Ch_ArrayType()
   Changed Ch_FuncArgIsArray() to Ch_FuncArgArrayType()
*) changed va_isarray() to va_arraytype() in stdarg.h
Version 4.7.0 build 11641 October, 2004
)  added new API Ch_SetVar() in embedded Ch.
*) fixed char array initialization  char s[2][20] = {"aa","bb"};
Version 4.7.0 build 11631 October, 2004
*) changed the default prompt from "_cwdn> " to "_cwd> "
Version 4.7.0 build 11623 September, 2004
*) fixed createpkg.ch with instruction for
      ch installpkg.ch <pkgname>
Version 4.7.0 build 11622 September, 2004
*) fixed createpkg.ch with
      ch installpkg.ch <pkgname>
   instead of
      ch ./installpkg.ch <pkgname>
*) updated installpkg.ch for handling license
Version 4.7.0 build 11621 September, 2004
*) fixed function file as argument for atexit()
Version 4.7.0 build 11611 September, 2004
*) fixed #pragma package <name>
Version 4.7.0 build 11601 September, 2004
*) Support 36 new APIs for Ch SDK and Embedded Ch SDK.
   Make Ch especially powerful to be embedded in C/C++ programs
   and easy to interface binary static/dynamical C/C++ libraries.
*) Modified to be consistent with C shell and other shells.
   a) changed event designator from $ to ! to be consistent with 
      C shell in command shell. For example,
         > !cmd
   b) added $cmd for command in both command shell and program to be consistent
      with C shell. For example,
          $cmd option
   c) Treat a string literal at the begin of a program and 
      command shell as a command.
          "ls" option
   d) added handling of command in a path with space using a string literal.
         > "/Program Files/package/cmd.exe" option
*) added function pipe()  in Windows
    int pipe(int fildes[2]);
*) updated Unix utilities for Windows. 
   Removed commands cpio.exe, printenv.exe, ln.exe in Windows.
   Added Unix utility programs date.exe and bzip2.exe in Windows
*) Command gunzip in Windows is handled as an alias of "gzip -d".
*) updated editor vim 6.3 from vim 6.2 for Windows.
*) added commands createpkg.ch and installpkg.ch
*) added  execution of expression at runtime by a new pragma directive
     #pragma exec expr
*) added the classic header file varargs.h
*) Changed the default value for _pathext.
   The default value for _pathext is ".com;.exe;.bat;.cmd" in Windows and "" in Unix
   without ".ch". It can be changed in ~/.chrc for Unix or ~/_chrc in Windows.
   Ch commands should be typed with a full path including file extension .ch
   such as mycommand.ch
*) changed the value for the predefined macro _STDC_ from 0 to 1
*) treated dlopen(), dlsym(), and atexit() as generic functions. 
   Function dlopen() can be used as a rvalue in initializer for global variables.
   _dlopen() and _atexit() are obsolete. They can be replaced by dlopen() and atexit(),
   respectively.
*) added function file transpose.chf so that function transpose() can be
   called directly from C functions using Ch SDK and Embedded Ch.
*) added enum types with array types of
      CH_CARRAYVLA,
      CH_CHARRAYVLA
   for C and Ch variable length arrays in stdarg.h.
*) added _sleep() for Windows to be compatible with .NET.
*) added console I/O functions, such as getch(), etc., 
   in CHHOME/include/windows/conio.h for Windows.
*) added support of functions in function files for expressions in 
   the following functions 
     strparse()
     streval()
*) added the classic header file memory.h
*) added math.h in header file tgmath.h.
*) added <stdint.h> 
*) Added system variable _cwdn for the current working directory name.
*) changed the default prompt in Ch command shell to
   the current working directory name.
   _prompt can be setup in ~/.chrc or ~/_chrc without restriction
*) added function readline() for all platforms
*) more robust for handling (example, declaration will be handled properly when 
   a script is wrong).
*) updated libchplot.dl for Windows for CGI plotting.
*) Added reentrant functions in header files grp.h and netdb.h for Linux
*) Added wide character functions in header file wchar.h for Linux
*) pow(0.0, 0.0) = 1.0 instead of NaN to be consistent to ISO C
*) A generic math function returns a value of double type
   if its argument is an integral value. For example, sin(1) is double.
   modified ch.h in Ch SDK
*) turn off some default warning messages for 
     ch -n chcommand
*) added /usr/share/man in Unix by default
*) For CPlot::axisRange(minimum,  maximum, incr),
   when incr is 0, the increment between tic marks is calculated internally.
*) added member function CPlot::getOutputType() for plotting.
*) changed built-in commands in command mode from
       debug, parse, run 
   to
       chdebug, chparse, chrun
*) fixed commands '..\cmd'  and '.\cmd' in Windows.
*) fixed command "echo \\" in Windows to display \ to be consistent with that in Unix.
*) fixed command "echo \$43" in Windows to be consistent with that in Unix.
*) fixed ./cmd when cmd is located in a directory with space in the path.
*) fixed command.ch located in a "path with space" in Unix
*) fixed \\$var \\\$var in variable substitution.
*) fixed adjacent two variable substitutions in commands, such as
        command $(var)$(var2) 
        command $var$var2 
*) fixed variable substitution with @ command , such as
        command arg@address.com $arg
*) removed the warning message for command
        >  ch -n mycommand.ch
   when mycommand.ch contains variable substitution delimited by '\' such as
        command  $target\*.arg
*) fixed command with trailing ';' in Windows, such as 
        command;
        command.exe;
        path/command option;
*) fixed command with fullpath using '\' and option in Windows, such as
        \full\path\mycommand.exe option
*) fixed command with relative path using '/' in Windows, such as
        cmd_path/command.exe
*) fixed handlingl of code
       #!/bin/ch -g^M 
   copied from Windows to Unix
*) fixed pointer to pointer to function.
*) fixed special case of preprocessing directive #define inside enum 
   following a trailing ',', such as
             enum tag {
                 a,
                 b = 1,
             #define A D
             };
*) fixed  LONG_MIN, LONG_MAX, and ULONG_MAX in header file limits.h
*) fixed operators amd constants for long long and unsigned long long data types.
*) fixed consistent handling of printf() function family using format specifiers
   "%lld" and "%llu" for long long and unsigned long long, respectively,
   across different platforms.
*) fixed backslash problem in stringization using macro. For example,
      #define TEST(a) #a
      printf("1%s2\n", TEST(a\\b));
      printf("1%s2\n", TEST("a\\b"));
*) fixed bugs related to comments following a preprocessing directive, such as
     #ifdef A /* comment1
                 comment2 */
*) fixed porting code from Windows to Unix in preprocessing directives, such as
     #ifndef nothing /* comment1 \^M
                        comment2 */
*) fixed
     #define TEST(a) #a
     printf("%s\n", TEST(\"\\));
*) fixed printf("%s\n", "x*??");
*) fixed crash of passing scalar values to pointer to char in function argument. 
   Ex. atoi('d');
*) fixed crash of assigning scalar values to pointer to char.
   Ex. char *p = 10;
*) fixed crash in a command shell for
    > for
    > do
*) fixed handling multi-dimensional array for IO stream cin/cout/cerr 
         cout << a[i][j]
         cin  >> a[i][j]
*) fixed a bug related to declaration  of struct in case of
    #ifdef NOT_DEFINED
    struct tag 
    #else
    typedef struct tag tagA;
    struct tag
    #endif
    {
        unsigned  field1;
    };
*) fixed negation operator for short/char
*) Fixed the dependence of Ch on libtermcap.so in Linux, which is not available in
   some Linux distribution.
*) fixed a bug in initialization of pointer to function.
*) fixed cin in C++ for input a string using a pointer to char
        char str[43], *sp=str; 
        cin >> str;
        cin >> sp;
*) fixed crash for bad code such as 
        void f1();
        int f1() { /* bad code right after the opening brace */
           first_line_code_is_bad;
        }
*) fixed strncat() for arg of string_t type.
*) fixed "#include<header.h> the_code_in_the_same_line;" 
*) fixed select() in Windows so that time.h and winsock2.h.
*) fixed CHHOME/include/windows/winsock.h for select().
*) fixed CHHOME/include/sys/stat.h for Windows.
*) fixed sprintf(), sscanf(), `cmd` for regular users in Windows XP
*) fixed sprintf() in Windows for IIS XP
*) fixed libchplot.dl for IIS XP plotting
*) fixed using printf and fprintf as pointer to function
   updated header files stdio.h iostream.h iostream 
*) fixed wsprintf() in Windows
*) fixed permission for sprintf() and sscanf() in Windows 2000/XP in regular user account
*) fixed symbolic link of command completion using tab key in command shell.
*) fixed input across multiple lines at the prompt of Ch shell
*) fixed resizing problem of Ch shell in Solaris.
*) fixed multiple callback functions for glut in OpenGL
*) fixed font for glut in OpenGL for Windows


---------------------------------------------------------------------
Version 4.5.0 build 11481 March 13, 2004
*) Support FreeBSD 5.1
Version 4.5.0 build 11461 January 22, 2004
*) updated to run in Mac OS X 10.3
Version 4.5.0 build 11451 January 17, 2004
*) Added file and command completion by tab in command shell.
*) support interactive input for multiple lines in command shell
*) Added history command retrieval feature in command shell in Windows.
*) Enabled QuickEdit and Insert Mode in Ch command shell for Windows by default.
*) added strparse(char *expr) to vadlidate the expression at the 
   parsing stage. streval() is for evaluation at runtime. 
*) added private destructor for classes
*) added a runtime error message for c->memfunc() if c is NULL
*) member functions cannot be accessed after the object has been deleted.
*) fixed dlopen(NULL, X) to return a handle for the original program
   in Solaris, Linux, Mac, Windows. 
   In HPUX. dlsym(NULL, X) to find a symbol in the original program.
*) added identifier __class__ for class name inside a member function.
*) added identifier __class_func_ for class and function names inside 
   a member function.
*) added C++ using directive
      using std::cout;
      using std::cin;
      using std::cerr;
      using std::endl;
      using std::ends;
      using namespace std;
   updated CHHOME/include/iostream.h
   updated CHHOME/include/iostream
*) Added current path . in _path for commands for Windows,
   _fpath for function files and
   _ipath for header files in CHHOME/config/chrc by default
   for all platforms.
*) Add the following typedef for System V
    typedef unsigned char   unchar;
    typedef unsigned short  ushort;
    typedef unsigned int    uint;
    typedef unsigned long   ulong;
*) Simplified interface with C++ classes in Ch SDK.
*) Added 4 new APIs for Ch SDK
*) Added 3 new APIs for Embedded Ch
*) changed the default prompt to "ch-4.5> "
*) fixed passing argument of FILE* type to functions in 
   dynamically loaded lib in Windows.
*) fixed identifier __func__ conforming to the ISO C standard.
*) fixed using member functions as argument of pointer to function
*) Fixed function semctl() in sys/sem.h
*) fixed macro definition in array initialization such as
         int a[] = {
                     #define MACRO(a, b) a, b,
                     MACRO(2,3)
                     NULL
         };
*) fixed macro definition with ... such as
        #define ARG(arglist) arglist
        int fun ARG((int i, int j, ...));
*) fixed function macro definition across multple lines
*) Fixed
          #define P(arg) arg
          typedef void (*fp) P((int));
*) fixed When a function without its definition is called,
   it will display an error message, the program will not crash.
*) fixed handling directories with space for cd such as cd "/program files"/dir
*) added CHHOME/include/new
*) fixed &a[N] to conforming the ANSI C standard.
*) fixed strncpy(a+1, b, n); strncat(a+1, b, n) for array length check 
*) fixed p1-p2  when p1 and p2 are pointers to struct
*) fixed *p++ = s; *++p = s; *--p =s; *p-- = s; when p is a pointer to struct
*) fixed declaration of int *const*p;
*) fixed startup for MandrakeLinux 9.0
*) fixed crash for bad statement char *p=new char[y]; when y is undefined
*) fixed realloc(NULL, size)
*) fixed ch.vim for keyword foreach
*) added in stdlib.h and unistd.h 
      extern char *optarg;
      extern int  opterr, optind, optopt;
*) fixed isnum() and iscnum() to return 1 for scientific notation "3E4"
*) fixed iscnum() with conventional notation for complex numbers
*) fixed ch -c "command option" for login shell in Linux
*) fixed cmd $(expr_with_func())
*) fixed macro CHAR_BIT and LLONG_MIN, LLONG_MAX, ULLONG_MAX in limits.h
*) fixed macro inside statement
*) fixed token paste for hexdecimal numbers
*) fixed bitshift under cout.
*) added function prototype getopt() in unistd.h
   updated CHHOME/demos/lib/libc/stdlib/getopt.c
   moved CHHOME/lib/libopt/getopt.chf to CHHOME/lib/libc/getopt.chf
*) fixed while(expr){... continue;...}
*) fixed error message for NULL value for computational array of reference
   and pointer to computational array.
   Operation a==NULL or a!=NULL gives boolean value for pointer to 
   computational or array of reference.
   controlling expression of if-statement and loops cannot be 
   computational array.
*) fixed atoc() with conventional notation for complex numbers
*) Modified env var VIM to point to CHHOME/config/vim in chrc
   for Windows  in CHHOME/config/chrc

---------------------------------------------------------------------
Version 4.0.0 build 11291 August 20, 2003
*) added  argument substitution for alias such as
   alias("find", "find . -name _argv[1] -print");
     _argv[0]  The first input word (command).
     _argv[n]  The n'th argument.
     _argv[#]  The entire command line typed so far.
     _argv[$]  The last argument.
     _argv[*]  All the arguments, or a null  value  if  there  is
               just one word in the command.
*) modified handling of variable substitution in command shell
   (a) The variable substitution
   can be prevented by preceding the `$' with a `\', except
       within ``'s where it always occurs, and  within  `''s
       where  it  never occurs.
   (b) A `$' is passed unchanged if followed by a space character
   such as blank and tab as defined by function isspace(), or end-of-line.
   A variable can be enclosed inside a pair of braces such as
   ${var}, ${ENV}.
   (c) expression substitution $(expr) is still valid.
*) modified handling of variable substitution in verbatim output block
   using fprintf.
   (a) The variable substitution
   can be prevented by preceding the `$' with a `\'.
   (b) A `$' is passed unchanged if followed by a space character
   such as blank and tab as defined by function isspace(), or end-of-line.
   A variable can be enclosed inside a pair of braces such as
   ${var}, ${ENV}.
   (c) expression substitution $(expr) is still valid.
*) fixed atoc()
*) fixed using member functions as argument of pointer to function
*) fixed error message for NULL value for computational array of reference
   and pointer to computational array.
   Operation a==NULL or a!=NULL gives boolean value for pointer to 
   computational or array of reference.
   controlling expression of if-statement and loops cannot be
   computational array.
*) Updated following Unix commands in Windows
     chgrp chmod chown cp 
     dd df du ln ls 
     mkdir mv rm rmdir touch
*) updated vi editor in Windows
*) added vim editor (improved vi) with syntax highlighting for 
   Ch and other languages.
*) fixed format specifier "%%" and "%n" for scanf() function
*) added getopt() in stdlib.h and function file
*) fixed CHHOME/chrc for Mac OS X 10.2 and higher
*) fixed sigset(signal, SIG_IGN)
Version 3.7.0 build 11241 July 6, 2003
*) fixed assert().
Version 3.7.0 build 11231 June 28, 2003
*) fixed memory problem at exit when Ch is a login shell.
*) fixed buf size checking for sprintf()
*) added default MANPATH with /usr/share/man for Mac
Version 3.7.0 build 11221 June 26, 2003
*) fixed print void * as string such as fprintf(fp, "%s", voidptr)
   for GTK+ book examples.
*) fixed identifier not followed with '(' is not expanded as
   Function macro. 
*) updated OpenGL/glut example code
*) updated GTK+ toolkit
Version 3.7.0 build 11211 June 12, 2003
*) fixed f2c.h
Version 3.7.0 build 11211 June 11, 2003
*) fixed while-loop bug
Version 3.7.0 build 11201 June 5, 2003
*) fixed incremental embedded code
*) fixed puts() and fputs() when the string is NULL
Version 3.7.0 build 11191 May 28, 2003
*) fixed unsigned surfix after long surfix such as 34LU or 34llu
*) By default, if environment variable MANPATH has not been setup,
it will be set to CHHOME/docs/man:/usr/man:/usr/local/man in Unix.
*) added that in Windows if the first line is one of
       #!CHHOME/bin/ch.exe
       #!CHHOME\bin\ch
       #!CHHOME\bin\ch.exe
    in addition to
       #!CHHOME/ch/bin/ch
       #!/bin/ch
   it will be treated as a Ch program, where CHHOME should be replaced
   by the home directory of Ch such as C:/ch or C:\ch.
*) fixed streval() as an argument of built-in function shape().
*) Remove warning for assigning scalars to pointer to computational array
   array int (*p)[:], b1[2][3];
   p = (array int [:][:])b1
   p = 3  // no warning
*) fixed member field of st_atime, st_mtim, st_ctim of struct stat
   in sys/stat.h in Solaris
Version 3.5.0 build 11181 March 30, 2003
*) added scalar to computational array promotion for operator ./
   as [s]./Charray for element-wise division. For example, 3.0./A 
Version 3.5.0 build 11171, March 25, 2003
*) fixed scanf() with a leading space such as scanf(" %*[^\n]").
*) Fixed passing member functions to function with argument of
   pointer to function. 
Version 3.5.0 build 11161, March 15, 2003
*) Fixed inconsistency in sizeof() operator between  C and  Ch.
Version 3.5.0 build 11151, March 8, 2003
*) added scalar to computational array promotion for operators +, -, and =
     A+[s]
     [s]+A
     A-[s]
     [s]-A
     A = [s]
Version 3.5.0 build 11141, March 2, 2003
*) fixed C99 VLA declaration
   int fun(int n, int a[*]);
   int fun(int n, int a[n]);
*) fixed operator 'defined' at the preprocessing directive
*) fixed. Using an open parenthesis `(' as the
   first token following the open brace of a function definition.
*) fixed. Check the data type of built-in function shape().
*) fixed space and format specifier "%n" in fprintf() functoin family.
Version 3.5.0 build 11131, February 11, 2003
*) make histogram() run faster
*) fixed pow(1, -1) and pow(-1, -1)
Version 3.5.0 build 11121, January 30, 2003
*) fixed NaN for conversion of array elements from complex to 
   floating-point number for Windows.
*) fixed conditional operator with double constants for Windows
Version 3.5.0 build 11111, January 18, 2003
*) Commands mkdir and rmdir in Windows are Unix compatible for 
   shell programming

---------------------------------------------------------------------
Version 3.5.0 build 11111, January 10, 2003
*) added variable substitution within command substitution operation
         `cmd $var`
   for speedy Ch shell programming
*) added Emac-like command-line editing in Unix/Linux/MacOS for 
   interactive Ch command shell. Arrow keys can also be used to
   move cursors at the prompt for input command line.
*) programs issued and ended with & in Windows will be launched  
   as a background job as in Unix without blocking.
*) fixed command ./cmd inside Ch programs
*) added CHHOME/include/chdl.h for easy interface to dynamically loaded lib
*) fixed bin in _ppath  so that _ppath/package/bin will be added
   to env variable PATH for correct handling of packages
*) char *p=NULL; string_t s=NULL;
   printf("%s", p) and  printf("%s", s) will print out nothing instead of (null)
*) fix pow(computational_array, computational_array)
*) fixed numerical functions combination() and factorial()
   for large values. The return type for these functions are
   changed from unsigned int to unsigned long long.
*) fixed
       #define macro generic_function
*) updated complexsolve.chf for handling small epsilon
*) add macro S_ISDIR() in header file sys/stat.h for Windows
*) added foreach.1 for "man foreach"

---------------------------------------------------------------------
Version 3.0.0 build 11101, October 12, 2002
*) complexsolve.chf updated 
Version 3.0.0 build 11101, September 5, 2002
*) added CPlot::dataSetNum()
Version 3.0.0 build 11101, September 5, 2002
*) added CPlot::dataSetNum()
Version 3.0.0 build 11101, September 1, 2002
*) fixed pass float through variable number arguments to C/C++ binary
*) added 
   #pragma remkey(key) 
   to remove keyword key
*) added 
   remkey key
   in command mode to remove keyword key
*) added functions in wchar.h for Solaris/Windows
    fwprintf() vfwprintf() wprintf()
    vwprintf() swprintf() vswprintf()
*) added wsprintf() in Windows
*) fixed wide character output in Windows
Version 3.0.0 build 11091, August 27, 2002
*) initial release of Ch for Mac OS 10.1.3
*) fixed size of struct stat in sys/stat.h
*) fixed sizeofelement()
*) fixed  stat(), lstat(), fstat()
*) updated qrdelete(), qrinsert(), rsf2csf() demos and docs in chref.pdf
*) added exercises for Ch User's Guide chguide.pdf
*) fixed CHHOME/demos/lib/libc/sys/socket/client.ch for Linux
Version 3.0.0 build 11081, August 18, 2002
*) fixed
   #define DFFAULT(val); int fun(int(*f)(int)DEFAULT(0));
*) fixed #if defined  MACRO without parenthesis for MACRO
*) fixed comment /*/// ... */
*) added qrdelete() and qrinsert() for Ch Pro
*) added conio.h and its console I/O functions for Windows
*) fixed Motif for Linux
Version 3.0.0 build 11071, August 13, 2002
*) possible to install in /opt/ch for Unix/Linux
Version 3.0.0 build 11061, August 3, 2002
*) fixed eigensystem()
*) fixed "%s" and "%g" for printf() functions for metanumbers in Windows
Version 3.0.0 build 11051, August 1, 2002
*) fixed
   #define _INC_WINDOWS in windows.h
*) added command "X:" for change dir to X drive in Windows
*) fixed struct tag {...} s; sizeof(s[0]); sizeof(*s)
Version 3.0.0 build 11041, July 23, 2002
*) added long long
   added unsigned long long
Version 3.0.0 build 11031, July 18, 2002
*) updated winsock?.h and socket.h netdb.h arpa/inet.h netinet/in.h for WinSock
Version 3.0.0 build 11001, June 8, 2002
*) added Ch GTK+
*) added Ch OpenGL
*) added Ch Windows in Windows
*) added Ch X/Motif in Unix/Linux
*) Embeddable
*) Running multiple embedded Ch programs
for professional/student editions
*) added Ch Lapack 
*) updated numerical functions logspace(), linspace(), 
   sort(), conv(), pow(), svd()
*) updated CPlot::subplot() 
*) added logarithmic based plotting member functions
   CPlot::loglog()
   CPlot::semilogx()
   CPlot::semilogy()
Version 2.1.0 build 10981, April 2, 2002
*) Can run toolkits better
Version 2.1.0 build 10881, March 10, 2002
*) fixed dot command '. ./cmd' in Ch shell
*) fixed cast operation (classname *) inside a member function
*) for run embedded Ch
Version 2.1.0 build 10871, March 8, 2002
*) fixed 3rd argument of fzero()
*) added VA_NOARG in stdarg.h
*) fixed va_count()
Version 2.1.0 build 10861, Febuary 27, 2002
*) fixed atan2() with computational arg
*) fixed elementtype(NULL)
*) fixed mixed 2D/3D plotting error message for plotting
Version 2.1.0 build 10851, Febuary 20, 2002
*) fixed conditional expression of non-integral types
Version 2.1.0 build 10841, Febuary 18, 2002
*) fixed isinf() and isfinite() 
*) fixed cout, cin, cerr, endl in command mode
*) fixed memmove() warning message
Version 2.1.0 build 10831, January 25, 2002
 *) fixed array for Ch Professional/Student Editions
Version 2.1.0 build 10821, January 16, 2002
 *) support Windows XP
 *) added CHHOME/include/chplot.h 
 *) CHHOME/include/plot.h conflict with existing header file in Unix 
    is obsolete 
 *)added member functions for CPlot class
   data2DCurve(double x[], double y[], int n)
   data3DCurve(double x[], double y[], double z[], int n)
   data3DSurface(double x[], double y[], double z[], int n, int m)
   getLabel(int axis)
   getTitle(void)
 *) change member functions for CPlot class from
    contourLevels(array double levels[&]);
    polygon(array double x[&], array double y[&], array double z[&]);
      to 
    contourLevels(double levels[:], ...  /* int  num */);
    polygon(double x[:], double y[:], double z[:], ... /* int  num */);
 *) elementtype() can distinguish struct/union/enum
 *) added usleep()
 *) Add Unix utilities in Windows
 *) changed safe Ch from sch to chs and all related files and extensions 
    .sch to .chs
    schrc to chsrc
    _schrc to _chsrc
    .schrc to .chsrc
    schlogout to chslogout
    schlogout to chslogout

---------------------------------------------------------------------
Version 2.0.1 build 10801, October 24, 2001

---------------------------------------------------------------------
Version 2.0.0 in September 21, 2001

---------------------------------------------------------------------
Beta version 2.0.0 in April 21, 2001


