1
0

CHANGES 24 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581
  1. /**
  2. \page _changes_page Changes
  3. <HR>
  4. Serj Kalichev
  5. \section _1_5_0 1.5.0
  6. Thanks to the contributors:
  7. - Michal Turek
  8. - Camilo A. Arboleda, Cybercom
  9. \section _1_2_1 1.2.1
  10. \section _1_2_0 1.2.0
  11. \section _1_1_0 1.1.0
  12. \section _1_0_0 1.0.0
  13. - The project was forked. The new name is klish.
  14. The following updates were introduced as part of work undertaken as an employee
  15. of Newport Networks. (http://www.newport-networks.com)
  16. Graeme McKerrell
  17. \section _0_7_3 0.7.3
  18. - minor bug fix from Cliff Martin which avoids a SEGV when CTRL-C is invoked
  19. on an empty line.
  20. \section _0_7_2 0.7.2
  21. - updated the default value fix slightly to ensure that if the default is set
  22. to the empty string then the parameter will not be translated. This means
  23. that legacy code which uses an empty default as an indicator of a parameter
  24. not being provided will continue to work.
  25. - incorporated bug from Charlie (nmsguru at sourceforge dot net) to make
  26. sure that default values are correctly translated. e.g. a SELECT parameter
  27. can be given the textual name in the XML and will be translated into the
  28. appropriate interpretation when used.
  29. - updated the configuration so that the --enable-lubheap option is disabled by default. There
  30. were a number of people which were having problems compiling the memory management code and tests.
  31. - added in lub_partition component which provides a fast local memory heap for the current thread
  32. as well as a global mutex controlled heap which is used by multiple threads.
  33. - added statistics to lub_blockpool component
  34. - performance overhaul of lub_heap component. Added a cache for smaller sized blocks which provides
  35. a boost to the alocation/deallocation speed.
  36. - updated escape_decode() function in vt100.c to become non-blocking for
  37. the scope of decoding an escape sequence. This prevents hanging the
  38. input if a user presses the ESC key.
  39. - added a lub_heap_show_allocs() function which enables any leak detection
  40. tracked allocations to be output. This is useful in the case where memory
  41. corruption is preventing a scan from taking place.
  42. - updated lub_heap__set_framecount() so that when you disable leak detection
  43. the tainting state is returned to that before leak detection was enabled.
  44. - implemented correct alignement allocations of sizes other than
  45. native alignment. Changed the naming convention to
  46. LUB_HEAP_ALIGN_2_POWER_X and provided support upto 128MB alignment.
  47. - updated the memInit() function in lubheap/vxwork/memLib.c to call
  48. memLibInit() and memPartLibInit(). This is necessary for systems which
  49. only call memInit() in usrRoot() routine.
  50. - updated the root-view.xml example file to demonstrate the use of different
  51. parameter types.
  52. - updated the named-view.xml example file to demonstrate the use of viewid.
  53. - added patch from Anselmo Lacerda Silveira de Melo to add CTRL-U key
  54. combination to tinyrl which deletes the current line contents.
  55. - fixed "const-ness" issue in lub/heap/context.c
  56. - added error checking to posix/heap_leak_mutex.c in case the pthread
  57. calls fail.
  58. - added heap address to the details output by lub_heap_show()
  59. - fixed possible uninitialised variable in heap_realloc.c
  60. - updated clish.xsd to make sure the "PARAM" tag is named.
  61. \section _0_7_1 0.7.1
  62. - Cleaned up configure.ac, added --enable-lubheap experimental option which can
  63. be used to replace the normal system memory libraries with a lub/heap implementation.
  64. Added librt and libintl support as well as POSIXifiying the build for clean
  65. building under LINUX.
  66. - Updated the shell_spawn.c file to enable tilde expansion in CLISH_PATH.
  67. - split lub_heap platform specifics into two parts
  68. 1) the platform specific support code required by the core
  69. lub_heap implementation.
  70. 2) a lubheap component which can be linked in to replace the normal
  71. platform memory libraries.
  72. - updated lub_heap component so that memory scanning is handled by specific functions
  73. rather than assume the naming conventions of particular sections during the link.
  74. The platform specific code now has to perform the scanning.
  75. - refactored lub/heap/vxworks to better override vxworks libraries when linked in
  76. as a library.
  77. - fixed lub_heap component so that it compiles on 64 bit architecture, and with GCC-4.0
  78. - updated tinyxml to version 2.5.1
  79. - updated lub/heap/vxworks/malloc.c/free.c/realloc.c to undefine any
  80. MACRO set with their function name. This ensures that they always get compiled
  81. with the correct name, even if the rest of the CLISH framework is being
  82. compiled to use an alternative memory heap, via -D options
  83. - Fixed issue in tinyrl_readline where raw mode was enabled (and input buffer
  84. flushed) between printing prompt and accepting input. This was causing
  85. things like expect scripts to fail. Fix was to change to raw mode prior to
  86. printing the prompt.
  87. - Fixed lub_heap component to work with latest version of Cygwin.
  88. The areas which use the __builtin_return_address() function,
  89. provided by GCC, now uses the lub_heap_data_start value to
  90. check whether a returned address is beyond the "text" section.
  91. Hence a stack trace is deemed to come to an end if either the return
  92. address is 0 or greater than lub_heap_data_start.
  93. - Changed next pointer in lub_heap_s to be "lub_heap_s *"as opposed
  94. to "lub_heap_t *" so that GDB does not give incomplete type.
  95. Fixed memory stomp in tinyrl_completion.
  96. - Updated to account for obscure problem related to C-strings
  97. being signed and the ctype.h API taking a signed integer.
  98. If a string contains characters greater than 127 then the signed bit
  99. will be set and when calling a ctype.h utility this can get sign
  100. extended.
  101. e.g.
  102. char *ptr = "£10"; isspace(*ptr); will have the value -100
  103. passed to the function (or MACRO) as the '£' character (decimal 156)
  104. is negative when held as a signed char.
  105. The solution is to ensure that you always used unsigned chars to
  106. pass to the utility functions. This was achieved by adding a lub_ctype
  107. component which provides 8-bit safe versions of these functions.
  108. - added ability to have scripts stop on error or not by introducing a new
  109. clish_source_no_stop entry point,
  110. - added ability to limit the maximum line length in tinyrl.
  111. - fixed bug in tinyrl_completion which was stomping on memory when there
  112. were an exact multiple of 10 completions. Fix is to allocate one extra
  113. entry for the NULL terminator.
  114. - added lub_heap_destroy() operation which frees up a heap object so
  115. that the memory segments used for it can be reused for something else.
  116. - Updated lub_heap so that leak scanning will account for
  117. any non-monitored allocated blocks in the system. This
  118. prevents false leaks from being reported. However it
  119. cannot account for any of the non-monitored blocks being
  120. leaked themselves.
  121. - stripped out some spurious code in vxworks/heap_symShow.c
  122. - lubMallocTest.exe now exercises stress test on lub_heap component.
  123. mallocTest.exe runs the same test on the native heap manager for the
  124. host platform.
  125. - fixed lub_heap__get_max_free() to work when no free blocks are present.
  126. - added a generic lub_heap_scan_stack() function which can be used
  127. to scan any variables held in the current stack up to 32 levels.
  128. (needed for non VxWorks systems)
  129. - made lub_heap_scan_memory() take a const void* argument.
  130. - updated lub/heap.h to work when included from C++ file.
  131. - updated the posix/heap_symShow.c to use libbfd for symbol decoding.
  132. A lub_heap_init() operation now exists which is called to
  133. provide the filename of the current program so that symbols can be
  134. loaded.
  135. - disabled memory leak detection and memory taiting by default for
  136. the POSIX platform.
  137. - changed default behaviour to tainting and leak detection off.
  138. - when leak detection is enabled for the first time an exit handler is
  139. registered to dump memory when a program completes.
  140. - updated configure.ac so that -disable-gpl may be used to prevent
  141. linking with GPL licenced libraries.
  142. - fixed bug in tinyrl_completion which was stomping on memory when there
  143. were an exact multiple of 10 completions. Fix is to allocate one extra
  144. entry for the NULL terminator.
  145. - fixed bug in clish_pargv_new() which was only allocating enough memory
  146. for the number of arguments entered on the command-line. In the case of
  147. optional trailing parameters, which were not entered, this caused a memory
  148. stomp! Fixed by allocating enough memory for the maximum of the entered
  149. parameters or the command parameters.
  150. - added clish_command__get_param_count() method to obtain the number of
  151. parameters associated with a command.
  152. - fixed bug in lub_heap_graft_to_bottom; the tail was not getting it's
  153. free and segment fields set up.
  154. \section _0_7_0 0.7.0
  155. - Updated shell_execute.c to ensure that directories are not executed
  156. - fixed minor bug in autocompletion of parameters.
  157. clish_shell_parameter_generator() needed to account for trailing space
  158. when giving context sensitive help for parameters.
  159. - updated lub_heap to maintain the length of blocks inclusive of the block
  160. headers and tail. This reduces the overhead of manipulating sizes during
  161. operations and also addresses an issue with the re-use of previously freed blocks.
  162. - added dblockpool component for creating dynamic chunks to be used as
  163. blockpools. The lub_heap implementation now uses this for holding
  164. context instances, which both reduces the overhead memory used and
  165. greatly reduces fragmentation when detecting leaks.
  166. - fixed double insert bug in the lub_bintree_insert.c file.
  167. Although the function was correctly returning -1 it was also
  168. replacing the root node with the provided client node!
  169. - updated shell_tinyrl.c so that typing "?" whilst in the middle of a
  170. quoted string inserts the '?' character rather than giving context
  171. sensitive help.
  172. - fixed memory leaks which occurred when clish thread is cancelled during
  173. execution of a script.
  174. - updated to make the execution of a script asynchronously cancellable.
  175. - modified clish_shell's history command to use new methods
  176. - added tinyrl_history_entry__get_index() method and removed
  177. tinyrl_history__get_base()
  178. - modified tinyrl_history so that index is held in the history_entry
  179. instances Then updated the history insertion code so that duplicate
  180. entries are only held once in the history. This means that numeric
  181. gaps can now occur in the history list, but a stifled list will no
  182. longer force recent commands off the list through the repetition of
  183. a single command.
  184. - updated tinyrl_completion() so that if the completion list contains
  185. words which have a common (case insensitive) prefix are correctly
  186. handled. Before this fix if commands "one" and "OneTwoThree" both
  187. existed in the same view then the user would be unable to type
  188. anything beyond "one".
  189. - fixed bug in clish_shell_tinyrl_key_enter() where a pointer to the line
  190. for the current tinyrl instance was being held onto after it had been
  191. changed by an auto-completion, hence was now referencing freed memory.
  192. - ensure that when reading a script and an error occurs we don't bother
  193. to show the errored command line after the "DING"
  194. - ensure that after reading a script the prompt isn't duplicated.
  195. - fixed memory leak in clish_pargv_init() where the 'args' parameter wasn't
  196. releasing its working string.
  197. - fixed tinyrl_redisplay so that CTRL-K works; wasn't accounting for
  198. insertion point movements before erasing characters from end of line.
  199. - fixed history.c so that stifled history lists add_n_replace() properly.
  200. This also addresses an assertion which was occuring with "history 1"
  201. - updated clish_shell class so that when an error occurs in a script,
  202. execution is terminated in any parent scripts.
  203. This doesn't terminate an interactive session.
  204. This means that a script will now only run until it's first error
  205. (or the first error of a child script etc...)
  206. - plugged a poential memory leak in lub_string_catn() function.
  207. - fixed clish_shell_delete() so that the file stack is cleared out.
  208. - updated lub/argv class to be more resilient when memory
  209. allocation failures occur.
  210. - reduced the terminal noise generated by tinyrl when
  211. auto-completion occurs.
  212. - reduced the termnal noise generated by tinyrl when user deletes
  213. characters from the end of a line.
  214. - VxWorks has an issue with its pthreads library which means that a
  215. cleanup hook can be called multiple times (recursively)!!!. Updated
  216. the cleanup function to set the pthread cancel state to
  217. PTHREAD_CANCEL_DISABLE to prevent this.
  218. - found and fixed a memory leak in the stack of files being used for input.
  219. - updated auto-completion code to handle quoted arguments.
  220. - fixed echoing issue when echoing should be hidden.
  221. - overhauled the auto-completion code. Now capable of autocompleting
  222. parameters as well as commands. Parameters are now validated as they
  223. are typed. This has involved some restructuring of the
  224. tinyrl_completion interfaces.
  225. - fixed so that validation of integers works correctly.
  226. - removing the spurious auto-completions has had the side effect of not
  227. echoing commands executed from scripts. fixed this issue.
  228. - modified the help system so that if a command has possible other
  229. commands which are an extension of the current command name
  230. (e.g. slot, slotOne, slotTwo) then the command help will be augmented
  231. the summary help of the possile completion commands.
  232. - fixed bug where the SPACE key could cause spurious completion
  233. information to be displayed before entering a space character.
  234. - fixed clish_shell_help.c so that any detailed help held for
  235. "place-holder" commands (e.g. "show slot" has a place holder command
  236. called "show") will be displayed when ?? is entered.
  237. - fixed bug where entering a command which happened to be a prefix
  238. of other commands, caused spurious completion information to be
  239. displayed before executing the command.
  240. - cleaned up the tinyrl.c to remove a spurious tinyrl_crlf() call
  241. when reading a line. If a command outputs no text to stdout/stderr
  242. then the prompt will now reappear on the following
  243. line rather than leave a blank.
  244. - Updated the context sensitive help so that any parmeters which
  245. have specific ranges e.g. "integer" or "selection" indicate
  246. these possible values in the help text.
  247. - Updated the ptype class to allow for pre-processing of parameter
  248. before validation. See the XML schema for details.
  249. - Updated the ptype class to allow three methods for parameter validation.
  250. "regexp"[default], "integer" and "select" See the XML schema for details.
  251. - Went through the code cleaning up PC Lint issues.
  252. - Added a last_buffer field to the tinyrl class to cache the last
  253. displayed line. This can then be used to reduce the number of output
  254. characters when only a single char has been added to the end.
  255. This simplifies the automated testing/interaction with the CLI.
  256. e.g. expect scripts.
  257. - updated tinyrl.c to cache the isatty settings. This provides a
  258. new operation called tinyrl__get_isatty()
  259. - removed nested shell support for a single client. It is no longer
  260. needed as the "clish_source" command is used instead of spawning
  261. another shell.
  262. - changed so that history entries are only added for interactive lines.
  263. So if for example a user were to "clish_source" another file,
  264. the commands so issued from that file will not be added to the history.
  265. - changed "clish_spawn" back to "clish_source" and implemented a stack of
  266. file handles per shell instance. The spawning of a sub-script was
  267. resource intensive, and had issues with spawned pthreads not having
  268. the attributes (e.g. stack size) as the parent thread. It also felt
  269. too clunky to have multiple shell associated with a single client.
  270. - fixed tinyrl_readline() to make sure that lines longer than 80 chars are
  271. handled correctly when read from a script.
  272. - modified tinyrl_replace_line() to only modify the insertion point if
  273. the buffer shrinks beyond the current insertion point. This
  274. addresses the inserting spaces in the middle of a line issue.
  275. - fixed clish_shell_spawn_from_file() so that it returns
  276. BOOL_TRUE upon success.
  277. - fixed tclish executable to read input from files correctly.
  278. - updated tinyrl.c to simply read non-tty input streams rather than
  279. try and treat them like an interactive session.
  280. - fixed tclish executable to account for nested shells being attached
  281. to a single client. (using the "clish_spawn" builtin command.)
  282. Only when the root shell is initialised or finalised will
  283. the resources be allocated and freed.
  284. - renamed the "clish_source" builtin command to "clish_spawn"; it takes
  285. a filename and spawns a new shell to interpret the contents of the file.
  286. - added tinyrl__get_istream() tinyrl__get_ostream(),
  287. tinyrl_vt100__get_istream() and tinyrl_vt100__get_ostream() operations.
  288. This means that a client of CLISH can identify which file handles are
  289. being used. This is useful in the case of a client which is sourcing
  290. files using the "clish_source" builtin command.
  291. - Fixed to ensure that SPACE auto-completion works with commands which
  292. take "args" type parameters.
  293. \section _0_6_3 0.6.3
  294. - Updated tinyrl.c to ensure that SPACE auto-completes multi-word commands.
  295. - Updated tinyrl.c to ensure that the line is redisplayed after a
  296. completion has been performed. This is needed to ensure that when
  297. a line is complete e.g. when pressing ENTER, the completion is
  298. shown before moving on.
  299. - fixed a freed memory usage in clish/shell/shell_tinyrl.c where a
  300. line pointer was obtained before completion was performed, then used.
  301. Needed to re-aquire the line pointer after completion, because it
  302. could have changed.
  303. - fixed a memory corruption in tinyrl/history.c where a spurious NULL
  304. terminator was being added to the vector of history entries
  305. and corrupting the heap.
  306. - Updated command help to show the full multi-word command in the
  307. detailed help. Also shows required parameters &lt;like_this&gt;
  308. \section _0_6_2 0.6.2
  309. - removed any non-interpreter specific setup/restore details from
  310. tclish_init_callback and tclishell_fini_callback and put them into
  311. tclish.cpp
  312. - updated tinyrl_readline() to change the terminal input mode on the fly
  313. to raw mode and then restore it when the line has been entered. This
  314. is needed to ensure that the terminal is in the correct mode for any
  315. sub-shells which are launched. This means that clish_init_callback.c
  316. and clish_fini_callback.c are redundant so have been removed.
  317. - updated clish_shell_spawn interface to take a pthread attibute as
  318. a parameter this makes it possible for a client to control the
  319. thread details.
  320. - Documentation cleanups; added link to sourceforge pages, removed
  321. redundant issues, started a doxygen todo list.
  322. \section _0_6_1 0.6.1
  323. - Fixed a bug where trying to insert text in the middle of a line
  324. caused the remains of the line to be deleted.
  325. - updated the tdemo script to use the normal installation location for TCL
  326. /usr/share/tcl8.4 rather than /usr/local/share/tcl8.4 which is used when
  327. you build it from scratch.
  328. \section _0_6_0 0.6.0
  329. \subsection _0_6_0e 0.6.0e
  330. - Fixed shell_spawn.c so that client initialisation can fail hence cause the
  331. creation of the shell instance to be terminated. This means that client's
  332. may choose to perform user authentication at this point if they so wish.
  333. - Added a cmd_line hook which is called to provide the client details of
  334. each command line accepted by the shell. This enables logging of this
  335. detail if so required.
  336. \subsection _0_6_0d 0.6.0d
  337. - updated the autoconf system to use the TCL version for the tclishX.X name.
  338. - fixed clish/tclish_init_callback.c so that Tcl_FindExecutable() is called.
  339. This is required to setup the TCL environment correctly. 0.6.0c release
  340. didn't load init.tcl correctly and was also crashing when file operations
  341. were performed (e.g. glob, pwd)
  342. - finalized clish.xsd with proper namespace details
  343. \subsection _0_6_0c 0.6.0c
  344. - Fixed autoconf scripts to check for pthreads and TCL library.
  345. - Updated lub_argv class to be able to tell you when a parameter was quoted.
  346. The paramter value itself will not contain the " marks.
  347. - Introduced "args" and "args_help" attributes to the COMMAND element.
  348. This enables the remenant of a command line, after the parameters defined in
  349. the PARAMS elements, to be assigned to a psuedo parameter variable.
  350. - Introduced a "escape_chars" attribute to the COMMAND element. This allows
  351. commands to override the default selection of characters which are escaped
  352. (e.g. \$) when expanded from a variable. Escaping of special characters is a
  353. security feature to prevent the user from executing an underlying shell
  354. command through the use of "clever" parameters. e.g. "fred`rm -rf \*`bloggs"
  355. would be a rather unfortunate parameter on a UNIX system!!!
  356. - Introduced a "builtin" attribute to the ACTION element. Also enabled clients
  357. to register their own built commands when spawning a shell. The XML MUST now
  358. specify a builtin attribute to invoke a builtin command callback.
  359. - entering an empty line simply redisplays the prompt. This enables a user to
  360. create some clear space on the screen.
  361. - Added tinyxml into the distibution; currently the tarball of this
  362. component (available from http://www.grinninglizard.com/tinyxml/index.html)
  363. doesn't support autoconf, so by adding this in (plus a module.am) you get
  364. autoconf support. This library is 'much' smaller than libxml2 and hence is
  365. more appropriate for an embedded system. libxml2 is no longer needed by
  366. clish.
  367. - Added spawn interface to the shell class. This causes a separate thread to
  368. be lauched to handle the shell session. This is required for flat namespace
  369. embedded envrioments where you may need to sustain multiple concurrent
  370. sessions.
  371. - Introduced tinyrl component. This is a simplistic replacement for the
  372. readline library, which cannot be used in embedded-single memory space
  373. systems due to the use of global variables. Tinyrl implements sufficient
  374. functionality for the clish component to function, and no-more although more
  375. may be added in the future. readline is no longer needed to build clish.
  376. - Updated clish component so that "viewid" tag can be used to define view
  377. specific variables. The syntax is of the form "fred=hello world;bert=goodbye"
  378. and causes ${fred} and ${bert} to expand to the assigned values whilst in the
  379. new view.
  380. NB. the values themselves may be based on variables available in the current
  381. context (e.g. environment, parameters or current viewid variables.)
  382. - Updated clish component to use history escape sequences via an external
  383. history_expand function.
  384. tinyrl_history currently supports "!!" "!N" and "!-N" expansion.
  385. - Updated clish component to not use the exit(1) command to terminate the shell
  386. instead a "close" instruction can be given to the shell and it will exit it's
  387. external loop and terminate normally. This is for ease of use in
  388. single-memory-space embedded systems.
  389. - Added a partial string test, which confirmed a bug in the VxWorks standard
  390. headers which was causing lub_string_nocase_cmp() to work incorrectly.
  391. - Updated clish component to support STARTUP XML element. This is used to
  392. display a banner and perform a startup action when a shell is first started.
  393. - Updated clish component to support OVERVIEW XML element. This is used to
  394. display some textual help when the clish_overview internal command is
  395. specified in an ACTION element.
  396. - Updated clish component to support the DETAILS XML element.
  397. These enhance the context sensitive help with the ability to provide more
  398. details for a particular command. (a repeated press of the '?' key displays
  399. this extra detail)
  400. - Introduces more built in commands (can be specified in the ACTION element)
  401. There are now four in total.
  402. "clish_close" - terminates the session.
  403. "clish_overview" - displays the text defined in the OVERVIEW element
  404. of the XML.
  405. "clish_history [n]" - displays the currently held history of command lines.
  406. Also enables the stifling of the history list to a
  407. value specified by the optional parameter 'n'.
  408. A value of zero means unstifled.
  409. "clish_source file" - spawn a separate clish session reading the input from
  410. the specified file. Output still goes to the current
  411. output stream.
  412. - Mapped [space] and [enter] to auto-complete commands if appropriate.
  413. <HR>
  414. \section _0_5_4 0.5.4
  415. This work was done as an employee of 3Com (http://www.3com.com)
  416. Graeme McKerrell
  417. - Initial public release
  418. */
  419. */