1
0

CHANGES 24 KB

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