Check-in [ab9723d172]
Not logged in
Overview
SHA1:ab9723d172050c4b16ad2a758fa2eba38f8e236b
Date: 2000-09-20 17:44:34
User: johannes@zellner.org
Comment: * made tclreadline.h installing to ${prefix}/include
Timelines: family | ancestors | descendants | both | trunk
Downloads: Tarball | ZIP archive
Other Links: files | file ages | folders | manifest
Tags And Properties
Context
2000-09-29
18:38
[36440946cb] Fri Sep 29 20:37:27 CEST 2000 (user: johannes@zellner.org, tags: trunk)
2000-09-20
17:44
[ab9723d172] * made tclreadline.h installing to ${prefix}/include (user: johannes@zellner.org, tags: trunk)
2000-08-27
14:14
[e79b9877a8] * added Mark to AUTHORS :) * updated the ChangeLog according to Marks mail * removed an unused i from the obj command in tclreadline.c * increased the patchlevel (user: johannes@zellner.org, tags: trunk)
Changes
Hide Diffs Side-by-Side Diffs Ignore Whitespace Patch

Modified ChangeLog from [16fdf7ccfd] to [9c619311ab].

     1      1   
            2  +2000-09-20  Johannes Zellner <johannes@zellner.org>
            3  +
            4  +    * made tclreadline.h installing to ${prefix}/include
            5  +
     2      6   2000-08-27  Johannes Zellner <johannes@zellner.org>
     3      7   
     4      8       * added Mark to AUTHORS :)
     5      9   
     6     10   2000-08-27  Mark Patton <mpatton@jhu.edu>
     7     11   
     8     12       * converted tclreadline::readline to be an object

Modified Makefile.am from [957707c080] to [69d8b6511b].

     1      1   ## -*- automake -*-
     2      2   ## FILE: "/home/joze/src/tclreadline/Makefile.am"
     3         -## LAST MODIFICATION: "Don, 20 Jul 2000 03:15:27 +0200 (joze)"
            3  +## LAST MODIFICATION: "Mit, 20 Sep 2000 16:25:22 +0200 (joze)"
     4      4   ## (C) 2000 by Johannes Zellner, <johannes@zellner.org>
     5      5   ## $Id$
     6      6   ## ---
     7      7   ## tclreadline -- gnu readline for tcl
     8      8   ## http://www.zellner.org/tclreadline/
     9      9   ## Copyright (c) 1998 - 2000, Johannes Zellner <johannes@zellner.org>
    10     10   ## This software is copyright under the BSD license.
................................................................................
    11     11   ## ---
    12     12   
    13     13   ## AUTOMAKE_OPTIONS = foreign
    14     14   
    15     15   lib_LTLIBRARIES = libtclreadline.la
    16     16   
    17     17   libtclreadline_la_SOURCES = config.h tclreadline.c tclreadline.h
           18  +include_HEADERS = tclreadline.h
           19  +
    18     20   INCLUDES = -I$(TCL_INCLUDE_DIR) -I$(READLINE_INCLUDE_DIR)
    19     21   
    20     22   ## libtclreadline_la_LIBADD = $(LIBS)
    21     23   libtclreadline_la_LDFLAGS = -release $(MAJOR).$(MINOR).$(PATCHLEVEL)
    22     24   
    23     25   tclrldir = @TCLRL_DIR@
    24     26   tclrl_SCRIPTS = pkgIndex.tcl tclreadlineCompleter.tcl tclreadlineInit.tcl tclreadlineSetup.tcl

