2005-03-16 : Jason Evans * Onyx 5.1.2 released. 2004-10-27 : Jason Evans * lib/libonyx/src/systemdict.c:systemdict_{bindsocket,connect}() : Move a mtx_unlock() call inside the conditional block that calls mtx_lock(), in order to keep from trying to unlock a mutex that isn't locked. 2004-03-16 : Jason Evans * Onyx 5.1.1 released. * lib/libonyx/src/nxo_dict.c:nxoe_p_dict_def() : Fix the ordering of code that sets a key/value pair in an array-based dict. This fixes a small race condition window, wherein the GC could end up looking at a bogus val. 2004-03-07 : Jason Evans * Onyx 5.1.0 released. 2004-02-29 : Jason Evans * configure.in : Check for pthread_np.h independently of checking for pthread_{suspend,resume}_np(), so this works on NetBSD, which has the functions, but not the header. * Install documentation in /share/doc/onyx rather than /share/onyx/doc. * Change linker flags for OS X from: -undefined suppress -flat_namespace -bundle -all_load -bind_at_load or -undefined suppress -flat_namespace -dynamiclib -bind_at_load to -undefined dynamic_lookup -bundle -all_load -prebind or -undefined dynamic_lookup -dynamiclib -prebind This change has two caveats: 1) It is not backward compatible; it only works for OS X 10.3. 2) The -bind_at_load flag was removed, which is a bad thing if the -prebind flag doesn't prevent dynamic symbol lookups at the same time as garbage collections. -prebind probably does the right thing, but if deadlocks in dyld start appearing, this change is probably the cause. 2004-01-17 : Jason Evans * Onyx 5.0.1 released. 2004-01-16 : Jason Evans * lib/libonyx/src/nxo_dict.c:nxoe_p_dict_def() : Fix a race condition between updating the internal list and internal hash that could cause a crash if suspended by the garbage collector while inserting the first object into a dictionary. Additionally, this could only happen when the dictionary was stored as a hash, rather than as an array. This was a regression that existed since the 5.0.0 release. 2004-01-03 : Jason Evans * Onyx 5.0.0 released. 2003-12-31 Jason Evans * lib/libonyx/src/systemdict.c:systemdict_{send,recv}() : Fix handling of the flags array. 2003-12-30 Jason Evans * configure.in : Add EXTRA_CFLAGS. 2003-12-29 Jason Evans * lib/libonyx/src/systemdict.c:systemdict_localtime() : Use tzname and altzone if (struct tm).tm_{zone,gmtoff} are missing, as on Solaris 9. * lib/libonyx/src/nxo_dict.c:nxo_p_dict_hash() : Revise string hashing to marginally improve performance. 2003-12-28 : Jason Evans * Use the char type rather than uint8_t wherever it makes sense. This is a sweeping API change, much like the change on 2003-12-13, but it has little actual impact on applications, except that it fixes some long-standing casting issues for C++ applications. * lib/libonyx/src/nxm.c : Add the nxm class, which abstracts loadable module functionality. Remove cw_nxmod_t, which is obsoleted by this change. 2003-12-26 : Jason Evans * Add operators: + sigmask + sigpending + sigsuspend + sigwait + getpgid, setpgid + getsid, setsid 2003-12-25 : Jason Evans * Stop building a PostScript version of the documentation. There is no good reason to keep building two printable formats, and PDF is supported by all operating systems of interest, whereas PostScript is not. 2003-12-13 : Jason Evans * Remove the following types, and replace them with C99 equivalents: + cw_uint8_t --> uint8_t + cw_uint8_t --> uint8_t + cw_sint8_t --> int8_t + cw_uint16_t --> uint16_t + cw_sint16_t --> int16_t + cw_uint32_t --> uint32_t + cw_sint32_t --> int32_t + cw_uint64_t --> uint64_t + cw_sint64_t --> int64_t + cw_fp64_t --> double + cw_bool_t --> bool Use false and true, rather than FALSE and TRUE. 2003-10-27 : Jason Evans * lib/libonyx/src/nxo_dict.c:nxoe_p_dict_def(),nxo_dict_undef() : Fix the same problem as was fixed in nxoe_p_dict_lookup() on 2003-08-22. 2003-10-22 : Jason Evans * bin/onyx/src/interactive.nx.in : Modify the resume procedure to clear the error snapshot state in currenterror. * Add the path operator. * lib/libonyx/src/systemdict.c:systemdict_forkexec() : Add the optional redirects parameter, which makes it possible to redirect standard I/O, thus enabling program pipelines. 2003-10-21 : Jason Evans * mod/modprompt/src/modprompt.c : Wrap workaround code for LinuxThreads's broken signal handling in #ifdef CW_MODPROMPT_LINUXTHREADS ... #endif. 2003-10-20 : Jason Evans * bin/onyx_config/src/onyx_config.nx.in : Add --bindir, --datadir, --libdir, --includedir, and --mandir. 2003-10-13 : Jason Evans * bin/onyx_config/src/onyx_config.nx.in : Add --onyx-path. * Remove tonyx, and replace it with oonyx (and oonyx_config). This makes it possible to run the debugger directly on oonyx (was not possible with tonyx), and oonyx_config makes it possible for external programs to use an onyx build tree, rather than requiring that onyx be installed. 2003-10-05 : Jason Evans * lib/libonyx/src/systemdict.c:systemdict_p_nxmod_delete() : Add support for a hook function that is called just before a module is unloaded. 2003-10-02 : Jason Evans * lib/libonyx/src/systemdict.c:systemdict_{while,until}() : Replace an empty executable conditional array with an executable null to improve performance. 2003-09-19 : Jason Evans * lib/libonyx/src/nx.nx.in : Only embed as a string when bootstrapping or if POSIX support is disabled. This reduces memory footprint in exchange for a negligible increase in startup time. 2003-09-18 : Jason Evans * lib/libonyx/src/nxo_thread.nx.in : Modify errordict's handleerror procedure to report the origins of arrays for which the origins have been recorded. Add $origin to currenterror. * Add the origin operator. * lib/libonyx/src/nxo_array.c:nxo_array_origin_[gs]et() : Add. * lib/libonyx/src/nxo_file.c:nxo_file_origin_[gs]et() : Add. * lib/libonyx/src/nxo_thread.c:nxo_threadp_origin_[gs]et() : Add. * lib/libonyx/include/libonyx/nxo_pmark.h:nxo_pmark_line_[gs]et() : Add. 2003-09-11 : Jason Evans * lib/libonyx/src/thd.c:thd_single_{enter,leave}() : Unlock s_thd_single_lock in thd_single_enter(), then re-acquire it in thd_single_leave(), in order to avoid the possibility of lock recursion. This regression was introduced before the 1.0.0 release, but no releases of Onyx included code that triggered the failure mode. 2003-08-30 : Jason Evans * Add the cdef operator. * Add the cstackunderflow error. 2003-08-22 : Jason Evans * lib/libonyx/src/nxo_dict.c:nxoe_p_dict_lookup() : Make sure that the search key and the dictionary item key are the same type when searching a dict that is in compact array format. Before this fix, string and name keys were treated equivalently for dicts that had never grown beyond 8 items. This was a regression that existed since the 4.0.0 release. 2003-08-21 : Jason Evans * lib/libonyx/include/libonyx/libonyx.h:libonyx_gcdict_get() : Add. * lib/libonyx/include/libonyx/nx.h:nx_gcdict_get() : Remove. 2003-08-18 : Jason Evans * lib/libonyx/src/nxo_thread.c:nxo_thread_loop() : Restructure code so that object attribute always takes precedence over type in the outer loop, thus allowing all object types to serve as keys in method and data lookups. * Add operators: + this + cstack + threadcstack + cvf + cvi + fcheck + icheck * Modify the build system to prepend/append headers/footers when creating tests written in Onyx. Modify error output in the header so that errors are reported with the same format, regardless of configuration. 2003-08-08 : Jason Evans * Add operators: + escape + trapped 2003-08-07 : Jason Evans * Add the clopt (command line option parsing) module. * lib/libonyx/src/nx.nx.in : Remove the search procedure, since the regular expression facilities offer superior functionality. * configure.in : Remove the --disable-libonyx and --disable-onyx options. Update to autoconf 2.57. Add --disable-modclopt. 2003-07-29 : Jason Evans * lib/libonyx/src/mem.c : Unlock s_mem_lock before throwing exceptions. 2003-06-26 : Jason Evans * Add the continue operator. * Add the invalidcontinue error. * Add the CW_ONYXX_CONTINUE exception. * lib/libonyx/src/systemdict.c:systemdict_{until,while}() : Do not return from within an xep block. 2003-06-20 : Jason Evans * Add the kill operator. 2003-06-19 : Jason Evans * lib/libonyx/src/systemdict.c:systemdict_exec() : Throw an error if the execve() call fails, rather than calling _exit(). 2003-06-07 : Jason Evans * lib/libonyx/include/libonyx/nxo_stack.h : Restructure the internals of stacks in order to make indexed object access a constant-time operation. Add the a_mincount argument to nxo_stack_new(). Remove: + nxo_stack_under_push() + nxo_stack_remove() + nxo_stack_down_get() + nxo_stack_up_get() + NXO_STACK_DOWN_GET() + NXO_STACK_UP_GET() 2003-05-29 : Jason Evans * Add operators: + tailopt + gtailopt + settailopt + setgtailopt 2003-05-13 : Jason Evans * Add vclass, which serves as a convenient base class. * Add operators: + lcheck (note rename below) + xcheck (note rename below) + ccheck + class + classname + cvc + data + implementor + implements + instance + isa + kind + method + methods + setclassname + setdata + setisa + setmethods + setsuper + super * Rename operators: + xcheck --> xecheck + lcheck --> ilocked + cvlit --> cvl * lib/libonyx/include/libonyx/nxo.h : Rename nxo_lcheck() to nxo_ilocked(). * lib/libonyx/include/libonyx/nxo.h : Add the NXOA_CALLABLE attribute. * lib/libonyx/src/nxo_thread.c:nxo_thread_class_hier_search() : Add. * Add the "class" and "instance" Onyx types. * configure.in : Add --disable-oop. * lib/libonyx/include/libonyx/nxo_handle.h : Rename nxo_hande_data_[gs]et() to nxo_handle_opaque_[gs]et(), in order to be consistent with class/instance function names. 2003-05-07 : Jason Evans * Add operators: + maxestack + gmaxestack + setmaxestack + setgmaxestack * Rename the "hook" type to "handle". This impacts all APIs with "hook" in them. This change was made to avoid confusion between handles and function pointer hooks, configuration/initialization hooks, etc. 2003-05-02 : Jason Evans * Fix spelling error: "evaluatable" should be "evaluable". This includes changing NXOA_EVALUATABLE to NXOA_EVALUABLE. 2003-05-01 : Jason Evans * lib/libonyx/src/libonyx.c:libonyx_init() : Remove exception handling code, since there is no possible way for the caller to recover from an error anyway. * Restructure data structures for dict and name objects, such that most critical sections could be safely removed. Additionally, embed chi's directly into the dict and name structures, in order to reduce memory fragmentation and improve cache locality. * lib/libonyx/src/nxa.c:nxa_p_collect() : Prune dead names from the name hash while the mutators are suspended (call nxo_l_name_list_prune()). This dramatically reduces the complexity of garbage collection for name objects, thus making interleaved sweeping (see note on 2003-04-26) safe. * lib/libonyx/src/mem.c : Use a ql to keep a list of all allocations stored in the allocation hash table, since dch_remove_iterate() was removed. * lib/libonyx/include/libonyx/dch.h : Add the following function: + dch_chi_remove() Remove the following functions: + dch_get_iterate() + dch_remove_iterate() * lib/libonyx/include/libonyx/ch.h : Add the following function: + ch_chi_remove() Remove the following functions: + ch_get_iterate() + ch_remove_iterate() * lib/libonyx/src/nx.nx.in:throw lib/libonyx/src/nxo_thread.nx.in:errorict handleerror : Convert code of the following formats: stderr `str' {write}{} until or: `str' stderr exch {write}{} until to: `str' {stderr exch write}{} until 2003-04-27 : Jason Evans * lib/libonyx/include/libonyx/nxa.h:nxa_stats_get() : Remove the r_csweep, r_msweep, and r_ssweep parameters. * lib/libonyx/src/gcdict.c : Remove sweep times from the stats operator. * lib/libonyx/src/nxa.c : Restructure garbage collection so that sweeping is interleaved with allocation in the mutator threads. This ensures that the mutators don't generate garbage faster than the collector can sweep it. 2003-04-26 : Jason Evans * configure.in : Add --disable-hook. Remove dependency on autoheader. 2003-04-24 : Jason Evans * lib/libonyx/include/libonyx/libonyx.h : Add the following functions: + libonyx_argv_get() + libonyx_envdict_get() Add the a_argc, a_argv, and a_envp arguments to libonyx_init(). * lib/libonyx/include/libonyx/nx.h : Add the a_thread_start argument to nx_new(). Remove nx_envdict_get(). Remove the a_argc, a_argv, and a_envp arguments from nx_new(). * Remove the a_nx argument from the following functions: + nxo_array_new() + nxo_array_subarray_new() + nxo_condition_new() + nxo_dict_new() + nxo_dict_copy() + nxo_dict_def() + nxo_dict_undef() + nxo_file_new() + nxo_hook_new() + nxo_mutex_new() + nxo_name_new() + nxo_regex_new() + nxo_regsub_new() + nxo_stack_new() + nxo_string_new() + nxo_string_substring_new() * Remove the (cw_nx_t *) argument from the following function pointer typedefs: + cw_nxo_file_delete_t + cw_nxo_hook_delete_t 2003-04-19 : Jason Evans * lib/libonyx/include/libonyx/nxa.h : Remove cw_nxa_t. * lib/libonyx/src/mq.c:mq_new() : Use a mema object for allocation, rather than a mem object. * lib/libonyx/include/libonyx/libonyx.h : Remove the following global variables: + cw_g_mem + cw_g_nxa * lib/libonyx/include/libonyx/mem.h : Remove mem_{new,delete}(). Remove cw_mem_t. Modify all mem APIs to ignore the first argument. 2003-04-18 : Jason Evans * Move the garbage collector out of cw_nx_t and make it global, thus making it possible for multiple interpreters to co-exist (and share one garbage collector). * lib/libonyx/include/libonyx.h : Add the following global variables: + cw_g_nxa + cw_g_nxaa * lib/libonyx/src/nx.c : Remove the following functions: + nx_nxa_get() + nx_mema_get(). Add nx_gcdict_get(). * lib/libonyx/include/libonyx/nxa.h : Remove the a_nxa parameter from the following macros and functions: + nxa_malloc[_e]() + nxa_calloc[_e]() + nxa_realloc[_e]() + nxa_free[_e]() + nxa_collect() + nxa_active_[gs]et() + nxa_period_[gs]et() + nxa_threshold_[gs]et() + nxa_stats_get() Remove the following functions: + nxa_nx_get() + nxa_gcdict_get() 2003-04-17 : Jason Evans * lib/libonyx/src/libonyx.c : Add the cw_g_mema global variable. 2003-04-05 : Jason Evans * Onyx 4.4.3 released. 2003-04-04 : Jason Evans * lib/libonyx/src/nxo_file.c:nxo_file_fd_wrap() : Add the a_close parameter, which makes it possible to avoid leaking file descriptors for wrapped files. 2003-03-23 : Jason Evans * Onyx 4.4.2 released. 2003-03-22 : Jason Evans * lib/libonyx/include/libonyx/libonyx.h:cw_opaque_{c,re}alloc() : Fix the reversal of a_arg and a_num. This is a minor issue, since internally, libonyx was consistent in reversing the order of the arguments. The change causes a header incompatibility, but no library incompatibility, so the library version number does not need to be bumped. 2003-03-21 : Jason Evans * Onyx 4.4.1 released. 2003-03-20 : Jason Evans * lib/libonyx/src/systemdict.c:systemdict_send() : Loop when short writes happen until all the data are written. systemdict_recv() : Loop when recv() is interrupted. systemdict_waitpid() : Loop when waitpid() is interrupted. * bin/onyx/src/onyx.c:main() : Add a top level exception handler. * lib/libonyx/include/libonyx/xep.h : Add xep_filename() and xep_line_num() to facilitate diagnostic output. * lib/libonyx/src/nx.nx.in:[m]require : Re-order code so that loaded modules can safely leave objects on ostack. * lib/libonyx/src/nxo_file.c:nxo_file_write() : Handle short writes (due to signal interruption) even when there are no buffered data. nxo_p_file_buffer_flush() : Handle short writes (due to signal interruption). 2003-03-18 : Jason Evans * Onyx 4.4.0 released. 2003-03-16 : Jason Evans * Add operators: + localtime + unless 2003-03-15 : Jason Evans * Use __func__ rather than __FUNCTION__, in order to comply with C99. * lib/libonyx/src/nxo_thread.c:nxo_thread_loop() : Make some performance improvements by reducing nxo dup's, array locking/unlocking, and the number of branches. 2003-03-12 : Jason Evans * lib/libonyx/include/libonyx/mem.h : Add the mema class, which reduces memory usage for the ch and dch classes. * lib/libonyx/src/ch.c:ch_new(): Modify to use the mema class. * lib/libonyx/src/dch.c:dch_new(): Modify to use the mema class. * lib/libonyx/include/libonyx/nx.h:nx_mema_get() : Add. * lib/libonyx/include/libonyx/nxa.h:nxa_calloc[_e](): Add. * lib/libonyx/include/libonyx/libonyx.h:cw_opaque_calloc{_t,()}: Add. * Use calloc rather than malloc followed by memset wherever possible, which appears to have a significant positive performance impact in many cases. 2003-03-03 : Jason Evans * Remove CPPDEFS from the build system, and modify calls to c_incl so that -D flags are filtered out of CPPFLAGS, thus allowing cpp definitions to be set in CPPFLAGS where they belong. Move definitions such as -D_REENTRANT and -D_GNU_SOURCE from CFLAGS to CPPFLAGS. * Make calls to promptstring resilient to errors. * lib/libonyx/src/systemdict.c:systemdict_{copy,get}() : Use nxo_stack_remove() rather than nxo_stack_exch()/nxo_stack_pop(). In the case of systemdict_copy(), this change fixes undesired behavior if ostack is being copied to. * bin/onyx/src/onyx.c : Add -s command line flag. * bin/onyx_config/src/onyx_config.nx.in.in : Add the --features flag. 2003-03-02 : Jason Evans * For Linux, define _GNU_SOURCE in CFLAGS rather than in a header, so that it is set before *any* headers are included. This is important for resilience to system header pollution. 2003-03-01 : Jason Evans * Update to use PCRE 4.0. * bin/onyx/src/onyx.c : Add -f command line flag. 2003-02-26 : Jason Evans * bin/onyx/src/interactive.nx.in : Stop printing product information during interactive startup. * bin/onyx/src/onyx.c : Add -i command line flag. Add ONYXRC environment variable support. 2003-02-15 : Jason Evans * Onyx 4.3.1 released. 2003-02-09 : Jason Evans * lib/libonyx/src/systemdict.c:systemdict_foreach() : Make a snapshot for stack iteration and iterate over the snapshot, in order to avoid crashes if the application removes stack objects during iteration. * lib/libonyx/src/systemdict.c:systemdict_repeat() : Re-order some code to avoid popping objects off ostack until they are no longer needed. * lib/libonyx/include/libonyx/nxo_stack.h and lib/libonyx/src/nxo_stack.c : Add debug code to overwrite cached stack object containers, in order to make erroneous access of invalid objects more apparent. 2003-02-08 : Jason Evans * lib/libonyx/include/libonyx/nxo_dict_l.h:nxoe_l_dict_delete() : Make the embedded dch non-shrinkable to avoid rehashes during finalization, in order to avoid accessing already-finalized objects. This was a regression that existed since the 4.0.0 release. * lib/libonyx/src/dch.c : Add dch_shrinkable_[gs]et(). * lib/libonyx/src/nxo_dict.c:nxoe_p_dict_def() : Initialize the dch before inserting the contents of the array into it. This bug could cause memory corruption and/or crashes if a dict grew from 7-->8-->9 (assuming CW_LIBONYX_DICT_SIZE == 8). This was a regression that existed since the 4.0.0 release. 2003-02-01 : Jason Evans * Onyx 4.3.0 released. 2003-01-30 : Jason Evans * configure.in : Add --with-host-cc and --with-target-cc to make cross compiling possible. Cookfile.inc.in : Use HCC and TCC rather than CC to invoke the compiler. 2003-01-29 : Jason Evans * lib/libonyx/include/libonyx/libonyx.h:cw_bool_t : Fix cw_bool_t to always work both with C and C++ code. The change on 2002-12-15 was not adequate. * Modify the mod operator to handle any combination of integers and reals. Submitted by Zeljko Vrba. * Modify the cvds operator to handle negative precision. * Add operators (submitted by Zeljko Vrba): + exp + sinh + asin + asinh + cosh + acos + acosh + tan + tanh + atan + atanh * Rename the exp operator to pow. * Rename the atan operator to atan2. 2002-12-15 : Jason Evans * Onyx 4.2.1 released. * Cast (cw_uint8_t *) to (char *) for strlen() calls. Submitted by Zeljko Vrba. * lib/libonyx/include/libonyx/qr.h : Add a_type parameter to qr_meld() and qr_split(), since C++ does not allow mixing (void *) assignments with typed variables. Reported by Zeljko Vrba. * lib/libonyx/include/libonyx/nxo_stack.h : Add casts to fix comparisons between cw_sint32_t and cw_uint32_t. Submitted by Zeljko Vrba. * lib/libonyx/include/libonyx/nxo.h:cw_nxo_t : Rename the operator field to oper in order to avoid a collision with the C++ keyword. Reported by Zeljko Vrba. * lib/libonyx/include/libonyx/libonyx.h:cw_bool_t : Use the C++ bool type and true/false when C++ is being used, in order to reduce conflicts with other libraries. Submitted by Zeljko Vrba. 2002-12-01 : Jason Evans * Onyx 4.2.0 released. 2002-11-30 : Jason Evans * Add operators: + regsub + subst 2002-11-29 : Jason Evans * Add operators: + regex + match + submatch + offset + split 2002-11-27 : Jason Evans * lib/libonyx/include/libonyx/nxa.h : Add nxa_realloc() (bug fix). 2002-11-15 : Jason Evans * Add the regexerror error. * lib/libonyx/include/libonyx/nxa_l.h:nxa_l_count_adjust() : Add. 2002-11-03 : Jason Evans * lib/libonyx/src/nxo_dict.c:nxo_p_dict_hash() : Add case for NXOT_REAL (bug fix). * lib/libonyx/src/nxo_thread.c:nxo_thread_loop() : Add case for NXOT_REAL (bug fix). * lib/libonyx/src/systemdic.c:systemdict_lcheck() : Add case for NXOT_REAL (bug fix). 2002-09-08 : Jason Evans * Onyx 4.1.0 released. 2002-09-07 : Jason Evans * Treat evaluable names specially when binding (don't bind them), in order to make it possible to force dynamic lookup of names, without having to resort to using the load operator on literal names. This required a language syntax change so that evaluable names can be created in deferred execution mode. The possibilities for specifying an evaluable name were $$$name, $#name, or adding a new special character. Since neither of the backward compatible syntax changes were very palatable, two new special characters were added. !name creates an evaluable name, and the former $$name syntax is now written as ~name for consistency. 2002-09-06 : Jason Evans * Onyx 4.0.0 released. 2002-09-05 : Jason Evans * Use the following in the build system, rather than using PREFIX directly, so that individual paths can be set during configuration and/or installation: + BINDIR + DATADIR + LIBDIR + INCLUDEDIR + MANDIR 2002-09-02 : Jason Evans * Add operators: + bindsocket + listen + accept + send + recv 2002-08-16 : Jason Evans * Add the --disable-socket configure option. 2002-08-11 : Jason Evans * bin/onyx_config : Add onyx_config, which aids in building software that uses libonyx. 2002-08-04 : Jason Evans * lib/libonyx/src/nxo_string.c:nxo_string_cstring() : Handle name objects as well as string objects. * Add operators: + serviceport + sockname + peername + sockopt + setsockopt 2002-08-02 : Jason Evans * Add the neterror error. 2002-07-17 : Jason Evans * Add the --disable-modules configure option. 2002-07-14 : Jason Evans * Add the ncat operator. * lib/libonyx/src/nxa.c : Restructure code for reference iteration and deletion so that type-specific functions can be inlined, rather than using the function pointer table behind nxoe_l_ref_iter() and nxoe_l_delete(). * lib/libonyx/src/nxo.c : Remove nxoe_l_ref_iter() and nxoe_l_delete(), since the only callers of those functions were in nxa.c. * lib/libonyx/src/nxo_dict.c : Use an embedded array rather than a dch for small dict sizes. This reduces the memory overhead of small dicts without a significant performance impact. 2002-07-13 : Jason Evans * Remove the fork operator and replace it with the forkexec operator. Doing anything between fork() and exec() in a multi-threaded application risks hanging. * bin/onyx/src/batch.nx.in : Redefine stop in errordict, not in currenterror. This bug has existed since before Onyx 1.0.0. * bin/onyx/src/onyx.c:nx_write() : Keep writing until all data are written, even in the face of EINTR. 2002-07-12 : Jason Evans * mod/modprompt/src/modprompt.c : Implement terminal-related signal handling on so that suspending, resizing, interrupting, etc. work correctly. * Revise string and pointer hashing functions to marginally improve performance. * lib/libonyx/include/libonyx/ch.h : Add CW_CH_COUNT and CW_CH_VERBOSE. * lib/libonyx/include/libonyx/dch.h : Add CW_DCH_COUNT and CW_DCH_VERBOSE. * lib/libonyx/include/libonyx/libonyx_defs.h.in : Add CW_P_INLINE and use it instead of CW_INLINE for private functions. 2002-07-09 : Jason Evans * Significantly revamp the xep code to adopt the semantics of C++ exceptions. Remove xep_finally. Fix volatility bugs. Improve performance by avoiding longjmp() calls in the common case. 2002-07-07 : Jason Evans * Add operators: + socket + socketpair + connect * Add the argcheck error. 2002-06-22 : Jason Evans * Add support for GNU pth (--enable-pth). 2002-06-19 : Jason Evans * lib/libonyx/include/libonyx/libonyx.h : Add cw_offsetof(). 2002-06-02 : Jason Evans * Add operators: + nonblocking + setnonblocking * Modify the write operator to return whether a write was partial or not. This is necessary for non-blocking files. * lib/libonyx/src/nxo_file.c : + nxo_file_write() : Add the r_count parameter to support partial writes. + nxo_file_nonblocking_[gs]et() : Add. 2002-06-01 : Jason Evans * Change language syntax. The / special character is now $. 2002-05-25 : Jason Evans * lib/libonyx/src/nxa.c:nxa_realloc_e() : Cast from unsigned to signed before subtraction, rather than after. This fixes an off-by-2^32 error for the garbage collector allocation statistics. 2002-04-27 : Jason Evans * Modify the mkdir operator such that specifying the mode is optional. 2002-04-27 : Jason Evans * Add operators: + chroot + mkfifo + pipe + readlink + umask * lib/libonyx/src/systemdict.c : Optimize operators to take advantage of nxo_stack_remove(). * lib/libonyx/src/poll.c : Implement poll() emulation based on select(). This is necessary to make the poll operator portable to OS X. 2002-04-21 : Jason Evans * configure.in : Remove --enable-profile. * lib/libonyx/include/libonyx/mb.h : Convert mb_write() to a nop, but in such a way that the compiler cannot re-order instructions around mb_write(). This improves interpreter performance by a factor of approximately 2.5. * Remove "fast" operator support, since it wasn't very fast. Performance without fast operators is +-3% of what it was with fast operator support, for typical programs. * Remove dstackunderflow as an error. With the addition of the threaddstack operator, it is possible for a program to directly manipulate dstack in ways that would thwart dstackunderflow checking, and it is undesirable to prevent applications from being able to take advantage of the possibilities afforded. On the down side, this makes it easier to accidentally get the interpreter into an unusable state. * Add operators: + inc, dec + while, until * Remove operators: + cleardstack 2002-04-20 : Jason Evans * lib/libonyx/include/libonyx/nx.h : Add nx_threadsdict_get(). * Change language syntax: + Radix integers are @ instead of #. + Comments start with #, not %. + Add special characters in strings: - `\0' : Nul character (nul), equivalent to `\x00'. - `\cC' : Control C, where C is [A-Za-z]. - `\a' : Alarm (bel). - `\e' : Escape (ec). * Add operators: + threadsdict + threaddstack, threadestack, threadistack, threadostack * Remove operators: + #! + !# 2002-04-17 : Jason Evans * lib/libonyx/src/systemdict.c : Add operators: + rot, srot + adn, aup + saup, sadn Rename/replace operators: + push --> adn + npush/nbpush --> rot + snpush/snbpush --> srot Remove operators: + push * lib/libonyx/include/libonyx/nxo_stack.h: Add nxo_stack_rot(). 2002-04-06 : Jason Evans * lib/libonyx/src/systemdict.c : Add operators: + bpop, nbpop, ipop, nip, tuck, under, over, up, nup, dn, ndn, bdup, ibdup, ibpop + sbpop, snbpop, sipop, snip, stuck, sunder, sover, sup, snup, sdn, sndn, sndup, snpop, sbdup, sibdup, sibpop, sbpush * lib/libonyx/include/libonyx/nxo_stack.h : Add functions: + nxo_stack_bget() + nxo_stack_nbget() + nxo_stack_up_get() + nxo_stack_bpop() + nxo_stack_nbpop() + nxo_stack_remove() + nxo_stack_bpush() * Rename operators: + index --> idup + sindex --> sidup 2002-04-04 : Jason Evans * Add operators: + poll + gstdin, gstdout, gstderr + setstdin, setstdout, setstderr + setgstdin, setgstdout, setgstderr * lib/libonyx/src/nx.c : Add nx_stdin_set(), nx_stdout_set(), and nx_stderr_set(). * lib/libonyx/src/nxo_thread.c : Add nxo_thread_stdin_set(), nxo_thread_stdout_set(), and nxo_thread_stderr_set(). 2002-03-31 : Jason Evans * Add optional mode argument to the open operator. * lib/libonyx/src/nxo_file.c:nxo_file_open() : Add the a_mode argument, so that file creation mode can be specified. * lib/libonyx/src/systemdict.c:systemdict_test() : Use macros (S_ISDIR(), S_ISREG(), etc.) for non-standardized portions of struct stat's st_mode field. This fixes various false positives on Linux. 2002-03-30 : Jason Evans * Onyx 3.0.2 released. * lib/libonyx/src/systemdict.c:systemdict_dirforeach() : Use strlen() rather than the reclen field of struct dirent if there is no namlen field. (Reported by John Liles.) * bin/onyx/src/onyx.c:batch_run() : Specify '+' as the first character of the options string to getopt() on systems that use GNU libc, since they will otherwise permute the arguments and leave unknown ones at the end. This fixes #! magic handling in the case when options are passed to the script that are also used by the onyx binary (for example, -e). 2002-03-27 : Jason Evans * Rename the catenate operator to cat. 2002-03-23 : Jason Evans * Onyx 3.0.1 released. 2002-03-22 : Jason Evans * lib/libonyx/src/systemdict.c:systemdict_rand() : Fix the way random() is used and really generate 63 bits of randomness for the rand operator. 2002-03-17 : Jason Evans * lib/libonyx/src/nxo_name.c : Re-register name objects that are already registered, in order to remove a race condition. * lib/libonyx/include/libonyx/mb.h : Implement write memory barriers. Memory barriers are critical for threaded versions of Onyx, and they are used in nxo_dup(), nxo_p_new(), nxo_p_type_set(), and nxo_stack_roll(). 2002-03-16 : Jason Evans * lib/libonyx/src/thd.c : Significantly rework the generic suspend/resume code to use two signals (SIGUSR1 and SIGUSR2) rather than just one. This allows the removal of some questionable code that may not work on MP systems that use partial store ordering, and also removes the need for resume interlocking. Fix lock order reversal deadlock potential in thd_suspend() and thd_trysuspend(). 2002-03-09 : Jason Evans * lib/libonyx/src/thd.c:thd_p_start_func() : Set the thd->pthread field before inserting the thd into the ring. pthread_create() also sets it, but if only one place sets it, then there is a race between one thread setting thd->pthread and the other using it. 2002-02-10 : Jason Evans * Onyx 3.0.0 released. 2002-02-07 : Jason Evans * Add --with-libedit-prefix and --with-libpcre-prefix, which make it possible to get rpath right if there are multiple copies of the libraries installed. 2002-02-06 : Jason Evans * Add --enable-autogen, so that the automatic rebuilding of configure output is disabled by default. autogen.sh always passes this flag. 2002-02-04 : Jason Evans * Move command line editing support from the onyx binary to modprompt. This avoids the overhead of loading the libedit library for non-interactive invocations of onyx. * Remove libedit from the source tree, and depend instead on an installed copy of libedit. 2002-02-02 : Jason Evans * lib/libonyx/src/systemdict.c:systemdict_dirforeach() : Don't report "." and "..", which always exist, in order to make directory recursion easier. 2002-01-30 : Jason Evans * bin/onyx/src/onyx.c : Add command line support for #! magic when --disable-posix-file is specified. This is necessary in order for onyx to bootstrap itself when configured as such. 2002-01-29 : Jason Evans * Cookfile.inc.in : Move the contents of Cookfile.in to Cookfile.inc.in, so that cook's #include-cooked can re-read it if reconfiguration occurs. Add rules to cause reconfiguration if any .in files are modified. 2002-01-28 : Jason Evans * Move require and mrequire from onyx to libonyx. Also, clean up the searching mechanisms. * Add onyxdict. 2002-01-25 : Jason Evans * Add a bootstrap phase to the build, so that the Onyx code that gets embedded in the interpreter is customized to match the configuration parameters. 2002-01-22 : Jason Evans * Generate embedded onyx code during the build using a bootstrap onyx interpreter (bonyx) so that the generated code corresponds to the configuration flags. 2002-01-20 : Jason Evans * Restructure the build system to place more logic in the configuration phase and less in the Cookfiles. Change paths and binary names to incorporate version numbers, so that multiple installations (different versions) can coexist in the same tree. Change installation paths for modules and Onyx code. Reorganize documentation in order to support building multiple manuals. 2002-01-13 : Jason Evans * Add support for reals, which are double precision floating point numbers. This includes modifications to the scanner, the addition of the nxo_real class, and several new operators: cvds, cves, ceiling, floor, round, trunc, sqrt, ln, log, idiv, sin, cos, and atan. Also, many operators and other portions of code were modified to handle the mixture of reals and integers. * configure.in : Add the --disable-real configure flag. 2002-01-04 : Jason Evans * bin/onyx/src/onyx.c:prompt() : Fix an out-of-bounds memory access. 2001-12-24 : Jason Evans * Onyx 2.3.1 released. 2001-12-23 : Jason Evans * lib/libonyx/include/libonyx/nx_l.h:nx_l_ref_iter() : Don't skip over gcdict during root set iteration. This bug caused threadsdict to be the first object returned during root set iteration, which obscured the bug in nxa_p_roots(), mentioned below. * lib/libonyx/src/nxa.c:nxa_p_roots() : Iterate over the entire root set, rather than short-circuiting after finding the first root. 2001-12-21 : Jason Evans * Onyx 2.3.0 released. * Cookfile.in : Strip leading and trailing whitespace from CC, CPPFLAGS, CFLAGS, and LDFLAGS in order to avoid argument splitting confusion. Make PREFIX over-ridable. 2001-12-15 : Jason Evans * doc/latex/onyx_lang.tex : Document search. 2001-12-08 : Jason Evans * Convert _cw_ to cw_ and _CW_ to CW_ in order to follow the ANSI C standard for namespace reservation. 2001-12-07 : Jason Evans * Move the modload operator from the onyx program to libonyx. 2001-11-17 : Jason Evans * lib/libonyx/src/mem.c : Allocate copies of the filenames that are passed in for debugging, so that leaks in dlopen()ed code that has been unloaded won't cause the leak reporting to segfault. * configure.in : Do not specify CFLAGS unless none were passed in the environment. Add the --disable-onyx flag. 2001-11-13 : Jason Evans * lib/libonyx/src/nxa.c:nxa_p_sweep() : Fix sweep iteration problems when deferred deletion is encountered. * bin/onyx/src/onyx_ops.c:(onyx_ops_modload_sym_delete() : Increase the GC sweep iteration for module unloading. 2001-11-10 : Jason Evans * lib/libonyx/src/nx_nxcode.nx : Print errors to stderr rather than stdout in systemdict's throw. * lib/libonyx/src/nxo_thread_nxcode.nx : Print errors to stderr rather than stdout in errordict's handleerror. 2001-11-09 : Jason Evans * configure.in : Add the --with-docs flag to cleanly avoid building documentation in the common case. 2001-11-04 : Jason Evans * Onyx 2.2.0 released. * lib/libonyx/src/nxa.c : Rename nxa_new() and nxa_delete() to nxa_l_new() and nxa_l_delete(), since the functions are not part of the public API. * Cookfile.in : Allow CC, CPPFLAGS, CFLAGS, and LDFLAGS to be overridden on the command line. Also protect cook-special characters such as '=' so that, for example, CFLAGS can contain -march=i386. 2001-11-03 : Jason Evans * lib/libonyx/src/systemdict.c:systemdict_exec() : Throw a rangecheck error if the argument array is empty. * lib/libonyx/src/nx_nxcode.nx : Redefine throw rather than handleerror in the child process. Do type checking for the argument. * lib/libonyx/test/thd_a.c : Fix a race condition in the test. 2001-10-31 : Jason Evans * lib/libonyx/src/mem.c : Use size_t instead of cw_uint32_t where appropriate to avoid warnings and the possibility of varargs sizeof mismatches for future ports. * lib/libonyx/src/nx.c:nx_delete() : Fix a circular dependency during deletion that could cause a destroyed mutex to be referenced. * Port to Darwin (Apple OS X). 2001-10-07 : Jason Evans * lib/libonyx/src/nxa.c:nxa_p_sweep() : Implement multiple sweep passes, in order to support ordering the deletion of dependent objects. * lib/libonyx/src/systemdict.c:systemdict_bind() : Bind to hooks, just as operators are bound to. * bin/onyx/src/onyx_ops.c:onyx_ops_modload() : The hook evaluated by onyx_ops_modload() now calls dlclose() when deleted, which means that all objects in a module must maintain a reference to the hook. 2001-10-04 : Jason Evans * lib/libonyx/src/systemdict.c:systemdict_iobuf() : Add. systemdict_setiobuf() : Add. * bin/onyx/src/onyx.c:signal_handle() : Reset the terminal before exiting due to a signal. 2001-09-22 : Jason Evans * Onyx 2.1.0 released. 2001-09-21 : Jason Evans * lib/libonyx/src/nxa.c:nxa_p_gc_entry() : Only do periodic collection if there has been allocation activity since the last collection. Before this fix, the code was doing periodic collection if there had been no allocation since the last periodic check. 2001-09-16 : Jason Evans * lib/libonyx/src/nxo_string.c:nxo_string_cstring() : Add. 2001-09-15 : Jason Evans * lib/libonyx/src/nxo_thread.c:nxo_threade_nxn() : Remove. nxo_thread_error() : Remove. nxo_thread_nerror() : Add. nxo_thread_serror() : Add. * Generalize the error mechanism to support errors of any name. * Rename the manual from manual.{ps,pdf,html} to onyx.{ps,pdf,html}. 2001-08-28 : Jason Evans * lib/libonyx/src/nxa.c:nxa_realloc_e() : Add. 2001-08-21 : Jason Evans * Onyx 2.0.0 released. * Maintain the current number of bytes allocated by the interpreter and use this count for threshold-based collection. * API additions: nxa_nx_get(). * API modifications: cw_opaque_dealloc_t, _cw_opaque_dealloc(), mem_free_e(), nxa_free(), nxa_free_e(), nxa_stats_get(), and gcdict's stats operator. 2001-08-20 : Jason Evans * lib/libonyx/src/nxo_file.c : Clean up the internals of onyx file objects and rename nxo_file_interactive() to nxo_file_synthetic() (with API changes). As a result of the cleanup, the API for nxo_file_readline() and nxo_file_buffer_size_set() have also changed. 2001-08-19 : Jason Evans * lib/libonyx/src/nxa.c:nxa_p_roots() : Don't iterate through objects once a root object is found; nxa_p_mark() does that just fine. * Add the --disable-posix-file configure option. This option disables standard onyx file object operations, and requires that all file objects be "interactive". * Fold libstash into libonyx. * lib/libonyx/src/nxo_file.c : Remove nxo_file_output() and nxo_file_output_n(), which were not used anywhere. 2001-08-17 : Jason Evans * Add the --disable-posix configure option. This option disables significant functionality in order to make onyx more easily embeddable in applications that to not have libc available. * Add the --disable-threads configure option. This option disables significant functionality in order to run without threads. 2001-08-13 : Jason Evans * Add the --disable-libedit configure option, and implement rudimentary interactive command line editing that does not use libedit. 2001-08-01 : Jason Evans * Onyx 1.1.0 released. 2001-07-30 : Jason Evans * lib/libonyx/src/systemdict.c : Change the API of the following operators to not leave the input stack on ostack: spush, scount, scounttomark, sdup, sindex, sexch, sroll, spop, sclear, and scleartomark. * configure.in : Check for the unsetenv() function, which Solaris does not have. * doc/latex/onyx.tex : Document unsafeness of removing objects from a concurrently accessed stack. 2001-07-29 : Jason Evans * lib/libonyx/src/nxo_thread.c:nxoe_p_thread_name_accept() : When the result of immediate name evaluation is an executable array, set the evaluable attribute. * Add an additional attribute. Objects are now literal, executable, or evaluable. The addition of the evaluable attribute allows the bind operator to replace executable names with associated executable arrays by converting the executable arrays to evaluable arrays. * lib/libonyx/src/systemdict.c : Add the cve and echeck operators. * lib/libonyx/src/nxa.c : Add nxa_malloc_e() and nxa_free_e(). 2001-07-27 : Jason Evans * lib/libonyx/src/nxo_dict.c:nxoe_l_dict_delete() : Don't leak the internal dch. * lib/libonyx/src/nxa.c : Track number of bytes of memory allocation rather than number of object allocations in order to provide more predictable threshold-triggered collection. * lib/libonyx/src/systemdict.c:systemdict_copy() : Pop the source dictionary off ostack before returning. 2001-07-26 : Jason Evans * lib/libonyx/src/nxa.c:nxa_p_mark() : Ignored unregistered objects, rather than asserting that all objects are registered. 2001-07-24 : Jason Evans * doc/latex/onyx.tex (section{Interpreter recursion}): Document tail call conversion. 2001-07-23 : Jason Evans * lib/libonyx/src/systemdict.c : Add the following operators: pid, ppid, uid, euid, gid, egid, setuid, seteuid, setgid, and setegid. * bin/onyx/src/onyx.c:cl_read() : Retry if there is an error in el_gets(). This should fix intermittent deadlocks when onyx is run interactively. 2001-07-22 : Jason Evans * lib/libonyx/src/systemdict.c : Add the ndup and npop operators. * lib/libonyx/include/libonyx/nxo_stack.h:NXO_STACK_NPOP() : Add a missing ")". * lib/libonyx/src/systemdict.c : Add the setenv and unsetenv operators, since direct modifications to envdict will not be visible to programs such as ps. 2001-07-21 : Jason Evans * lib/libonyx/src/nx_nxcode_gen.nx : Generate a temporary dictionary of short names that is used to compact the onyx bootstrapping code. 2001-07-20 : Jason Evans * lib/libonyx/src/nx_nxcode.nx : Implement outputsdict, outputs and output. * lib/libonyx/src/systemdict.c:systemdict_cvrs() : Treat integer as signed rather than unsigned. 2001-07-19 : Jason Evans * lib/libonyx/src/systemdict.c:systemdict_hooktag() : Add. * lib/libonyx/include/libonyx/nx.h : Remove sprintdict, which is replaced by sprintsdict. * lib/libonyx/src/nx_nxcode.nx : Implement sprintsdict and sprints. Re-define sprint in terms of sprints. * lib/libonyx/src/systemdict.c:systemdict_cvs() : Convert a string to a syntactically valid equivalent. Strings were previously left alone. 2001-07-18 : Jason Evans * Onyx 1.0.2 released. * doc/Cookfile.inc : Add -local_icons flag to latex2html invocation so that icons will be included in the distribution. * Onyx 1.0.1 released (retracted). * Onyx 1.0.0 released. 2001-07-13 : Jason Evans * Install in [prefix]/share/onyx/* instead of [prefix]/share/canonware/onyx/*.