Overview
Comment: | Apply the Gentoo patchset Gentoo ebuild: dev-tcltk/tclreadline-2.1.0-r4 Fully applied patches: * direct sed patches from the ebuild * tclreadline-2.1.0-gold.patch * tclreadline-2.1.0-rl-executing-macro.patch * tclreadline-2.1.0-rl-history-expand.patch * tclreadline-2.1.0-rl-prompt.patch Partially applied patches: * tclreadline-2.1.0-alloc-free.patch |
---|---|
Downloads: | Tarball | ZIP archive |
Timelines: | family | ancestors | descendants | both | trunk | origin/devel |
Files: | files | file ages | folders |
SHA1: |
f61c58e4243a1769dcabdc8d2a628792 |
User & Date: | quentin@minster.io on 2014-02-19 00:07:34.000 |
Other Links: | branch diff | manifest | tags |
Context
2014-02-26
| ||
00:38 | Harmonize file headers, indent and whitespace in all files check-in: 5f3ab55c4a user: quentin@minster.io tags: trunk, origin/devel | |
2014-02-19
| ||
00:07 | Apply the Gentoo patchset Gentoo ebuild: dev-tcltk/tclreadline-2.1.0-r4 Fully applied patches: * direct sed patches from the ebuild * tclreadline-2.1.0-gold.patch * tclreadline-2.1.0-rl-executing-macro.patch * tclreadline-2.1.0-rl-history-expand.patch * tclreadline-2.1.0-rl-prompt.patch Partially applied patches: * tclreadline-2.1.0-alloc-free.patch check-in: f61c58e424 user: quentin@minster.io tags: trunk, origin/devel | |
2014-02-18
| ||
23:09 | Apply the Debian patchset Debian source package: tcl-tclreadline 2.1.0-12 Fully applied patches: * complete_nontcl.patch * completion_matches.patch * completion_pbug.patch * memuse.patch * tclshpath.patch * varnames.patch Partially applied patches: * manpage.patch * tinfo.patch Dropped patches: * kfreebsd.patch * link.patch * tclrldir.patch check-in: 41d16f099d user: quentin@minster.io tags: trunk, origin/devel | |
Changes
Modified Makefile.am
from [9010d007ac]
to [e10a890a98].
︙ | ︙ | |||
16 17 18 19 20 21 22 23 24 25 26 27 28 29 | libtclreadline_la_SOURCES = config.h tclreadline.c tclreadline.h include_HEADERS = tclreadline.h INCLUDES = -I$(TCL_INCLUDE_DIR) -I$(READLINE_INCLUDE_DIR) ## libtclreadline_la_LIBADD = $(LIBS) libtclreadline_la_LDFLAGS = -release $(MAJOR).$(MINOR).$(PATCHLEVEL) tclrldir = @TCLRL_DIR@ tclrl_SCRIPTS = pkgIndex.tcl tclreadlineCompleter.tcl tclreadlineInit.tcl tclreadlineSetup.tcl INSTALL_SCRIPT = ${INSTALL_DATA} EXTRA_DIST = \ | > | 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | libtclreadline_la_SOURCES = config.h tclreadline.c tclreadline.h include_HEADERS = tclreadline.h INCLUDES = -I$(TCL_INCLUDE_DIR) -I$(READLINE_INCLUDE_DIR) ## libtclreadline_la_LIBADD = $(LIBS) libtclreadline_la_LIBADD = $(TCL_LIB_SPEC) -lreadline libtclreadline_la_LDFLAGS = -release $(MAJOR).$(MINOR).$(PATCHLEVEL) tclrldir = @TCLRL_DIR@ tclrl_SCRIPTS = pkgIndex.tcl tclreadlineCompleter.tcl tclreadlineInit.tcl tclreadlineSetup.tcl INSTALL_SCRIPT = ${INSTALL_DATA} EXTRA_DIST = \ |
︙ | ︙ |
Added configure.ac version [84c8e6ef95].
Deleted configure.in version [72c6a348ad].
Modified tclreadline.c
from [8df3bd02ad]
to [fb738417f9].
︙ | ︙ | |||
37 38 39 40 41 42 43 | #ifdef EXECUTING_MACRO_HACK /** * this prototype is private in readline's file `macro.c'. * We need it here to decide, if we should read more * characters from a macro. Dirty, but it should work. */ | | | 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 | #ifdef EXECUTING_MACRO_HACK /** * this prototype is private in readline's file `macro.c'. * We need it here to decide, if we should read more * characters from a macro. Dirty, but it should work. */ extern char* EXECUTING_MACRO_NAME; #endif #include "tclreadline.h" static const char* tclrl_library = TCLRL_LIBRARY; static const char* tclrl_version_str = TCLRL_VERSION_STR; static const char* tclrl_patchlevel_str = TCLRL_PATCHLEVEL_STR; |
︙ | ︙ | |||
230 231 232 233 234 235 236 | switch (obj_idx) { case TCLRL_READ: rl_callback_handler_install( objc == 3 ? Tcl_GetStringFromObj(objv[2], 0) | | | | | 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 | switch (obj_idx) { case TCLRL_READ: rl_callback_handler_install( objc == 3 ? Tcl_GetStringFromObj(objv[2], 0) : "% ", TclReadlineLineCompleteHandler); Tcl_CreateFileHandler(0, TCL_READABLE, TclReadlineReadHandler, (ClientData) NULL); /** * Main Loop. * XXX each modification of the global variables * which terminates the main loop must call * rl_callback_handler_remove() to leave * readline in a defined state. XXX */ tclrl_state = LINE_PENDING; while (!TclReadlineLineComplete()) { #ifdef EXECUTING_MACRO_NAME /** * check first, if more characters are * available from _rl_executing_macro, * because Tcl_DoOneEvent() will (naturally) * not detect this `event'. */ if (EXECUTING_MACRO_NAME) TclReadlineReadHandler((ClientData) NULL, TCL_READABLE); else #endif Tcl_DoOneEvent(TCL_ALL_EVENTS); } Tcl_DeleteFileHandler(0); |
︙ | ︙ | |||
464 465 466 467 468 469 470 | } static void TclReadlineReadHandler(ClientData clientData, int mask) { if (mask & TCL_READABLE) { | | | | | 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 | } static void TclReadlineReadHandler(ClientData clientData, int mask) { if (mask & TCL_READABLE) { #ifdef EXECUTING_MACRO_NAME do { #endif rl_callback_read_char(); #ifdef EXECUTING_MACRO_NAME /** * check, if we're inside a macro and * if so, read all macro characters * until the next eol. */ } while (EXECUTING_MACRO_NAME && !TclReadlineLineComplete()); #endif } } static void TclReadlineLineCompleteHandler(char* ptr) { |
︙ | ︙ | |||
499 500 501 502 503 504 505 | * The calling script is responsible for handling * empty strings. */ char* expansion = (char*) NULL; int status = history_expand(ptr, &expansion); | | > > > | | < < > > | < | | | > | | | | 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 | * The calling script is responsible for handling * empty strings. */ char* expansion = (char*) NULL; int status = history_expand(ptr, &expansion); if (status >= 2) { /* TODO: make this a valid tcl output */ printf("%s\n", expansion); free(ptr); free(expansion); return; } else if (status <= -1) { Tcl_AppendResult (tclrl_interp, "error in history expansion: ", expansion, "\n", (char*) NULL); TclReadlineTerminate(TCL_ERROR); free(ptr); free(expansion); return; } else { Tcl_AppendResult(tclrl_interp, expansion, (char*) NULL); } #ifdef EXECUTING_MACRO_NAME /** * don't stuff macro lines * into readline's history. */ if(!EXECUTING_MACRO_NAME) { #endif /** * don't stuff empty lines * into readline's history. * don't stuff twice the same * line into readline's history. */ if (expansion && *expansion && (!tclrl_last_line || strcmp(tclrl_last_line, expansion))) { add_history(expansion); } if (tclrl_last_line) free(tclrl_last_line); tclrl_last_line = strdup(expansion); #ifdef EXECUTING_MACRO_NAME } #endif /** * tell the calling routines to terminate. */ TclReadlineTerminate(LINE_COMPLETE); FREE(ptr); |
︙ | ︙ | |||
695 696 697 698 699 700 701 | char* quoted_rl_line_buffer = TclReadlineQuote(rl_line_buffer, "$[]{}\""); sprintf(start_s, "%d", start); sprintf(end_s, "%d", end); Tcl_ResetResult(tclrl_interp); /* clear result space */ state = Tcl_VarEval(tclrl_interp, tclrl_custom_completer, " \"", quoted_text, "\" ", start_s, " ", end_s, " \"", quoted_rl_line_buffer, "\"", (char*) NULL); | < < > > > > > > | 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 | char* quoted_rl_line_buffer = TclReadlineQuote(rl_line_buffer, "$[]{}\""); sprintf(start_s, "%d", start); sprintf(end_s, "%d", end); Tcl_ResetResult(tclrl_interp); /* clear result space */ state = Tcl_VarEval(tclrl_interp, tclrl_custom_completer, " \"", quoted_text, "\" ", start_s, " ", end_s, " \"", quoted_rl_line_buffer, "\"", (char*) NULL); if (TCL_OK != state) { Tcl_AppendResult (tclrl_interp, " `", tclrl_custom_completer, " \"", quoted_text, "\" ", start_s, " ", end_s, " \"", quoted_rl_line_buffer, "\"' failed.", (char*) NULL); TclReadlineTerminate(state); free(quoted_text); free(quoted_rl_line_buffer); return matches; } free(quoted_text); quoted_text = NULL; free(quoted_rl_line_buffer); quoted_rl_line_buffer = NULL; obj = Tcl_GetObjResult(tclrl_interp); status = Tcl_ListObjGetElements(tclrl_interp, obj, &objc, &objv); if (TCL_OK != status) return matches; if (objc) { int i, length; |
︙ | ︙ |