CHANGES 24 KB

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