Posted to tcl by mjanssen at Fri Oct 30 17:40:46 GMT 2009view raw

  1. Author: unknown <MJanssen@.(none)> 2009-10-30 18:38:07
  2. Committer: unknown <MJanssen@.(none)> 2009-10-30 18:38:07
  3. Parent: 0262ce298d0b3ed0f8c72327f1915977cef31771 (Cleanup non-writable test directory on Windows.)
  4. Child: 0000000000000000000000000000000000000000 (Local uncommitted changes, not checked in to index)
  5. Branch: master
  6. Follows: core-8-6-b1
  7. Precedes:
  8.  
  9. Changes for auto-expand of leading word
  10.  
  11. ---------------------------- tcl/generic/tclParse.c ----------------------------
  12. index b06b106..02b126f 100644
  13. @@ -266,6 +266,8 @@ Tcl_ParseCommand(
  14. const char *termPtr; /* Set by Tcl_ParseBraces/QuotedString to
  15. * point to char after terminating one. */
  16. int scanned;
  17. + int expandWord;
  18. + int firstWord;
  19.  
  20. if ((start == NULL) && (numBytes != 0)) {
  21. if (interp != NULL) {
  22. @@ -307,8 +309,14 @@ Tcl_ParseCommand(
  23. */
  24.  
  25. parsePtr->commandStart = src;
  26. + firstWord = 1;
  27. while (1) {
  28. - int expandWord = 0;
  29. + if (firstWord) {
  30. + expandWord = 1;
  31. + firstWord = 0;
  32. + } else {
  33. + expandWord = 0;
  34. + }
  35.  
  36. /*
  37. * Create the token for the word.
  38.  
  39. ---------------------------- tcl/library/clock.tcl ----------------------------
  40. index 7411fd6..b80710a 100644
  41. @@ -685,6 +685,7 @@ proc ::tcl::clock::format { args } {
  42. # which contains the name resolution.
  43.  
  44. set procName formatproc'$format'$locale
  45. + puts $procName
  46. set procName [namespace current]::[string map {: {\:} \\ {\\}} $procName]
  47. if {[info exists FormatProc($procName)]} {
  48. set procName $FormatProc($procName)
  49. @@ -693,7 +694,7 @@ proc ::tcl::clock::format { args } {
  50. [ParseClockFormatFormat $procName $format $locale]
  51. }
  52.  
  53. - return [$procName $clockval $timezone]
  54. + return [[list $procName] $clockval $timezone]
  55. }
  56.  
  57. #----------------------------------------------------------------------