Release Notes for Ch, Ch SDK and Embedded Ch SDK

Ch and Embedded Ch Version 6.3.0 July 2010, latest build 14041

Version 6.3.0 build 14041 July 2, 2010 *) fixed Ch Pro to run Ch Mechanism for Linux (32/64 bits) and Mac OS X x86 Version 6.3.0 build 14041 June 30, 2010 *) fixed crash for int fun(a, b) int main() { } *) fixed inconsistency results FILE *p; printf("%p", p); *) fixed the crash introduced in version 6.3.0.14001 for ch -v Version 6.3.0 build 14031 June 18, 2010 *) fixed the demo toolkit/demos/embedch/chapters/chapter5/embedfunc/ for using VC++ 2010 *) fixed SIGL using static lib Version 6.3.0 build 14031 June 15, 2010 *) utilized code singing and signed installation executable files in Windows. *) fixed to generate error message for an extra argument int extra; int myClass::memfunc(void); myClass::memfunc(extra); // ERROR with an argument *) fixed to generate error message for an extra argument int extra; int func(void); func(extra); // ERROR with an argument *) fixed for class constructor without argument using "void". myClass::MyClass(void); myClass var; // OK *) fixed the crash for if (t.undefinedMemberFunc()) { // ERROR without crash ... } *) check for a valid license in ChIDE Version 6.3.0 build 14021 May 28, 2010 *) added the updated Japanese documentations for Ch User's Guide chguide.pdf ChIDE User's Guide chide.pdf on-line HTML Files Ch Reference Guide chref.pdf QuickAnimation User's Guide qanimate.pdf *) supported Visual Studio 2010 for Windows and Win64 in startup file _chrc *) included header file stdarg.h in the header file wchar.h to avoid error messsage of missing va_list. *) fixed the crash bug for declaration within a switch statement such as switch(i) { int f; case 1: ... } With this declaration inside a switch statement, any error in the script would cause a crash when the allocated memory for the switch statement is freed, before this bug has been fixed. *) fixed the crash for int main(void) { long result=0; switch(result) { return 1; } *) fixed the crash for incorrect declaration and initialization right below a brace. { int g = undefined; // it would crash ... } *) fixed crash for fclose(NULL); *) fixed crash for NULL stream for wide character functions in wchar.h *) fixed crash for Sleep.chf with definition of "int sleep(...)" inside the function file Sleep.chf; and similarly for other functions. *) fixed the crash for defining a member function inside a class/struct/union definition class a{ void f(void) { int g; } int b; }; *) fixed plotxy() and plotxyz() using array arguments of [ ]. int func1(double x[], double y[], int n){ plotxy(x, y, n, "title", "x-label", "y-label"); } int func2(double x[], double y[], double z[], int n){ plotxyz(x, y, z, n, "title", "x-label", "y-label", "z-label"); } int func4(double x[], double y[], double z[], int nx, int ny){ plotxyz(x, y, z, nx, ny, "title", "x-label", "y-label", "z-label"); } Version 6.3.0 build 14011 May 19, 2010 *) fixed ChIDE menus for different locales in Win64 Version 6.3.0 build 14011 May 10, 2010 *) fixed c2chf.exe command in Ch SDK compiled using VC++ 2005 for Windows 32 and 64 bits. *) fixed the hanging of a program with a missing '{' for a switch statement during parsing. For example, switch(index) case 2: *) fixed ChIDE for displaying two or higher dimensional arrays. int a[2][3][4] *) fixed ChIDE for displaying values of nested struct/class such as s2 below struct tag1 {int i; struct tag2{int i, j}s; } s2; *) fixed printing for computational arrays using the format specifier "%lf" array double a[3]; printf("%lf", a) Version 6.3.0 build 14001 April 28, 2010 *) fixed the error in the system startup file chrc for Mac PPC. *) RLM license included. *) Add a new member 'licensestr' to ChOptions_t structure for Embedded Ch. *) fixed displaying arrays of structures in Local and Variables menu *) added chguide.pdf, chref.pdf, chsdk.pdf for distribution of Embedded Ch by default Version 6.3.0 build 13901 April 13, 2010 *) modified ChIDE 1) fixed displaying ararys of structures in Local and Variables menu 1) scanf.c can be executed multiple times in debug mode in Unix. 2) header file in the current directory included by #include "header.h" using the "Run" command Version 6.3.0 build 13901 April 10, 2010 *) added mask CH_MASKBINCALLBACK for Ch_AddCallback(). It enables callback when a script code is invoked from the binary space by APIs such as Ch_CallFuncByName(). For example, Ch_AddCallback(interp, CH_MASKLINE | CH_MASKBINCALLBACK, callback, clientdata, count); Version 6.3.0 build 13891 March 19, 2010 *) fixed the memory leak for CPlot::deleteData() in CPlot class. *) _chrc updated for Win 64-bit for using VC++ 2005 and VC++ 2008 *) updated SIGL in Ch Student Edition for Win 64-bit for using VC++ 2005 and VC++ 2008 *) fixed ChIDE command Indent to update the indented program. Version 6.3.0 build 13891 January 28, 2010 *) fixed the buffer overflow for char str[2]; cin >> s; // input more than 2 character, including '\0' characters Version 6.3.0 build 13891 January 22, 2010 *) fixed ChIDE to display values for variables of arrays with more than 80 characters in debug pane. Version 6.3.0 build 13891 January 21, 2010 *) fixed the crash for using a deferred shape array with 0 size: int n = 0; int a[n]; a[2] = 10; // fixed this crash Version 6.3.0 build 13891 January 19, 2010 *) fixed ChIDE in Windows for the display of "Stack 0" in different multi-byte languages such as Japanese (ok for Chinese) in the Debug Pane when the debug pane selection bar selects "Variables". *) Added localized language support for Afrikaans and Aribic in ChIDE Version 6.3.0 build 13881 January 16, 2010 *) fixed ChIDE in Windows, the Debug Console Window cannot hold the value after the program is run by the commad "Run". *) fixed ChIDE in Linux/Mac, the output pane will freezed when scanf() is used multiple times. *) fixed ChIDE when ChIDE is minimized and then exited, it cannot be opened again in Windows. *) fixed ChIDE to update ~/[.]ChIDE.session for different editions and versions. Version 6.3.0 build 13871 January 8, 2010 *) fixed ChIDE to run OpenGL and Windows application programs in Windows. *) fixed ChIDE to run OpenGL application programs in Linux *) fixed ChIDE for using the environment variable LD_LIBRARY_PATH in Linux *) fixed ChIDE for using the environment variable DYLD_LIBRARY_PATH in Mac OS X *) fixed ChIDE to close it quickly if with many opened files in buffers, instead of taking long time. *) fixed the bug for struct node buf[3]; fread(buf, sizeof(struct node), 3, stream); when buf is an array of structures. *) added the feature to support 'const' in C for constants. For example, it will give the error messages for the following cases: const int i, *p; int * const q; i = 10; // ERROR: lvalue is a const object p = &i; *p = 10 // ERROR: lvalue is a const object q = &i; // ERROR: lvalue is a const object Version 6.3.0 build 13861 December 30, 2009 *) fixed a bug for string concatenation. *) fixed a bug for size of structure. fixed crash for X11 Motif programs in Solaris. Version 6.3.0 build 13851 December 24, 2009 *) added QuickAnimation for quick animation and display of geometries and objects Version 6.3.0 build 13851 December 5, 2009 ######## New Features related to ChIDE in all platforms ######## *) In ChIDE, enable the command "Run" in ChIDE in Linux and Mac OS X to run programs with input from stdin using scanf() and other I/O functions. *) In ChIDE, use different colors for different stacks for calling functions. Add using a different color for a different stack. Use the same colors in the Debug Pane to correspond the stacks in the Debug Pane when the menu Variable is selected in Debug Selection Bar. *) In ChIDE, added the feature of using abbreviations for shortcut. added the option to open global and user abbreviations files in the Options menu in ChIDE. The shortcuts include a template for homework, adding header files, macros, function main(), control structure and repetition statements, struct/class/union/enum types, array/characters/string constants, standard header files, standard functions, etc. *) In ChIDE, added the feature to allow the user to set the size of debug pane and sizes of debug tabs in ChIDE in Windows. These values in the previous session will be used when ChIDE is launched next time. *) In ChIDE C/Ch/C++ programs can be typed in the Output Pane to run directly. *) In ChIDE, program names can contain spaces. *) In ChIDE, added menu tips for "Locals", "Variables", "Stack", "Watch", "Breakpoint" in Debug Pane for Linux and Mac. *) In ChIDE, "Stack" for Variables menu in Debug Pane is translated in different languages. *) In ChIDE, file ~/[.]ChIDEUser.properties will be updated automatically for a different version. *) In ChIDE, session file ~/[.]ChIDE.session file is saved with the version number. *) In ChIDE, each user can use different font size for Ch Professional Edition. *) In ChIDE, the commands 'ch' and 'which' work in the output pane in ChIDE in Linux and Mac. *) In ChIDE, added the command View | Default Layout to reset the default layout based on the properties in CHHOME/chide/ChIDEGlobal.properties and ~/[.]ChIDEUser.properties. *) In ChIDE, changed the command View |Debug to View |Debug Pane *) In ChIDE, changed View | Parameters to Tool | Command Line Arguments *) In ChIDE, added the properties debugpane.horizontal.size=300 debugpane.vertical.size=155 to set the size of debug pane in ChIDE. *) In ChIDE, added the properties debugtab.locals.name.size=160 debugtab.variables.name.size=160 debugtab.stack.stacklevel.size=160 debugtab.watch.expression.size=160 debugtab.breakpoints.number.size=110 to set the sizes of debug tabs in ChIDE in Windows. Although the sizes for these values can be setup, they are automatically adjusted in Linux. *) In ChIDE, added the properties debugconsolewindow.left=600 debugconsolewindow.top=128 debugconsolewindow.width=429 debugconsolewindow.height=319 to set the position and size of Debug Command Window in Windows. *) In ChIDE, added a clickable menu when the file name is right clicked for ChIDE in Linux and Mac so that ChIDE will behave the same as in Windows. *) In ChIDE, changed the Indent command in ChIDE for proper indentation of cases in switch-statement, and private and public in a class definition. *) In ChIDE, added auto complete word when editing the program . *) In ChIDE, added the feature to allow the user to set the size of debug pane and sizes of debug tabs in ChIDE in Windows. *) In ChIDE, Ch scripts without a file extension will be treated properly with syntax highlighting, executable permission, etc. *) In ChIDE, Handling the Indent command in Tools menu and context menu by clicking the file name has been improved for C/Ch/C++ program with or without file extensions. *) In ChIDE, Handling makefiles in Tools menu and context menu by clicking the file name has been improved for the following makefiles: *.mak makefile Makefile makefile.win Makefile.win makefile_win Makefile_win makefile.Win Makefile.Win makefile_Win Makefile_Win *) In ChIDE, fixed in Unix for "Save As" command. The newly created C/Ch/C++ program will be executable in the Ch command shell. *) In ChIDE, associated the function key F4 with "Next Error Message", instead of "Stop Executing". *) In ChIDE, changed "Next Message" and "Previous Message" to "Next Error Message" and "Previous Error Message", respectively, in ChIDE. *) In ChIDE, updated with the better color for foreground and background for selection of text inside the editing pane. *) In ChIDE, added a Ch icon in the entry System Tools in the startup menu in Linux to launch Ch in the startup menu in Linux. *) In ChIDE, ChIDE is supported for Linux x86 64-bit now. *) In ChIDE, sessions in ChIDE is saved in ~/ChIDE.session in Windows and ~/.ChIDE.session in Unix. *) In ChIDE, when execute a program with scanf() in "Run" in ChIDE in Windows, the cursor moves to the input/output pane automatically. *) In ChIDE, added in Linux. The command "ch -d" will create an icon for Ch on the desktop. If Ch is installed with a ChIDE, an icon for ChIDE will also be created on the desktop. ######## New Features in all editions and platforms ######## *) Ch Student Edition contains Ch Mechanism Toolkit and Ch Control System Toolkit, in addition to SoftIntegration Graphical Library (SIGL). *) compiled Ch and Embedded Ch for Windows using Visual C++ 2005 To be compatible with the binary code, the data type time_t in Windows is 8 bytes, instead of 4 bytes. *) The function _wfopen() works in in Windows using VC++ 2005 *) added API Ch_Reset() so that Ch_RunScript() and Ch_ExecScript() can be called multiple times for a single instance of interpreter. *) update Windows commands for the Win64 platform. *) added functions complexsolvePP(), complexsolvePR(), complexsolveRP(). complexsolveRR(), complexsolveRRz() in numeric.h *) Several Unix utility programs in Windows are updated to run in Windows 64-bit. *) added CPlot::sizeOutput(int xpixels, int ypixels); *) added the function int funcarray(double *y, double (*func)(double x), double *x, int n); in numeric.h ######## Bugs fixed ######## *) In ChIDE, Fixed the frozen screen for a short period of time for ChIDE and Debug Console Window when the Debug Console Window is moved in Windows XP. *) In ChIDE, fixed delete functionality for delete Chinese characters in the editor pane in ChIDE *) Fixed crashing of ChIDE for Windows for a large program with many function files. *) In ChIDE, fixed pass command line arguments to a program in debug mode. *) In ChIDE, fixed pass command line arguments to a binary program. *) In ChiDE, fixed hot keys for several menus. *) fixed "Expression" in "Watch" in ChIDE in Windows *) fixed error messages when an error appears in the previous lines to make the error messages more clear. *) fixed error messages from "debug> " in the Debug Command Pane in ChIDE to make the error messages more clear. *) fixed in vertical mode, by default, "debug> " is missing in ChIDE. *) use "Number" instead of "Breakpoint Number" for Breakpoints by default in ChIDE. *) In ChIDE, fixed plotting for Mac OS X x86 v10.6 or higher *) updated Debug Console Window for ChIDE and Ch Terminal in Linux. *) The indenting feature updated in ChIDE *) fixed crash for Ch Student and Evaluation Edition when the size of an array exceeds the limit. *) fixed ChIDE to translate different editions in the proper locale. *) fixed ChIDE, for the debug command 'Clear' for clear breakpoints. The menu 'Clear' is non-clickable if no breakpoint has been set yet. *) In ChIDE , fixed, in Windows, when clicking the blank space on the left of "Breakpoint" menu on Debug Pane, it will close Output Pane or change to a different size. *) fixed the function with the data type of a return value different from the function return type. An implicit cast is applied. *) updated Ch User's Guide about handling of wide characters. *) fixed applications using Embedded Ch with multi-threads for Linux 64bit and other platforms. *) fixed error message handling in ChIDE to load the correct file based on the errror message. *) fixed "Watch" menu in the Debug Selection Bar in ChIDE for watching multiple expressions in Unix. *) fixed Help and ChIDE Help menu in ChIDE. *) Fix ChIDE in Windows Vista when no session file, it did not work for the first time. *) fixed load sample code when ChIDE is started first time. *) fixed the font size in Debug Pane of ChIDE to be the same as other panes in both Windows and Unix. *) fixe the ChIDE, the width of the names in Debug Pane can also be adjusted in Linux and Mac OS X *) fixed ChIDE error message when a file cannot be saved in a directory. *) fixed the _status value even when the function main() returns char type. This also fixed the return value for Ch_RunScript(). *) fixed plotting in some linux distribution *) fixed line type, line width, color attributes for points, lines, rectangles, polygons, and circles of plotting. *) fixed the menu for changing font size in ChIDE *) fixed ChIDE in Unix works when Ch is not installed in /usr/local/ch. *) In ChIDE , fixed, in Windows, when clicking the blank space on the right of " Breakpoint" menu on Debug Pane, it will close Output Pane or change to a different size. *) fixed crash for char ss[100]; void func(char **value); func(&(&ss)); // this crash fixed *) fixed crash of vsnprintf() in Windows and Linux *) fixed signal.h, param.h, endian.h, and byte_order.h in Mac OS X x86 *) fixed the case struct tag { int (*p[10])(void); } t; int func(void); t.p[0] = func; *) updated the demo for gethostbyaddr() and gethostbyaddr_r() *) Fixed the data type sizeof() in 64-bit machine as unsigned long long *) updated round(); *) fixed memory leak for if(exp1) return val1 else if(exp2) return val2 else return val3 Version 6.1.0 build 13751 April, 2009 *) fixed plotting data with small values. *) added indentation (program astyle) for Linux and Mac OS X x86 for Ch Pro, student, and evaluation edition for ChIDE. Version 6.1.0 build 13741 February, 2009 *) added the function _wfopen() and its prototype in the header file wchar.h for Windows. *) added #include <stdarg.h> in the function file wprintf.chf for use in the command prompt. Version 6.1.0 build 13731 January, 2009 *) fixed infinite number of calls to Ch_AppendRunScript() in Linux. Version 6.1.0 build 13721 January, 2009 *) supported hexadecimal floating-point contants in C99 0xhex_digit_seq[.hex_digit_seq]p[+|-]binary_exponent[suffix] which is interpreted as hex_digit_seq.hex_digit_seq x 2^((+|-)binary_exponent) For example, in a Ch command shell, > 0X2P3 16.0000 > 0x1.1p0 1.0625 > 0x1.1p1F 2.12 *) fixed the infinite number of instance of Embedded Ch using Ch_Append*(). Closed the last file so that no error message for exceeding the number of opened function files. *) fixed the very large number for isinf() and isfinite(). Version 6.1.0 build 13721 January, 2009 *) fixed scanf() in the Ch command shell does not return a value *) fixed C array name in the Ch command shell will show the prompt properly. Version 6.1.0 build 13711 January, 2009 *) added the following math functions in math.h for C99 #define lround(X) ((long int) round(X)) #define llround(X) ((long long int) round(X)) #define isunordered (X, Y) (isnan(X) || isnan(Y)) int fpclassify(double); int isnormal(double); int signbit(double); #define FP_NAN 0 #define FP_INFINITE 1 #define FP_ZERO 2 #define FP_SUBNORMAL 3 #define FP_NORMAL 4 *) added the following math functions in math.h for C99 for Linux and HPUX llrint.chf llrintf.chf lrint.chf lrintf.chf nexttoward.chf nexttowardf.chf *) added the following to float.h for C99 #define FLT_EVAL_METHOD -1 #define DECIMAL_DIG 21 #define HUGE_VALF FLT_MAX #define MATH_ERRNO 1 #define MATH_ERREXCEPT 0 #define math_errhandling MATH_ERRNO typedef float float_t; typedef double double_t; Version 6.1.0 build 13711 January, 2009 *) Fixed fabs() to treat it as a type generic math function. it returns double. Version 6.1.0 build 13701 January, 2009 *) Fixed int func(int a[restrict]); int func2(int b[restrict][10]); *) Fixed the header file tgmath.h to include complex.h *) Fixed fabs() to treat it as a type generic math function in math.h. Version 6.1.0 build 13701 December, 2008 *) Fixed int * restrict ptr; int * volatile ptr; Version 6.1.0 build 13691 December, 2008 *) Fixed enhanced text for subplots using CPlot::enhanceText() *) updated Ch_AppendParseScript() and Ch_AppendParseScriptFile() with WARNING3 level. *) fixed pkginstall.ch by adding the following command for Linux chcon -t texrel_shlib_t $chpackage/$(pkgname)/dl/*.dl Version 6.1.0 build 13681 November, 2008 *) fixed the crash in 64-bit machines double **a; a[i] = address; Version 6.1.0 build 13671 November, 2008 *) added Dynamical Embedded Ch lib *) fixed the crash for Ch_Reopen(interp, filename) when filename does not exist or do not have proper permission. Version 6.1.0 build 13661 November, 2008 *) fixed the crash for a return statement not in a function definition. *) fixed the crash for integer mod by zero intvalue%0. Version 6.1.0 build 13651 October, 2008 *) fixed int func(); (*func)(); Version 6.1.0 build 13641 October, 2008 *) fixed ChIDE for debugging programs with pointer to pointers. (no change for the kernel) *) updated binary programs egrep.exe, fgrep.exe, file.exe, grep.exe, wget.exe in CHHOME/bin/ for Windows Version 6.1.0 build 13631 September, 2008 *) added CPlot::lineType(int type, int width, ... /* char *colorname or rgb */), to change line type, width, and color for lines, impulses, steps, etc. *) added CPlot::pointType(int type, int size, ... /* char *colorname or rgb */), to change point type, size, and color for points. *) added CPlot::enhanceText(void) to turn on the enhanced text mode for terminal and output files that support additional text format. *) 3D curve in plotting does not use color box. *) ChIDE updated with the following features (a) When dragging the divide line between text editing window and output, debug window will not be displayed if it was not visible to start with. (b) rearranged function keys for ChIDE (c) rearrange items for Views, Tools, Debug, and Option menus. *) documented compilation options /MDd, /MT, /MTd for using Embedded Ch in Windows *) documented support of Intel C++ compiler for Embedded Ch. Version 6.0.0 build 13621 September, 2008 *) modified Ch_AppendRunScript() so that the code can have more 5120 characters. *) modified Ch_AppendParseScript() so that the code can have more 5120 characters. *) fixed Ch_CallFuncByNameVar() for arguments of structure type. *) added API int Ch_CallFuncByAddrv(ChInterp_t interp, void *fptr, void *retval, va_list ap); int Ch_CallFuncByNamev(ChInterp_t interp, const char *name, void *retval, va_list ap); Version 6.0.0 build 13611 August, 2008 *) fixed crash in Linux for Ch_AppendParseScript(interp, "#include \"headerfile.h\""); *) fixed the return value for Ch_AppendRunScript(interp, code); Version 6.0.0 build 13601 July, 2008 *) fixed 'help' command in Mac OS X due to strcmp(_Chedition, "Standard") *) updated header files for 64-bit machines for size_t, ssize_t, and ptrdiff_t *) updated malloc() for 64-bit machines *) fixed converting tokens of predefined macros into strings in nested macros #define DO_STR(thing) STR(thing) #define STR(thing) #thing printf("str = %s\n", DO_STR(__FILE__)); Version 6.0.0 build 13591 July 17, 2008 *) fixed Ch_DeclareVar() in Mac OS X *) fixed 'k=j;' in 'int i, j; int &k = i; k = j;' *) fixed crash for 'void f1(void) { f2(int path);}' *) added a default session for the first time use of ChIDE *) fixed getnum() printing the message twice. *) fixed ChIDE (a) handling of Tabs in Makefiles in ChIDE correctly (b) disabled clicking to close Debug Console Window (c) Output pane can be closed during debugging using Continue, Step, Next. *) fixed CPlot::dataFile() for 3D plotting to not remove data file. *) added yank function ^Y for emacs editing in Ch command shell. after you used ^U, ^W, ^K, then you can paste the strings you deleted everywhere Version 6.0.0 build 13581 April 6, 2008 *) fixed handling '\n' in Ch_AppendParseScript(interp, "class def{int a;\ int j; \n\ double d;};"); *) updated ChIDE source code with .ch extension will be treated as C++ code for compilation. *) updated CHHOME/docs/man/cat1/ for Windows *) command 'hexdump' added in Windows. It dumps a file to a stdout in CP/M-like hexadecimal format. *) changed, complex is by default double complex complex z; double complex z; are the same. Use float complex z; to declare z of two floats, one for real and the other for imag part *) updated _chrc default for support .NET 2005 and 2008 for X64 compilation. *) fixed bool in stdbool.h *) changed the Boolean type "bool' from int to unsigned char in stdbool.h Version 6.0.0 build 13571 April 1, 2008 *) fixed sin() and cos() in Korebot Linux *) fixe if /usr/lib/lib/libreadline.so.4 does not exist, keep /usr/local/ch/extern/lib/libreadline.so.4 for Linux *) fixed gnuplot_x11 driver plotting issue for Linux and Unix Version 6.0.0 build 13571 March, 2008 *) support Visual C++ 2008 for Ch SDK *) fixed complex.h remove the complex data types double_complex float_complex in complex.h. They are no longe supported in C++. Users needs to typedef in their own program for this. *) fixed the error message ERROR: mod operator % is applied to nonintegral values Version 6.0.0 build 13571 March, 2008 *) added getline.h and getline() compatile with GNU getline() in all platforms. Version 6.0.0 build 13571 March, 2008 *) fixed median() in Ch command shell *) fixed comparison of unsigned char's with value larger than SCHAR_MAX Version 6.0.0 build 13561 February, 2008 *) fixed plotting for Mac OS X. Version 6.0.0 build 13551 February, 2008 *) fixed function copysign() in Windows *) fixed floating-point numbers *) added vc .net 2008 support for ch Version 6.0.0 build 13541 February, 2008 *) added function round() in C99 *) fixed floating-point constant values with consistent values after 15 significant digits *) updated the local file locale.ko_KR.properties with Korea translation *) updated locale files locale.*.properties updated Version 6.0.0 build 13531 February, 2008 *) fixed getline() in stdio.h so that it is consistent with C for Linux *) fixed double quotation marks in command line (1) commandarg.c \"str1 str2\" "str3 str4" "str5" str6 (2) alias("findg", "find . -name _argv[1] | xargs grep _argv[2]"); in .chrc or _chrc for command findg "*.h" time.h Version 6.0.0 build 13521 February, 2008 *) fixed when the Debug Console Window is closed by the command View | Debug Console Window. The command View | Debug Console Window Always on Top is not necessary. *) fixed time(NULL) interactive executed in a Ch command shell. Version 6.0.0 build 13521 January, 2008 *) fixed evaluation edition for Windows Version 6.0.0 build 13511 January, 2008 *) fixed dllink.exe for Windows. Mac OS X, and QNX *) added 'Views' | 'Change Font Size' in ChIDE *) updated indent option for handling braces in ChIDE *) fixed the relational expressions with (unsigned) long long types in Windows such as ulli_zero > ulli_max Version 6.0.0 build 13501 December, 2007 *) fixed Ch_Initialize() for multi-thread applications Version 6.0.0 build 13491 December, 2007 *) fixed crash for calling Ch_Abort() right after Ch_ParseScript(). *) fixed hang for the multi-byte space characters int a,b;\201@\201@ *) added _formatf with ".2f" for the default output format for float. _formatd with ".4lf" for the default output format for double. *) fixed a[i] in debug command in ChIDE Version 6.0.0 build 13481 November, 2007 *) fixe array size handling for student edition Version 6.0.0 build 13471 November, 2007 *) Overloaded plotxy() function to be compatible with SIGL C++ graphical lib plotxy(x, y, n); plotxy(x, y, n, title, xlabel, ylabel); plotxy(x, y, n, title, xlabel, ylabel, &plot); in addition to plotxy(x, y); plotxy(x, y, title, xlabel, ylabel); plotxy(x, y, title, xlabel, ylabel, &plot); *) Overloaded plotxyz() function to be compatible with SIGL C++ graphical lib plotxyz(x, y, z, n); plotxyz(x, y, z, n, title, xlabel, ylabel, zlabel); plotxyz(x, y, z, n, title, xlabel, ylabel, zllabel, &plot); plotxyz(x, y, z, nx, ny); plotxyz(x, y, z, nx, ny, title, xlabel, ylabel, zlabel); plotxyz(x, y, z, nx, ny, title, xlabel, ylabel, zllabel, &plot); in addition to plotxyz(x, y, z); plotxyz(x, y, z, title, xlabel, ylabel, zlabel); plotxyz(x, y, z, title, xlabel, ylabel, zllabel, &plot); *) fixed ChValueNode_t Ch_ExprValue(ChInterp_t interp, const char *expr, void *result); when the expr is a function Version 6.0.0 build 13461 November, 2007 *) changed Embedded Ch API from int Ch_StackName(ChInterp_t interp, int level, int *isfunc) to int Ch_StackName(ChInterp_t interp, int level, int *isfunc, char **classname) *) For Ch_Initialize(&interp, NULL), by default, it will use CHHOME/toolkit/embedch/extern/lib/chmt1.dl, etc, instead of using /usr/lib/chmt1.dl, etc in Unix and C:/Windows/System32/chmt1.dl, etc in Windows it will use CHHOME/toolkit/embedch as Embedded Ch home dir instead of using CHHOME as Embedded Ch home dir Version 6.0.0 build 13451 October, 2007 *) fixed _warning Version 6.0.0 build 13441 October, 2007 *) fixed Ch_StackName() when the stack is changed. Version 6.0.0 build 13431 October, 2007 *) fixed vi for Windows Vista *) fixed CPlot::plot.axisRange(PLOT_AXIS_X2, min, max); CPlot::plot.axisRange(PLOT_AXIS_Y2, min, max); Ch_ChangeStack() source of the block gives the correct file name at the top level. Version 6.0.0 build 13421 October, 2007 *) Callback added by Ch_AddCallback() will be valid when main() is executed for a C/C++ program. For Ch script without main(), the callback will be called at the first executable line. When atexit() is called, callbacks will be disabled. Version 6.0.0 build 13411 September, 2007 *) Fixed the return value for Ch_ParseScript(). Version 6.0.0 build 13401 September, 2007 *) When the warning level for _warning is 3 or for parsing 'ch -n program' and Ch_ParseScript(), it will give a warning when the argument of function or assignment of point type does not match. *) fixed bug for system("cmd_with.c") in Windows Version 6.0.0 build 13381 August, 2007 *) added command astyle.exe for Windows for indentation of C/Ch/C++ programs *) moved Ch_Version() from Embedded Ch to Ch SDK *) added command "watch expr" in the sample debugger for EMbedded Ch. Version 6.0.0 build 13381 August, 2007 *) fixed bool in stdbool.h Version 6.0.0 build 13381 August, 2007 *) changed the Boolean type "bool' from char to int in stdbool.h *) added Embedded Ch APIs ChValueNode_t Ch_ExprValue(ChInterp_t interp, const char *expr, void *result); int Ch_DeleteExprValue(ChInterp_t interp, ChValueNode_t vn); to btain the value of an expression of different data type. Version 6.0.0 build 13371 August, 2007 *) fixed crash when the script, with class and incorrect syntax, is processed by Ch_ParseScript() second time. Version 6.0.0 build 13361 August, 2007 *) Added Embedded Ch API int Ch_StackName(ChInterp_t interp, int level, int *isfunc) to obtain the stack name. *) added member functions for CPlot class void CPlot::axes() void CPlot::barSize() void CPlot::boxBorder() void CPlot::boxFill() void CPlot::boxWidth() void CPlot::data() int CPlot::dataFile() void CPlot::dataSetNum() void CPlot::deleteData() void CPlot::funcp2D() void CPlot::funcp3D() void CPlot::legendOption() void CPlot::origin(); void CPlot::smooth() void CPlot::ticsLabel() void CPlot::ticsPosition() void CPlot::ticsRange() *) Overloaded the following member functions functions in SIGL C++ lib void CPlot::axisRange() void CPlot::coordSystem() int CPlot::dataFile() void CPlot::legendLocation() void CPlot::outputType() void CPlot::plotType() *) Added new plot types for CPlot class with macros PLOT_PLOTTYPES_BOXES PLOT_PLOTTYPES_BOXERRORBARS PLOT_PLOTTYPES_BOXXYERRORBARS PLOT_PLOTTYPES_CANDLESTICKS PLOT_PLOTTYPES_FILLEDCURVES PLOT_PLOTTYPES_FINANCEBARS PLOT_PLOTTYPES_VECTORS PLOT_PLOTTYPES_XERRORBARS PLOT_PLOTTYPES_XYERRORBARS PLOT_PLOTTYPES_YERRORBARS PLOT_PLOTTYPES_XERRORLINES PLOT_PLOTTYPES_XYERRORLINES PLOT_PLOTTYPES_YERRORLINES *) Added x2 and y2 coordinates with macros PLOT_AXIS_X2 PLOT_AXIS_Y2 *) Added filled boxes and curves with the fill styles void CPLot::boxFill() PLOT_BOXFILL_EMPTY, for "empty" PLOT_BOXFILL_SOLID, for "solid" PLOT_BOXFILL_PATTERN for "pattern" *) changed CPlot::grid(int flag, .../* int type */); to CPlot::grid(int flag) CPlot::grid(int flag, char *option) *) change plot.polarPlot(PLOT_ANGLE_DEG); plot.grid(PLOT_ON, PLOT_GRID_POLAR); to plot.polarPlot(PLOT_ANGLE_DEG); 1a) plot.grid(PLOT_ON); 1b)plot.grid(PLOT_ON, "polar"); 1c)plot.grid(PLOT_ON, "polar [angle]"); *) removed macros PLOT_GRID_POLAR PLOT_GRID_RECTANGULAR *) changed int arrow(double x_head, double y_head, double z_head, double x_tail, double y_tail, z_tail, ... /* [double line_type, double line_width] */ ); to int arrow(double x_head, double y_head, double z_head, double x_tail, double y_tail, z_tail, ... /* [char *option] */ ); *) fixed the crash there is no closing comment delimiter '*/' for a program using a function in a function file. *) fix the crash in command line for > int i > for (i=0;i<10;i++) {printf("%d",i)} ERROR: missing ';' > for (i=0;i<10;i++) {printf("%d",i);} ERROR: missing '}' Version 6.0.0 build 13351 July, 2007 *) fixed unsigned u = -1u; int i; i = 0-u; Version 6.0.0 build 13341 July, 2007 *) fixed when the data type of an lvalue of element of a VLA with an incremental operation is different from the data type of the rvalue int k, n=10; double a[n]; a[k++] = intvalue; // fixed this bug with k incremented twice *) updated arraycopy() to handle pointer type arraycopy(desptr, destype[_ptr], srcptr, srctype[_ptr], n); *) updated lindata() to handle pointer type lindata(x0, xf, a) lindata(x0, xf, p, n) Version 6.0.0 build 13331 June, 2007 *) added int Ch_InitGlobalVar(ChInterp_t interp, int flag); so that global variables are initialized at the parse time *) fixed initialization of an array of global scope. Like scalar variable, the inialization is done now at runtime, instead of parse time. *) fixed to give an error message for initialization of an argument of function such as "int func(int i=10)" at the parse time. Version 6.0.0 build 13321 June, 2007 *) added size_t Ch_DataSize(ChInterp_t interp, const char *expr); to obtain the size of a variable or expression. *) CH_MASKLINE will not trigger a statement multiple times *) Add a sample console debugger using Embedded Ch in embedch.pdf Version 6.0.0 build 13291 June, 2007 *) CH_MASKLINE will not trigger the internally added statement static const char __func__[]= "funcname"; CH_MASKLINE will not trigger declaration statement. int i; CH_MASKLINE will trigger declaration and initialization statement. int i = 10; CH_MASKLINE will trigger declaration of VLA. int n = 10; int a[n]; Version 6.0.0 build 13281 May, 2007 *) updated CPlot class *) CH_MASKLINE will not trigger the callback for non-executabe line of { and } Version 6.0.0 build 13271 May, 2007 *) added int Ch_DeclareTypedef(ChInterp_t interp, const char *name); Ch_DeclareTypedef() changes a system variable declared by Ch_DeclareVar() into a typedefed type specifier in the Ch space. *) added int Ch_AddCallback(ChInterp_t interp, int mask, ChBlock_t callback, ChPointer_t clientdata, int count); int Ch_ChangeStack(ChInterp_t interp, level, ChBlock_t *calldata); *) added ChUserDefinedTag_t Ch_UserDefinedTag(ChInterp_t, const char *name); int Ch_UserDefinedInfo(ChInterp_t interp, ChUserDefinedTag_t udtag, ChUserDefinedInfo_t *udinfo); int Ch_UserDefinedMemInfoByName(ChInterp_t interp, ChUserDefinedTag_t udtag, const char *memname, ChMemInfo_t *meminfo); int Ch_UserDefinedMemInfoByIndex(ChInterp_t interp, ChUserDefinedTag_t udtag, int index, ChMemInfo_t *meminfo); *) added void *Ch_GlobalSymbolAddrByName(ChInterp_t interp, const char *name); int Ch_GlobalSymbolIndex(ChInterp_t interp, const char *name); int Ch_GlobalSymbolTotalNum(ChInterp_t interp); void *Ch_GlobalSymbolAddrByIndex(ChInterp_t interp, int index); char *Ch_GlobalSymbolNameByIndex(ChInterp_t interp, int index); *) added API Ch_FuncType() with the return type of ChFuncType_t typedef enum ChFunctype_ { CH_NOTFUNCTYPE, /* not function */ CH_FUNCTYPE, /* regular function */ CH_FUNCPROTOTYPE, /* function prototype without function definition */ CH_FUNCPTRTYPE, /* pointer to function */ CH_FUNCMEMBERTYPE,/* member function of a class */ CH_FUNCCONSTYPE, /* constructor of a class */ CH_FUNCDESTTYPE /* destructor of a class */ } ChFuncType_t; Use Ch_FuncType() to test if a variable is a function prototype. *) Modified ChType_t Ch_DataType(ChInterp_t interp, const char *expr); ChType_t Ch_ArrayType(ChInterp_t interp, const char *expr); int Ch_ArrayDim(ChInterp_t interp, const char *name); int Ch_ArrayExtent(ChInterp_t interp, const char *name, int index); int Ch_ArrayNum(ChInterp_t interp, const char *name); int Ch_SetVar() int Ch_ExprEval() etc. to handle local variables. *) changed the handling of Ch_SymbolAddrByName(interp,"a") for array 'int a[2][3];' in Ch space to be consistent with handling of C array. change int *pa; pa = *(int **)Ch_SymbolAddrByName(interp,"a"); to int *pa; pa = (int *)Ch_SymbolAddrByName(interp,"a"); *) changed Function Ch_IsVariable() is deprecated. Use ChVarType(). Function Ch_IsFunc() is deprecated. Use Ch_FuncType(). Function Ch_SymbolIndex() is deprecated. Use Ch_SymbolIndexByName(). Use ChVarType() to test if a variable is a global or local variable. *) changed Ch_UserDefinedSize() is deprecated. Ch_UserDefinedName() is deprecated. use Ch_UserDefinedTag() and Ch_UserDefinedInfo(). *) changed Ch_ArrayType() A pointer to array of 'type' is not treated as array by Ch_ArrayType(). For a pointer to array of 'type', Ch_DataType() gives the pointer to 'type'. *) changed, A tag name for class, structure, union, and enum, and value for enumeration are not in the symbol table accessible by Ch_Symbol*() functions. Example, struct tag {}; enum tage{e1, e2}; tag, e1, e2 are not variables. They are not in the symbol table. *) fixed the display of C array in a command prompt *) fixed crash for VLA: int n=-1; int a[n]; Version 5.5.0 build 13261 April, 2007 *) fixed semaphore in Linux. Added sample code for using semaphone for both Unix and Windows at CHHOME/demos/lib/libc/semaphore/ for Unix CHHOME/demos/toolkit/demos/Windows/semaphore/ for Windows *) fixed specialmatrix() working in Windows with windows.h *) Added sample code for using event for Windows at CHHOME/demos/toolkit/demos/Windows/event/ *) added clock_settime() and clock_gettime() etc in Linux *) added command 'stackvar' in the command mode to display values of variables in all stacks in the current shell. For example, > int i = 10; > double d = 1.1234; > stack i 10 d 1.1234 *) changed. The computation and assignment for initialization of global variables are performed at run time. Initializors of global variables can contain functions defined in function files. For example, int globalvar = funcInFuncFile(10); int main() {...} *) changed. The constructor of a global variable of class type is called at runtime, instead of at parse time. A class, whose constructor calls functions, can be instantiated as global variables. *) fixed crash for for (undefined=0; undefined<19; ++undefined) *) fixed crash for switch(i) { case 1: firstStError; break; } Version 5.5.0 build 13251 April, 2007 *) fixed Ch_Initialize() for installation of Embedded Ch in a machine without regular Ch installed when an application is compiled using Borland C/C++ Compiler. *) fixed SymbolAddrByName(interp, "a") when 'a' is a computational array. It is handled the same as C array as a pointer to pointer to type. *) fixed memory leak for Ch_SetVar(interp, "s", CH_STRUCTTYPE, "tag", &s); Version 5.5.0 build 13241 March, 2007 *) fixed prompt crash for evaluation of expression in Mac OS X such as > 1+1 Version 5.5.0 build 13231 March, 2007 *) fixed Ch_DeclareFunc(interp, "int func(void);", funcptr); Version 5.5.0 build 13221 March, 2007 *) added int Ch_DeclareVar(ChInterp_t interp, const char *declaration); int Ch_DeclareFunc(ChInterp_t interp, const char *funcprototype, ChFuncdl_t funcptr); int Ch_SetGlobalUserData(ChInterp_t interp, ChPointer_t userdata); ChPointer_t Ch_GetGlobalUserData(ChInterp_t interp); Ch_DeclareVar() declares variables and functions with the system scope of __declspec(global) in Ch space. Ch_DeclareFunc() declares a function with the system scope of __declspec(global) in Ch space which call a C function in the binary space. Ch_SetGlobalUserData() sets the global user data. It is useful when multi Embedded Ch engines are invoked. Ch_GetGlobalUserData() gets the global user data. *) fixed preprocessing directives with a continuation line at the beginning of a function file. #define MACRO(a,b) (a+b)* \ (a-b) int funcFile() { *) changed the location of the distribution of dynamically loaded lib chmt#.dl in Windows from EMBEDCH_HOME/bin/chmt#.dl to EMBEDCH_HOME/extern/lib/chmt#.dl so that they are located in the same location for all platforms. Version 5.5.0 build 13211 March, 2007 *) fixed Giving an error message for registering a local function for atexit(). *) fixed Ch_AppendParseScript() crash when a variable declaration failed. *) fixed the deadlock for Ch_Initialize() when it fails multiple times in Windows. *) fixed the bug for the case of void Func(void (*func)(float fa[])) void f(float *pf); Func(f); *) fixed the default int type for const n = 10; register r = 10; volatile v = 10; Version 5.5.0 build 13191 March, 2007 *) fixed Ch_Initialize(&interp, option) when option is not NULL. Version 5.5.0 build 13181 March, 2007 *) fixed the return value of Ch_Abort() and abort a program with main(). Version 5.5.0 build 13161 March 6, 2007 *) updated Ch_Abort(). *) fixed Ch_Initialize() for installation of Embedded Ch in a machine without regular Ch installed. Version 5.5.0 build 13151 March, 2007 *) added new API Ch_Version() to obtain the version info for Embedded Ch. Version 5.5.0 build 13141 March, 2007 *) modified Ch_Abort() in Embedded Ch so that it can be called to abort the execution of a Ch script in a different thread. Version 5.5.0 build 13131 February, 2007 *) disbaled step-by-step debug during program parsing for _stop(). *) fixed Ch_AppendParseScript(interp, "int a;\ \n\ double d;"); Version 5.5.0 build 13121 February, 2007 *) fixed Ch_AppendParseScript(interp, "int a\n"); *) fixed shape(streval(str)) *) updated usleep() in Windows to behave the same as in Unix Version 5.5.0 build 13111 February, 2007 *) fixed pow(integer, integer). It will return a double instead of integer. Version 5.5.0 build 13101 January, 2007 *) fixed the debug function _stop() skip the debug of header files and multiple appearance of the same statement during debugging. Version 5.5.0 build 13091 January, 2007 *) added function va_tagname() in stdarg.h to obtain the tag name if the variable argument is struct/class/union type. *) fixed the return data type of va_datatype() in stdarg.h when the variable argument is struct/class/union type of CH_STRUCT*TYPE/CH_CLASS*TYPE/CH_UNION*TYPE. *) fixed the prompt display for a function of void type and an expression of computational array type. It will not display extra empty line. > func() output from func() > Version 5.5.0 build 13081 December, 2006 *) updated numerical functions fsolve() linsolve() inverse() cinverse() pinverse() with argument of assumed-shape array [:] instead of array of refernece [&]. *) added functions oderk() for solving ordinary differential equations. Function oderungekutta() is obsolete, use oderk(). *) added function eigen() for finding eigenvalues and eigenvectors of a matrix. Function eigensystem() is obsolete, use eigen(). *) added function clinsolve() for solving a system of complex linear equations. Version 5.5.0 build 13071 December, 2006 *) added functions lindata() and logdata() in numeric.h. Function calls lindata(x0, xf, a) logdata(x0, xf, a) to replace linspace(a, x0, xf) logspace(a, x0, xf) These two functions are obsolete for now. But these function names will be re-used for other purposes in the future. *) fixed CPlot:getSubplot() in Unix *) added member functions for CPlot class in chplot.h CPlot::func2D(); CPlot::func3D(); for adding data for plotting using a function *) added function shape(a, index) to obtain extents for an array, in addition to the shape of the array. array int a[3][4]; array int dim[2] = shape(a); // dim[0] =3, dim[1] = 4; int m = shape(a, 0), n = shape(a,1); // m =3, n = 4; *) added arraycopy() in stdarg.h for copy arrays for variable number of arguments *) added three functions in stdarg.h for handling variable number arguments of array type va_datatype(), va_arraydim(), va_arrayextent(). The corresponding functions va_elementtype(), va_dim, va_extent() are obsolete. *) added ChType_t in stdarg.h for va_arraytype() and va_datatype(). *) added three new API for Ch SDK and Embedded Ch to obtain the total number of element of array Ch_VaArrayNum() in Ch SDK Ch_ArrayNum() in Embedded Ch SDK Ch_FuncArgArrayNum() in Embedded Ch SDK *) fixed for array a of type 'type a[3]', APIs Ch_VaDataType(), Ch_VaFuncArgDataType(), Ch_DataType(), Ch_FuncArgDataType(), will return the data type of 'type' instead of pointer to type 'type*'. *) fixed error message when a file is missing for #pragma import "missingfile.c" #pragma importf "missingfile.chf" *) fixed input of multi-byte languages such as Chinese and Korea at the prompt of a Ch shell. *) When a computational array with a large number of columns is printed into a file using fprintf(), the columns will not be wrapped. Version 5.5.0 build 13061 November, 2006 *) fixed command completion for a directory on Unix. For example, > some/directory/name/ *) support cross compilation of commands dlcomp and dllink in Ch SDK for Linux. *) added support of shebeng #!/bin/env ch or #!/usr/bin/env ch for Ch scripts *) support cross compilation of commands dlcomp and dllink in Ch SDK for Linux and Windows *) added system varibable _setlocale if the statement _setlocale = 1; is added in system startup file chrc or .chrc or _chrc, function setlocale(CL_ALL, "") will be called internally for handling multi-byte languages. *) disabled automatical support of multi-byte languages for Korea, Japanese, and Chinese by adding #pragma exec setlocale(0, ""); in CHHOME/config/chrc in Windows Version 5.5.0 build 13051 November, 2006 *) fixed string concatination with __FILE__, __DATE__, __TIME__ such as char s[] = __FILE__ "str"; printf(__FILE__ " has an error"); Version 5.5.0 build 13041 November 7, 2006 *) added automatical support of multi-byte languages for Korea, Japanese, and Chinese by adding #pragma exec setlocale(0, ""); in CHHOME/config/chrc in Windows *) added command zip.exe in Windows *) fixed calling a shell command multiple times with substituted command using $cmd $cmd $option1 $option2 Version 5.5.0 build 13031 October 26, 2006 *) added #pragma exec setlocale(0, ""); for multi-byte languages such as Japanese used in CHHOME/config/chrc Version 5.5.0 build 13021 October, 2006 *) fixed decimal point using '.' instead of ',' for European languages such as French. Version 5.5.0 build 13011 October, 2006 *) simplified the distribution code for Embedded Ch *) fixed CPlot::outputType(PLOT_OUTPUTTYPE_STREAM, "png color"); CPlot::outputType(PLOT_OUTPUTTYPE_STREAM, "png color") is deprecated. use CPlot::outputType(PLOT_OUTPUTTYPE_STREAM, "png") Version 5.5.0 build 13001 October, 2006 *) added surface mesh for 3D plot tracking coordinates of 2D plots using a mouse changing view angle of 3D plots using a mouse *) added support of Ch Professional Edition for QNX *) added Embedded Ch can be invoked from C/Ch/C++ scripts. Version 5.1.0 build 12781 September, 2006 *) added two examples on how to callback a C function in Embedded Ch from the Ch space described in Embedded Ch User's Guide. *) 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 ); 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 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 for Windows *) 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. *) added inet_aton() in supported platforms such as Linux, HPUX, and Mac OS X. *) fixed CLOCKS_PER_SEC for time.h in Windows. *) added a numerical function oderungekutta() for solving ODE. odesolve() is obsolete and will be phased out. Version 5.1.0 build 12661 December, 2005 *) 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() *) 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 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 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 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(); *) fixed pkginstall.ch in Unix *) fixed CHHOME/include/arpa/inet.h *) support Ch and toolkits in LinuxPPC on Power architecture. *) added ChVaList_t data type in ch.h 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 May, 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(). *) removed the obsolete function va_isarray() in stdarg.h Version 5.0.1 build 12221 May, 2005 *) updated select() so that it works in Windows *) 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 *) 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 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 *) updated Unix utilities with djgpp compiled binaries. *) 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 in all platforms. *) Support multi-threads for Embedded Ch up to 500 simultaneously running Ch interpreters in an application. Sample source code that embed mutiple Ch interpreters into multi-thread applications using POSIX pthread and Windows thread are provided. 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 *) Updated all PDF documents so that table of contents, programs, and index 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 an 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 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 Ch, Ch SDK and Embedded Ch Version 4.7.0 -- October, 2004 build 11821 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 aliases for commands "which" and "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> *) 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 *) fixed #pragma package <name> *) 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. You can find more information below regarding Ch SDK and Embedded Ch SDK. *) 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 substituion with @ command , such as command arg@address.com $arg *) removed the warning message for command > ch -n mycommand.ch when mycommand.ch contains variable suvstitution 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 argumenet. 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 openning 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 Changes for Ch SDK 4.7 *) added the following 9 new APIs for Ch SDK so that Ch can be easily embedded in C/C++ programs and interface with binary C/C++ static/dynamic libraries. int Ch_VaDataType(va_list ap); int Ch_VaIsFunc(va_list ap); int Ch_VaIsFuncVarArg(va_list ap); void *Ch_VaUserDefinedAddr(va_list ap); char *Ch_VaUserDefinedName(va_list ap); int Ch_VaUserDefinedSize(va_list ap); int Ch_VarArgsAddArgExpr(va_list *arglistp, const char *expr); char *Ch_SymbolNameByIndex(ChInterp_t interp, int index); int Ch_CallFuncByNameVar(ChInterp_t interp, const char *name, void *retval, va_list arglist); *) changed Ch_CallFuncByName() and Ch_CallFuncByAddr(). They need to have both dim and extents for each dimension for an argument of variable length array *) added support of functions in function files for expressions in the following API Ch_CallFuncByName() Ch_CallFuncByNameVar() *) deprecated some APIs in Ch SDK. Ch_VaElementtype() is obsolete, use Ch_VaDataType() Ch_VaStructAddr(va_list ap) is obsolete, use VaUserDefinedAddr() Ch_VaStructSize(va_list ap) is obsolete, use VaUserDefinedSize() Ch_GetSymbol() is obsolete, use Ch_SymbolAddrByName() *) added enum types with array types of CH_CARRAYVLA, CH_CHARRAYVLA for C and Ch variable length arrays in ch.h. *) updated commands c2chf, dllink, and functions processcfile() and processhfile() for building interface of Ch to binary C library. *) updated processhfile() in Ch SDK for handling repeated token such as extern "C" { ... extern int func(int i); *) updated c2chf to handle arg of unsigned long type. *) updated c2chf to handle function with return type of void. and arguments of type of variable number of arguments for libxml2 *) fixed handling function ending with "; " in processhfile() *) fixed the multiple function definitions for evaluation edition of Ch SDK and Embedded Ch SDK. Changes for Embedded Ch SDK 4.7 *) Support 9 new APIs in Ch SDK so that Ch can be eassily embedded in C/C++ programs and interface with binaryy C/C++ static/dynamic libraries. *) Added the following 27 new APIs for Embedded Ch int Ch_AppendParseScriptFile(ChInterp_t interp, const char *filename); int Ch_AppendRunScriptFile(ChInterp_t interp, const char *filename); int Ch_Close(ChInterp_t interp, ChFile_t fildes); ChFile_t Ch_Reopen(ChInterp_t interp, const char *filename, const char *mode, int fildes); int Ch_Flush(ChInterp_t interp, ChFile_t fildes); int Ch_SymbolTotalNum(ChInterp_t interp); int Ch_SymbolNum(ChInterp_t interp, const char *name); void *Ch_SymbolAddrByIndex(ChInterp_t interp, int index); char *Ch_SymbolNameByIndex(ChInterp_t interp, int index); int Ch_IsArray(ChInterp_t interp, const char *expr); int Ch_ArrayDim(ChInterp_t interp, const char *name); int Ch_ArrayExtent(ChInterp_t interp, const char *name, int index); int Ch_IsFunc(ChInterp_t interp, const char *name); int Ch_IsFuncVarArg(ChInterp_t interp, const char *name); int Ch_FuncArgNum(ChInterp_t interp, const char *name); char *Ch_UserDefinedName(ChInterp_t interp, const char *name); int Ch_UserDefinedSize(ChInterp_t interp, const char *name); int Ch_ExprCalc(ChInterp_t interp, const char *expr, int datatype, void *result); int Ch_FuncArgDataType(ChInterp_t interp, const char *funcname, int argnum); int Ch_FuncArgIsArray(ChInterp_t interp, const char *funcname, int argnum); int Ch_FuncArgArrayDim(ChInterp_t interp, const char *funcname, int argnum); int Ch_FuncArgArrayExtent(ChInterp_t interp, const char *funcname, int argnum, int index); int Ch_FuncArgIsFunc(ChInterp_t interp, const char *funcname, int argnum); int Ch_FuncArgIsFuncVarArg(ChInterp_t interp, const char *funcname, int argnum); int Ch_FuncArgFuncArgNum(ChInterp_t interp, const char *funcname, int argnum); char *Ch_FuncArgUserDefinedName(ChInterp_t interp, const char *funcname, int argnum); int Ch_FuncArgUserDefinedSize(ChInterp_t interp, const char *funcname, int argnum); *) added support of functions in function files for expressions in the following APIs Ch_ExprParse() Ch_ExprCalc() Ch_ExprEval(). *) Ch SDK APIs can be invoked without first calling Ch_RunScript(). *) fixed the return value of Ch_Initialize() for Embedded Ch. *) support Borland C++ compiler in Windows for Ch SDK and Embedded Ch SDK. Examples with source code of using Borland C++ compiler are provided. *) Provided examples with source code using Microsoft .NET and VC++. Ch Version 4.5.0 build 11461 for Mac OS X January 22, 2004 --------------------------------------------------------------------- *) updated to run in Mac OS X 10.3 Ch Version 4.5.0 build 11451 January 17, 2004 --------------------------------------------------------------------- *) Added file and command completion by tab in command shell. *) added history command retrieval feature in command shell in Windows. *) enabled QuickEdit and Insert Mode in 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 orignal 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 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 Changes for Ch SDK 4.5: *) Simplified interface with C++ classes. *) Fixed passing file handles, locales, and environment variables to dynamically loaded library in Windows. *) added new API Ch_ExprParse(char *expr) to vadlidate the expression at the parsing stage. Ch_ExprEval() is for evaluation at runtime. *) Added new API Ch_CppChangeThisPointer() changes 'this' pointer in Ch space to pointer to object in C++ space. *) Added new API Ch_CppIsArrayElement() tests if the destructor is called by an element of array of class. Changes for Embedded Ch SDK 4.5: *) Binary functions in the original application program with Embedded Ch can be exported without building a separate dynamically loaded library .dl file. *) Easy interface with binary C++ code, all objects are maintained in C++ binary space. *) Added 4 new APIs Ch_ParseScript() parses a script. Ch_ExecScript() executes the script parsed already by Ch_ExecScript(). Ch_AppendParseScript() appends a script to the existing script processed by Ch_RunScript(). Ch_AppendRunScript() appends and executes a script to the existing script processed by Ch_RunScript(). --------------------------------------------------------------------- Version 4.0.0 build 11291 August 20, 2003 *) added argument substituion 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 varable 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 silient inconsistentcy 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 commmand 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; srting_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 varaible 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, Feburary 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, Feburary 20, 2002 *) fixed conditional expression of non-integral types Version 2.1.0 build 10841, Feburary 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
HTML hit counter - Quick-counter.net