Modified configure.in from [ed062b1398] to [c53d22f7a0].

     1      1   dnl -*- autoconf -*-
     2      2   dnl FILE: "/home/joze/src/tclreadline/configure.in"
     3         -dnl LAST MODIFICATION: "Son, 27 Aug 2000 16:10:18 +0200 (joze)"
            3  +dnl LAST MODIFICATION: "Mit, 20 Sep 2000 17:25:06 +0200 (joze)"
     4      4   dnl (C) 1998 - 2000 by Johannes Zellner, <johannes@zellner.org>
     5      5   dnl $Id$
     6      6   dnl ---
     7      7   dnl tclreadline -- gnu readline for tcl
     8      8   dnl http://www.zellner.org/tclreadline/
     9      9   dnl Copyright (c) 1998 - 2000, Johannes Zellner <johannes@zellner.org>
    10     10   dnl This software is copyright under the BSD license.
................................................................................
    13     13   AM_CONFIG_HEADER(config.h)
    14     14   AC_PREREQ(2.13)
    15     15   AC_REVISION($Revision$)
    16     16   AC_CONFIG_AUX_DIR(./aux)
    17     17   
    18     18   MAJOR=2
    19     19   MINOR=0
    20         -PATCHLEVEL=3
           20  +PATCHLEVEL=4
    21     21   VERSION=$MAJOR.$MINOR
    22     22   PATCHLEVEL_STR=$VERSION.$PATCHLEVEL
    23     23   
    24     24   AC_SUBST(MAJOR)
    25     25   AC_SUBST(MINOR)
    26     26   AC_SUBST(PATCHLEVEL)
    27     27   AC_SUBST(VERSION)
................................................................................
    92     92   
    93     93   # this is the default anyway:
    94     94   # AC_PREFIX_DEFAULT(/usr/local)
    95     95   
    96     96   if test "${prefix}" = "NONE"; then
    97     97       prefix=$TCL_PREFIX
    98     98   fi
    99         -TCLRL_DIR="${prefix}/lib/tclreadline$VERSION"
           99  +TCLRL_LIBDIR="${prefix}/lib"
          100  +AC_SUBST(TCLRL_LIBDIR)
          101  +TCLRL_DIR="${TCLRL_LIBDIR}/tclreadline$VERSION"
   100    102   AC_SUBST(TCLRL_DIR)
   101    103   
   102    104   # HEADERS
   103    105   AC_HEADER_STDC
   104    106   AC_CHECK_HEADERS(string.h)
   105    107   
   106    108   #--------------------------------------------------------------------

