Commit Graph

406 Commits

Author SHA1 Message Date
a3c7f4c6f7 renamed some time functions.
enhanced hawk_add_ntime()/hawk_sub_ntime() to detect overflow/underflow
2020-09-02 20:02:51 +00:00
87e3601818 removed unneeded substitution in configure.ac 2020-08-19 04:56:50 +00:00
1701a40dca removed the do..while wrapper from HAWK_STATIC_ASSERT 2020-08-19 04:33:18 +00:00
6602de8527 added a static assertion in lib/hawk-cmn.h 2020-08-19 04:28:38 +00:00
afb7fa41ff improved character definitions in hawk-cmn.h 2020-08-19 04:03:56 +00:00
9988b1afcd added check for the u and U prefix for string literals 2020-08-19 02:38:07 +00:00
416a39868a regenerated some build files 2020-08-19 02:04:08 +00:00
3cceb80fa0 renamed --enable-unicode to --enable-wide-char 2020-08-16 07:20:01 +00:00
fb948bba12 added --enable-pthread-flags to configure.ac 2020-08-15 18:26:56 +00:00
44101be7ac updated ax_lib_mysql.m4 2020-08-15 15:07:10 +00:00
dcd39eb22b minor comment changes in hawk-cmn.h 2020-08-14 16:58:36 +00:00
6dc5f4b123 modified README.md 2020-08-06 04:57:31 +00:00
d177219179 changed ambiguous code in lib/fmt.c 2020-07-10 14:53:11 +00:00
996b9e92c8 changed ambiguous code in lib/fmt.c 2020-07-10 14:50:54 +00:00
1dbf8046b0 added HAWK_ZDIGIT_TO_NUM() 2020-05-27 09:32:52 +00:00
303118bc5c added a common macro HAWK_XDIGIT_TO_NUM() to replace repeated code 2020-05-27 09:15:48 +00:00
8b7b2562df fixed the wrong value defined for HAWK_SKAD_TO_OOCSTR_PORT 2020-05-20 14:32:04 +00:00
0c46c2c145 fixed wrong length type in hawk_copy_uchars_to_ucstr() and hawk_copy_bchars_to_bcstr() 2020-05-20 13:03:27 +00:00
610910ad9e fixed hawk_arr_getstyle() 2020-05-04 07:21:13 +00:00
7f479f156b added special parser-level substitution word - @SCRIPTNAME, @SCRIPTLINE 2020-05-04 07:14:32 +00:00
8ad37dabf0 removed hawk::array_size(), hawk::array_tally().
enhanced hawk::array() and hawk::map() to accept values
2020-05-03 15:49:31 +00:00
84d869606f simplified the way to get the first integer index in idxnde_to_str() 2020-05-03 06:17:44 +00:00
6709839f96 fixed another bug in 'in' evaluation 2020-05-03 06:05:06 +00:00
210aa19820 enhanced the 'in' operator evaluation to support an array 2020-05-03 05:45:31 +00:00
11b6e0ce97 trivial change for code consistency 2020-05-02 18:34:18 +00:00
29bc731ccb enhanced asort() and asorti() to handle an array value.
added hawk_rtx_getarrvalfld() and hawk_rtx_setarrvalfld()
2020-05-02 18:18:26 +00:00
5326953e9b made a minor change in tools/uni-case.c 2020-05-01 08:10:51 +00:00
56a5bf592f defined hawk_ooecs_amend to hawk_becs_amend in the bch mode 2020-04-30 15:56:15 +00:00
0c184b6817 changed length() over an array to return the number of items set.
added hawk::array_size() to return the last index + 1.
added hawk::array_tally() which works for an array only and acts like length()
2020-04-29 13:03:02 +00:00
881dfd2ce0 enhanced array manipulation code 2020-04-26 15:28:44 +00:00
d497e51b62 code for array support in assignment, evaluation, getting reference, deletion 2020-04-25 18:35:04 +00:00
47cea947db minor error message changes 2020-04-24 17:39:00 +00:00
70f759b140 more code for array support 2020-04-24 17:27:56 +00:00
1b7ef41ee4 fixed an array access problem by an out-of-range index in eval_indexed() 2020-04-24 16:01:23 +00:00
f860798821 Added partial code for array support 2020-04-24 15:52:08 +00:00
6e857ff4f2 updated hawk_arr_t callback functions to be more consistent with hawk_rbt_t/hawk_htb_t by creating hawk_arr_style_t and adding hawk_arr_setstyle()/hawk_arr_getstyle().
remove hawk_arr_getcopier()/hawk_arr_setcopier()/hawk_arr_getcomper()/hawk_arr_setcomper()
2020-04-24 06:49:19 +00:00
75dc7d8fbc Added sys::tcflush() and defined sys::TC_CFLAG_XXX items 2020-04-23 08:07:46 +00:00
11371cc073 dropping the idea of hawk::reset() and changing it to hawk::array() and hawk::map() 2020-04-23 07:25:33 +00:00
260ab078f8 made IUTF8 conditional depending on its availability 2020-04-22 11:41:37 +00:00
22342148f5 changed hawk_rtx_makemapvalwithdata() to accept data count.
enhanced sys::tcgetattr() and sys::tcsetattr() to store and fetch the value for c_cc field to and from the "cc" slot
2020-04-22 06:48:01 +00:00
8b597b7acf did some preparatory work to support an array that uses an integer as the index 2020-04-20 15:34:59 +00:00
3a717bb768 made OXTABS and ONOEOT compilable when not available 2020-04-20 04:39:21 +00:00
121ae9bc76 fixed a bug in sys::tcsetattr() 2020-04-20 04:29:00 +00:00
2f6bd33fc3 added partial implementation of sys::tcsetattr(), sys::tcgetattr(), sys::tcsetsane() 2020-04-19 16:33:35 +00:00
ac81d7cc2a Added static assertion to check wchar_t type for C++ 2020-04-17 17:50:15 +00:00
3bae71b21f minor code touch-up again 2020-04-17 17:19:34 +00:00
53b76934d9 minor code touch-up 2020-04-17 15:07:38 +00:00
7e9d7d8015 added hawk_subst_for_uchars_to_ucstr(), hawk_subst_for_ucstr_to_ucstr() hawk_subst_for_bchars_to_bcstr(), hawk_subst_for_bcstr_to_bcstr() 2020-04-17 11:10:47 +00:00
0b9d29ba72 added hawk_copy_bcstr_to_bchars() and hawk_copy_ucstr_to_uchars() 2020-04-16 15:29:09 +00:00
756a8454b2 removed the enforced -std=c++11 from CXXFLAGS in the rpm spec file 2020-04-16 06:17:12 +00:00
0c6b7a6ac8 adopted AX_CXX_COMPILE_STDCXX() for auto-detection of a c++11 capable compiler 2020-04-16 06:11:07 +00:00
c567b511f8 fixed a wrong test macro in t/t.h 2020-04-16 03:52:35 +00:00
c3d137a5c2 added %check to the rpm spec file.
renamed awk to hawk
updated copyright years
2020-04-16 03:42:30 +00:00
5f4635d455 added HAWK_OPT_MODLIBDIRS to specify search path for module files 2020-04-15 15:12:28 +00:00
a36dbd9c2f renamed enumerators of hawk_opt_t 2020-04-15 08:38:41 +00:00
fd94b20974 adding HAWK_MODLIBDIR 2020-04-15 08:35:07 +00:00
b72110af74 integrated some test files to automake 2020-04-14 14:02:04 +00:00
ef9db73f19 fixed a bug in handling a reference value in hawk::call() 2020-04-14 11:45:52 +00:00
c7961f84d2 some sample code to mod-mysql.c
added a test script file t/h-001.hawk. there is still a reference handling bug regarding hawk::call()
2020-04-14 07:40:30 +00:00
11fe4e17ad fixed a bug where a reference value was passed to a user-defined function. a reference value should have been evaluated to a non-reference value before given to a user-defined function. it's a new bug introduced over a few previous commits done to support hawk::call() 2020-04-14 06:47:46 +00:00
f827a94d64 work in progress - debugging reference evaluation issues 2020-04-14 06:02:55 +00:00
178c83724b added hawk::function_exists() 2020-04-13 13:56:09 +00:00
a8afcca04e simplified hawk::call().
fixed a bug in copying a value for a reference upon returning from a function in hawk_rtx_evalcall(). it was unable to handle the case where a reference variable is not updated in the called function
2020-04-13 08:41:16 +00:00
f5da432bb4 fixed wrong macros - hawk_tio_getxtn(), hawk_pio_getxtn(), hawk_sio_getxtn(), etc 2020-04-13 06:15:03 +00:00
6664621a45 fixed an initialization bug in mod-math.c 2020-04-12 19:05:15 +00:00
e4de922f7d touched up stack management code
added hawk::call()
2020-04-12 18:23:44 +00:00
9eb3c4fc42 enhanced a function caller to take a string and find a function to execute it 2020-04-09 12:56:47 +00:00
9328a49cb1 added hawk_rtx_valtofun() and changed the asort implementation to use it 2020-04-08 17:07:19 +00:00
d9ffad1227 renamed hawk_rtx_cleario() to hawk_rtx_clearallios().
added hawk_rtx_flushallios().
revised hawk_rtx_loop() and hawk_rtx_callfun() to call hawk_rtx_flushallios() instead of hawk_rtx_clearallios().
changed the io handler to discard unflushed data if flushing fails in std.c
2020-04-08 10:23:31 +00:00
a23eeee168 added true multidimensional map support for the for-in statement and the binary in operator 2020-04-07 16:16:48 +00:00
ca1877d412 call-by-reference handling with a true multidimensional map 2020-04-04 17:40:56 +00:00
82eac76de4 more true multidimensional map work 2020-04-03 17:56:04 +00:00
9d40f45092 implementing deletion on true multi-dimensional map 2020-04-03 09:29:37 +00:00
164d91661b implementing assignment with true multi-dimensional map 2020-04-03 02:05:12 +00:00
76d295365a writing code for supporting true multi-dimensional indices in map 2020-03-30 08:54:37 +00:00
abcc217dd0 changed the point where hawk_rtx_cleario() is called for cleanup 2020-03-29 08:05:36 +00:00
cd7873e19a changed code to prevent buffered output from span across the end of hawk_rtx_execXXX() 2020-03-29 06:29:05 +00:00
e54537886c changed to call hawk_rtx_cleario() before restoring SIGPIPE handler in bin/main.c 2020-03-28 08:28:09 +00:00
a93beaaf55 added hawk::gc(), hawk::gc_set_threshold(), hawk::gc_get_threshold() 2020-03-28 08:04:37 +00:00
7d70005984 implemented automatic generational processing based on threshold in garbage collection 2020-03-28 06:45:36 +00:00
752b1332c9 touched up gc code 2020-03-25 17:05:48 +00:00
d448f8d8bc gc enhancement for supporting generational processing 2020-03-25 08:40:41 +00:00
c1ffc899fe some more code cleanup 2020-03-25 06:22:25 +00:00
74180e1d8a some cosmetic source code changes 2020-03-25 05:56:11 +00:00
404c382e33 fixed a gc flaw upon rtx disposal 2020-03-24 15:26:00 +00:00
962b1d47dd fixed a bug in run_forin() in run.c 2020-03-24 07:14:12 +00:00
77640ef73c renamed the suffix of some scripts to .hawk
fixed mod-sys.c a bit
2020-03-24 07:08:21 +00:00
565e51091b fixed outstanding bugs in gc implementation. pending more improvements 2020-03-24 06:49:25 +00:00
9dc3d5418a made some conditional changes to mod-sys.c 2020-03-23 16:33:32 +00:00
8f6176f451 trying to fix bugs in gc implementation 2020-03-23 16:14:38 +00:00
8c01bef2fb some interim code for gc implementation 2020-03-23 09:24:22 +00:00
53a3cdfd23 removed a redundant semicolon after #endif in mod-sys.c 2020-03-22 18:04:38 +00:00
6502a2e388 changed the behavior of for(x in y) loop - it now takes a snapshot of keys before running body 2020-03-22 18:01:05 +00:00
66d461e664 fixed a fault in hawk-rbt.h 2020-03-21 11:38:27 +00:00
f0c1a26ccc some gc works 2020-03-20 09:50:32 +00:00
adcbf748a2 fixed a bug in string cache managment.
added mbs cache management
2020-03-20 06:05:28 +00:00
7fe9ea0936 added some code to implement gc 2020-03-19 17:42:01 +00:00
1285d77c1e changed the doubly linked list to circular in idmap-imp.h
started writing some code to implement gc
2020-03-18 08:30:40 +00:00
bc87c486da optimized rbt.c and htb.c a bit 2020-03-17 15:44:00 +00:00
cd4298499f optimized lib/run.c a bit 2020-03-17 15:30:56 +00:00
ddcdd3904e enhanced hawk_makemapvalwithdata() to handle integers of various size
enhanced sys::stat()
2020-03-17 08:12:01 +00:00
2f548f8b38 registered hawk-map.h in lib/Makefile.am 2020-03-16 09:39:43 +00:00
625cca9d1f added sys::stat(). still incomplete 2020-03-16 08:55:29 +00:00
532de8ac48 updated documentation a bit 2020-03-16 08:28:02 +00:00
6cd9cafd33 added hawk-map.h which uses either htb or rbt depending on HAWK_MAP_IS_HTB or HAWK_MAP_IS_RBT
the hawk's map value is now dependent on the above change. at compile time, you can choose HTB or RBT.
fixed a bug of not resetting FNR in the standard console read handlers
2020-03-15 17:39:15 +00:00
4121ef9b3f enhanced hawk_unescape_bcstr() to convert \uXXXX and \UXXXXXXXX to utf8 sequences 2020-03-14 06:09:59 +00:00
f2316d1d3e hawk_unescape_bcstr()/hawk_unescape_ucstr() 2020-03-13 16:00:21 +00:00
84c0b37e94 fixed a bug in printing a tree node of the HAWK_NDE_POS type 2020-03-12 04:26:28 +00:00
db77a97119 updated README.md a bit 2020-03-11 07:46:39 +00:00
689735eed8 added @pragma multilinestr on/off 2020-03-11 07:13:02 +00:00
059ba422ce removed some unneeded lines 2020-03-10 15:27:44 +00:00
c2162bd12b enhanced hawk_rtx_match() to handle mbs
fixed bugs in hawk_rtx_getrefval() and hawk_rtx_getrefvaltype() for HAWK_VAL_REF_POS
2020-03-10 15:17:21 +00:00
bae06804ef added hawk_rtx_matchvalwithucs() and hawk_rtx_matchvalwithbcs()
renamed hawk_rtx_matchval() to hawk_rtx_matchvalwithoocs()
updated code concerning the call to hawk_rtx_setrefval()
2020-03-10 08:36:31 +00:00
260df21f85 made sub() and gsub() mbs-aware 2020-03-10 04:07:23 +00:00
09360c4abe added a comment on the change made in the previous commit 2020-03-09 15:36:01 +00:00
75ef3a949a changed the tre parser to treat a backslash as an escaper inside [] 2020-03-09 15:29:31 +00:00
fd56a19a79 added @pragma stripstrspc on/off
added a new global variable STRIPSTRSPC
2020-03-09 08:52:42 +00:00
c8e805b159 updated README.md 2020-03-09 07:10:41 +00:00
c45114458e moved scripts to the scripts directory.
added a embedding sample in c
2020-03-08 15:39:33 +00:00
4ee104e1ee minor touch up 2020-03-08 15:09:09 +00:00
f0d588414e added %u to printf
changed %c with an empty string to '\0' in printf
fixed the execution behavior of double patterned action block(e.g. /a/,/b/)
fixed a bug in NF=value assignment handling
fixed a bug when assigning NF with a large number than the current number of records
fixed a bug in converting multidimensional array index to a string
2020-03-08 15:04:47 +00:00
4bd494d07b added hawk_rtx_makenumormbsvalwithuchars(), hawk_rtx_makenumormbsvalwithbchars(), hawk_rtx_makenumorstrvalwithuchars(), hawk_rtx_makenumorstrvalwithbchars() 2020-03-06 07:43:53 +00:00
52dea401f8 fixed mistakes in some assertions 2020-03-05 15:22:55 +00:00
ea20bde917 updated open handling in standard console and file handlers 2020-03-05 15:11:55 +00:00
75cb22aaec renamed hawk_setgblbyname() to hawk_setgbltostrbyname() 2020-03-05 09:04:14 +00:00
b7d29ffc86 added hawk_isvalidident() & hawk_setgblbyname().
fixed the standard console input handler to process special arguments of the var=val format
2020-03-05 06:33:58 +00:00
30887f7f2c some simple touch-ups 2020-03-04 14:39:27 +00:00
e8e5aa7935 fixed a bug handling -v in bin/main.c 2020-03-04 13:59:03 +00:00
7980e12999 changed the unary bitwise negation operator to a single tilde which overlaps with the regex match operator 2020-03-04 09:54:38 +00:00
916da0fd59 fixed wrong error handling in bin/mani.c 2020-03-04 09:25:17 +00:00
2ce27360d5 set the initial value of FS to a single space letter 2020-03-04 06:34:23 +00:00
87656f803e some code touch up 2020-03-03 12:00:13 +00:00
957fa97ebb handled RC_EINTR returned by sys::waitonmux() in tcp-proxy.awk 2020-03-03 08:09:34 +00:00
015ed09c5a added a new global variable SCRIPTNAME which intends to store the first script name loaded 2020-03-03 08:03:04 +00:00
83d47bb64a SO_REUSEPORT fix for platforms lacking it 2020-03-02 15:52:54 +00:00
6886c5fab7 fixed a bug in sys::delfrommux() which didn't clear unread event data 2020-03-02 14:37:41 +00:00
93beb3f041 removed unstable assertions 2020-03-02 13:35:35 +00:00
aeff29f68e enhanced scripts/tcp-proxy.awk 2020-03-02 09:41:11 +00:00
8753eae27a Added sys::sockaddrdom() 2020-03-02 09:40:40 +00:00
48809c9e69 fixed a critical bug in handling a multi-dimensional index with delete (e.g. delete[20,"data"]) 2020-03-02 07:23:34 +00:00
140c12f726 updated lib/Makefile.am 2020-02-27 07:49:04 +00:00
a35c729348 updated ax_pthread.m4 to the latest
updated lib/Makeifle.am and samples/Makefile.am
2020-02-26 18:42:31 +00:00
b917920aa5 added 2 more parameters to sys::write()
adding a tcp proxy script
2020-02-26 08:38:23 +00:00
c5799690b8 added @pragma striprecspc on/off 2020-02-21 07:58:24 +00:00
b72dc3aaad removed unneeded files 2020-02-20 06:29:35 +00:00
7585c36e3e fixed HAWK_SIZEOF_SKAD_T defintion 2020-02-16 13:43:01 +00:00
fb1084a045 implemented sys::flock() with fcntl() 2020-02-10 08:36:01 +00:00
388e576ad9 added sys::fnctl() with sys::F_SETFD, sys::F_SETFL, sys::F_GETFD, sys::F_GETFL 2020-02-09 17:05:33 +00:00
57a6217caf added sys::setsockopt()
enhanced mux handling in mod-sys.c
2020-02-09 06:15:35 +00:00
e82d8d59d4 more mux implementation in mod-sys.c 2020-02-08 18:30:03 +00:00
b0d6ba8432 sys::shutdown(), sys::accept(), sys::listen(), sys::bind() 2020-02-07 09:33:13 +00:00
e7b251aa3e added sys::recvfrom in mod-sys.c 2020-02-06 15:33:43 +00:00
83e2a43493 added sys::sendto() in mod-sys.c 2020-02-05 15:13:29 +00:00
b109ae6fbb sys::socket, sys::connect() in mod-sys.c 2020-02-05 06:13:51 +00:00
722edb36cd simplified mux in mod-sys.c a bit 2020-02-04 15:37:19 +00:00
292f2cc265 some changes to mux handling in mod-sys.c 2020-02-04 09:59:08 +00:00
e2accffa0e some mux work. yet to be finished 2020-01-28 23:32:04 +00:00
f45c45ee7e some mux functions in the sys module 2020-01-27 17:08:07 +00:00
1b66deaca0 minor changes for old compilers 2020-01-27 09:54:20 +00:00
ef2acc19a5 shortened @pragma startup to @pragma entry
adding experimental io multiplexer support to the sys module
2020-01-24 14:15:58 +00:00
c3d7da33f5 some fixes for bch mode 2020-01-24 06:54:49 +00:00
58515d6c39 modified pkgs/hawk.spec.in 2020-01-22 10:14:18 +00:00
824632d4cb enhanced build files for rpm packaging 2020-01-22 09:46:17 +00:00
e2af46cabe got mysql::execute() and mysql::fetch() working 2020-01-19 14:31:27 +00:00
49b7896ba0 added mysql::insert_id(), mysql::stmt_insert_id(), mysql::stmt_fetch().
mysql::stmt_fetch() yet to be finished
2020-01-19 11:17:14 +00:00
8246a38f61 wrote more code for mysql::stmt_execute().
changed error handling in mod-mysql.c
2020-01-19 04:43:56 +00:00
6c3a3f3f1e some more experimental code into mod-mysql.c for parameter binding 2020-01-18 10:43:41 +00:00
e5692a250e some experimental into mod-mysql.c 2020-01-18 05:36:36 +00:00
851d485499 fixed Hawk and HawkStd for byte reading 2020-01-17 06:25:51 +00:00
102a773bed made getbline implementation more sensible but still not good enough 2020-01-17 03:41:10 +00:00
0c2a13b652 removed hawk_rtx_matchrex() and redefined it as a macro 2020-01-16 15:22:18 +00:00
45f08d03d9 some code touch-up in run_print and run_printf 2020-01-16 14:53:44 +00:00
788b7a6290 some support code for getbline. yet to be completed 2020-01-16 10:43:55 +00:00
3325db83fb removed BRS.
attempting to support getbline
2020-01-16 09:22:59 +00:00
ba320fad99 fixed lib/Makefile.am 2020-01-15 06:00:52 +00:00
8e1c106fe2 added Hawk::setCmgr() 2020-01-15 05:25:43 +00:00
27e0b5f4f7 renamed hawk_dflerrstr() to hawk_dfl_errstr().
removed the hawk_t* argument from hawk_dfl_errstr().
added the _cmd field to Hawk
2020-01-15 04:59:36 +00:00
b7fecc3172 added a new global variable BRS for byte reading.
wrote some more functions to support byte reading
2020-01-14 14:55:34 +00:00
32344f2c0c added Hawk::exec() 2020-01-14 09:10:47 +00:00
3e86ce4ab2 check for multiple @pragma startup directives at the top-level source 2020-01-11 16:01:52 +00:00
cf741c1525 implemented @pragma startup ... 2020-01-11 05:24:07 +00:00
d5cb858e04 added sys::symlink() 2020-01-10 15:54:23 +00:00
66a626a6e6 added sys::rmdir() 2020-01-10 15:30:57 +00:00
8f484cf79e some code touch up in mod-sys.c 2020-01-10 08:28:52 +00:00
ca1c6cf97f added sys::setenv(), sys::unsetenv() 2020-01-10 08:18:55 +00:00
c69a1b3f50 touched up sys::getenv() 2020-01-10 05:02:40 +00:00
d895ca93d6 enhanced error handling in fnc_unlink 2020-01-10 04:44:44 +00:00
8526c4eeac fixed segfault in fnc_system 2020-01-10 04:33:39 +00:00
13eba6b85d added sys::chroot() 2020-01-10 04:29:27 +00:00
44937ce12a added sys::fchown() 2020-01-09 14:24:26 +00:00
894488dd09 some silly code changes 2020-01-09 09:28:32 +00:00
f1c5626b1b improved Hawk::Value::setIndexedStr() functions 2020-01-09 07:24:35 +00:00
ba8cb99231 fixed build files to move c++ objects to libhawk from libhawkxx 2020-01-09 04:34:21 +00:00
8d23aa3ab7 changed configure.ac to accept yes:4w, yes:2w, no:4w, no:2w with enable-unicode 2020-01-09 02:58:29 +00:00
c9854dd02c fixed wrong initialization in utl-skad.c 2020-01-09 02:50:45 +00:00
0c65ae7eec added Hawk::getErrorMessageU(), Hawk::getErrorMessageB(), Hawk::getErrorLocationFileU(), Hawk::getErrorLocationFileB() 2020-01-08 15:37:42 +00:00
8740a081f7 redefined hawk_uch_t 2020-01-08 07:23:03 +00:00
c22d3369c9 removed more redefinitions of primitive types in Hawk and HawkStd 2020-01-08 03:21:49 +00:00
19c1a9e831 fixed to set path on the sio argument in HawkStd
removed some redefinition of primitive types in Hawk
2020-01-08 03:14:41 +00:00
4af782af80 fixed Hawk & HawkStd more 2020-01-07 16:34:26 +00:00