Diff
Not logged in

Differences From Artifact [ebe0deb081]:

To Artifact [1f128a2ff8]:


1
2
3
4
5

6
7
8
9
10
11
12
1
2
3
4

5
6
7
8
9
10
11
12




-
+








 /* ==================================================================

    FILE: "/home/joze/src/tclreadline/tclreadline.c"
    LAST MODIFICATION: "Sun Aug 22 21:26:05 1999 (joze)"
    LAST MODIFICATION: "Tue Aug 24 03:11:24 1999 (joze)"
    (C) 1998, 1999 by Johannes Zellner, <johannes@zellner.org>
    $Id$
    ---

    tclreadline -- gnu readline for tcl
    Copyright (C) 1999  Johannes Zellner

321
322
323
324
325
326
327
328
329

330
331
332
333
334


335
336




337
338
339
340
341
342
343
321
322
323
324
325
326
327

328
329
330

331
332

333
334
335

336
337
338
339
340
341
342
343
344
345
346







-

+

-


-
+
+

-
+
+
+
+







    tclrl_interp = interp;
    return Tcl_PkgProvide(interp, "tclreadline", TCLREADLINE_VERSION);
}

char*
TclReadlineInitialize(char* historyfile)
{

    rl_readline_name = "tclreadline";
    /* rl_special_prefixes = "${\""; */
    rl_special_prefixes = "${";
    using_history();
    /**
     * default is " \t\n\"\\'`@$><=;|&{("
     * removed "{(.
     * removed "{("
     * added "[]}"
     */
    rl_basic_word_break_characters = " \t\n\"\\'`@$><=;|&";
    rl_basic_word_break_characters = " \t\n\"\\'`@$><=;|&[]}";
    /* rl_completer_quote_characters = "\""; */

    using_history();
    if (!tclrl_eof_string)
        tclrl_eof_string = strdup("puts {}; exit");

    /*
     * try to read historyfile in home
     * directory. If this failes, this
     * is *not* an error.
379
380
381
382
383
384
385


386
387
388
389
390
391
392
393
394
395
396
397
382
383
384
385
386
387
388
389
390
391
392
393


394
395
396
397
398
399
400







+
+



-
-







        int objc;
        char* quoted_text = TclReadlineQuote(text, "$[]{}\"");
        char* quoted_rl_line_buffer
            = TclReadlineQuote(rl_line_buffer, "$[]{}\"");
        /*
        fprintf (stderr, "(TclReadlineCompletion) rl_line_buffer = |%s|\n",
            rl_line_buffer);
        fprintf (stderr, "(TclReadlineCompletion) quoted_rl_line_buffer = |%s|\n",
            quoted_rl_line_buffer);
        fprintf (stderr, "(TclReadlineCompletion) text = |%s|\n", text);
        fprintf (stderr, "(TclReadlineCompletion) quoted_text = |%s|\n",
            quoted_text);
        fprintf (stderr, "(TclReadlineCompletion) quoted_rl_line_buffer = |%s|\n",
            quoted_rl_line_buffer);
        */
        sprintf(start_s, "%d", start);
        sprintf(end_s, "%d", end);
        Tcl_ResetResult(tclrl_interp); /* clear result space */
        tclrl_state = Tcl_VarEval(tclrl_interp, tclrl_custom_completer,
            " \"", quoted_text, "\" ", start_s, " ", end_s,
            " \"", quoted_rl_line_buffer, "\"", (char*) NULL);