Modified tclreadline.c from [a3df48af95] to [3bf4b4d3d5].

     1      1   
     2      2    /* ==================================================================
     3      3       FILE: "/home/joze/src/tclreadline/tclreadline.c"
     4         -    LAST MODIFICATION: "Son, 27 Aug 2000 16:11:02 +0200 (joze)"
            4  +    LAST MODIFICATION: "Mit, 20 Sep 2000 19:27:47 +0200 (joze)"
     5      5       (C) 1998 - 2000 by Johannes Zellner, <johannes@zellner.org>
     6      6       $Id$
     7      7       ---
     8      8       tclreadline -- gnu readline for tcl
     9      9       http://www.zellner.org/tclreadline/
    10     10       Copyright (c) 1998 - 2000, Johannes Zellner <johannes@zellner.org>
    11     11       This software is copyright under the BSD license.
................................................................................
    41     41    * We need it here to decide, if we should read more
    42     42    * characters from a macro. Dirty, but it should work.
    43     43    */
    44     44   extern char* _rl_executing_macro;
    45     45   #endif
    46     46   
    47     47   #include "tclreadline.h"
           48  +static const char* tclrl_library = TCLRL_LIBRARY;
           49  +static const char* tclrl_version_str = TCLRL_VERSION_STR;
           50  +static const char* tclrl_patchlevel_str = TCLRL_PATCHLEVEL_STR;
    48     51   
    49     52   #define MALLOC(size) Tcl_Alloc((int) size)
    50     53   #define FREE(ptr) if (ptr) { Tcl_Free((char*) ptr); ptr = 0; }
    51     54   
    52     55   enum {
    53     56       _CMD_SET     = (1 << 0),
    54     57       _CMD_GET     = (1 << 1)
................................................................................
    78     81   static int TclReadlineInitialize(Tcl_Interp* interp, char* historyfile);
    79     82   static int blank_line(char* str);
    80     83   static char** TclReadlineCompletion(char* text, int start, int end);
    81     84   static char* TclReadline0generator(char* text, int state);
    82     85   static char* TclReadlineKnownCommands(char* text, int state, int mode);
    83     86   static int TclReadlineParse(char** args, int maxargs, char* buf);
    84     87   
    85         -/* must be non-static */
    86         -int Tclreadline_SafeInit(Tcl_Interp* interp);
    87         -int Tclreadline_Init(Tcl_Interp* interp);
    88         -
    89     88   
    90     89   enum { 
    91     90       LINE_PENDING = -1,
    92     91       LINE_EOF = (1 << 8),
    93     92       LINE_COMPLETE = (1 << 9)
    94     93   };
    95     94   
................................................................................
   567    566   		(char*) &tclrl_history_length, TCL_LINK_INT)))
   568    567   	return status;
   569    568   
   570    569       if (TCL_OK != (status = Tcl_LinkVar(interp, "::tclreadline::library",
   571    570   		(char*) &tclrl_library, TCL_LINK_STRING | TCL_LINK_READ_ONLY)))
   572    571   	return status;
   573    572       if (TCL_OK != (status = Tcl_LinkVar(interp, "::tclreadline::version",
   574         -		(char*) &TCLRL_VERSION, TCL_LINK_STRING | TCL_LINK_READ_ONLY)))
          573  +		(char*) &tclrl_version_str, TCL_LINK_STRING | TCL_LINK_READ_ONLY)))
   575    574   	return status;
   576    575       if (TCL_OK != (status = Tcl_LinkVar(interp, "::tclreadline::patchLevel",
   577         -		(char*) &TCLRL_PATCHLEVEL, TCL_LINK_STRING | TCL_LINK_READ_ONLY)))
          576  +		(char*) &tclrl_patchlevel_str, TCL_LINK_STRING | TCL_LINK_READ_ONLY)))
   578    577   	return status;
   579    578       if (TCL_OK != (status = Tcl_LinkVar(interp, "::tclreadline::license",
   580    579   		(char*) &tclrl_license, TCL_LINK_STRING | TCL_LINK_READ_ONLY)))
   581    580   	return status;
   582    581   
   583    582       if (TCL_OK != (status = Tcl_LinkVar(interp, "tclreadline_library",
   584    583   		(char*) &tclrl_library, TCL_LINK_STRING | TCL_LINK_READ_ONLY)))
   585    584   	return status;
   586    585       if (TCL_OK != (status = Tcl_LinkVar(interp, "tclreadline_version",
   587         -		(char*) &TCLRL_VERSION, TCL_LINK_STRING | TCL_LINK_READ_ONLY)))
          586  +		(char*) &tclrl_version_str, TCL_LINK_STRING | TCL_LINK_READ_ONLY)))
   588    587   	return status;
   589    588       if (TCL_OK != (status = Tcl_LinkVar(interp, "tclreadline_patchLevel",
   590         -		(char*) &TCLRL_PATCHLEVEL, TCL_LINK_STRING | TCL_LINK_READ_ONLY)))
          589  +		(char*) &tclrl_patchlevel_str, TCL_LINK_STRING | TCL_LINK_READ_ONLY)))
   591    590   	return status;
   592    591   
   593         -    return Tcl_PkgProvide(interp, "tclreadline", TCLRL_VERSION);
          592  +    return Tcl_PkgProvide(interp, "tclreadline", (char*)tclrl_version_str);
   594    593   }
   595    594   
   596    595   static int
   597    596   TclReadlineInitialize(Tcl_Interp* interp, char* historyfile)
   598    597   {
   599    598       rl_readline_name = "tclreadline";
   600    599       /*    rl_special_prefixes = "${\"["; */

Modified tclreadline.h.in from [473c3d5ffb] to [e4c160602c].

     1      1   
     2      2    /* ==================================================================
     3      3       FILE: "/home/joze/src/tclreadline/tclreadline.h.in"
     4         -    LAST MODIFICATION: "Sat, 01 Jul 2000 23:46:41 +0200 (joze)"
            4  +    LAST MODIFICATION: "Mit, 20 Sep 2000 17:18:12 +0200 (joze)"
     5      5       (C) 1998 - 2000 by Johannes Zellner, <johannes@zellner.org>
     6      6       $Id$
     7      7       vim:set ft=c:
     8      8       ---
     9      9       tclreadline -- gnu readline for tcl
    10     10       http://www.zellner.org/tclreadline/
    11     11       Copyright (c) 1998 - 2000, Johannes Zellner <johannes@zellner.org>
    12     12       This software is copyright under the BSD license.
    13     13       ================================================================== */  
    14     14   
    15         -static char *TCLRL_VERSION = "@VERSION@";
           15  +#ifndef TCLREADLINE_H_
           16  +#define TCLREADLINE_H_
           17  +
           18  +#include <tcl.h>
           19  +
           20  +#define TCLRL_LIBRARY        "@TCLRL_DIR@"
           21  +
           22  +/* VERSION STRINGS */
           23  +#define TCLRL_VERSION_STR    "@VERSION@"
           24  +#define TCLRL_PATCHLEVEL_STR "@PATCHLEVEL_STR@"
    16     25   
    17         -static char* tclrl_library = "@TCLRL_DIR@";
           26  +/* VERSION NUMBERS */
           27  +#define TCLRL_MAJOR      @MAJOR@
           28  +#define TCLRL_MINOR      @MINOR@
           29  +#define TCLRL_PATCHLEVEL @PATCHLEVEL@
    18     30   
    19         -/*
    20         - * NOTE, that PATCHLEVEL is the complete version string.
    21         - */
    22         -static char *TCLRL_PATCHLEVEL = "@PATCHLEVEL_STR@";
           31  +#ifdef __cplusplus
           32  +extern "C" {
           33  +#endif
           34  +int Tclreadline_Init(Tcl_Interp *interp);
           35  +int Tclreadline_SafeInit(Tcl_Interp *interp);
           36  +#ifdef __cplusplus
           37  +}
           38  +#endif
    23     39   
           40  +#endif /* TCLREADLINE_H_ */

Modified tclreadlineInit.tcl.in from [8b27a39294] to [fce5df23d1].

     1      1   #!/usr/local/bin/tclsh
     2      2   # FILE: "/home/joze/src/tclreadline/tclreadlineInit.tcl.in"
     3         -# LAST MODIFICATION: "Sat, 01 Jul 2000 23:54:15 +0200 (joze)"
            3  +# LAST MODIFICATION: "Mit, 20 Sep 2000 19:29:26 +0200 (joze)"
     4      4   # (C) 1998 - 2000 by Johannes Zellner, <johannes@zellner.org>
     5      5   # $Id$
     6      6   # ---
     7      7   # tclreadline -- gnu readline for tcl
     8      8   # http://www.zellner.org/tclreadline/
     9      9   # Copyright (c) 1998 - 2000, Johannes Zellner <johannes@zellner.org>
    10     10   # This software is copyright under the BSD license.
................................................................................
    14     14   namespace eval tclreadline:: {
    15     15       namespace export Init
    16     16   }
    17     17   
    18     18   proc ::tclreadline::Init {} {
    19     19       uplevel #0 {
    20     20   	if ![info exists tclreadline::library] {
    21         -	    if [catch {load @TCLRL_DIR@/../libtclreadline[info sharedlibextension]} msg] {
           21  +	    if [catch {load [file join @TCLRL_LIBDIR@ libtclreadline[info sharedlibextension]]} msg] {
    22     22   		puts stderr $msg
    23     23   		exit 2
    24     24   	    }
    25     25   	}
    26     26       }
    27     27   }
    28     28