Check-in [ab9723d172]
Not logged in
Overview
Comment: * made tclreadline.h installing to ${prefix}/include
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA1: ab9723d172050c4b16ad2a758fa2eba38f8e236b
User & Date: johannes@zellner.org on 2000-09-20 17:44:34
Other Links: manifest | tags
Context
2000-09-29
18:38
Fri Sep 29 20:37:27 CEST 2000 check-in: 36440946cb user: johannes@zellner.org tags: trunk
2000-09-20
17:44
* made tclreadline.h installing to ${prefix}/include check-in: ab9723d172 user: johannes@zellner.org tags: trunk
2000-08-27
14:14
* 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 check-in: e79b9877a8 user: johannes@zellner.org tags: trunk
Changes

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

1




2
3
4
5
6
7
8





2000-08-27  Johannes Zellner <johannes@zellner.org>

    * added Mark to AUTHORS :)

2000-08-27  Mark Patton <mpatton@jhu.edu>

    * converted tclreadline::readline to be an object

>
>
>
>







1
2
3
4
5
6
7
8
9
10
11
12

2000-09-20  Johannes Zellner <johannes@zellner.org>

    * made tclreadline.h installing to ${prefix}/include

2000-08-27  Johannes Zellner <johannes@zellner.org>

    * added Mark to AUTHORS :)

2000-08-27  Mark Patton <mpatton@jhu.edu>

    * converted tclreadline::readline to be an object

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

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17


18
19
20
21
22
23
24
## -*- automake -*-
## FILE: "/home/joze/src/tclreadline/Makefile.am"
## LAST MODIFICATION: "Don, 20 Jul 2000 03:15:27 +0200 (joze)"
## (C) 2000 by Johannes Zellner, <johannes@zellner.org>
## $Id$
## ---
## tclreadline -- gnu readline for tcl
## http://www.zellner.org/tclreadline/
## Copyright (c) 1998 - 2000, Johannes Zellner <johannes@zellner.org>
## This software is copyright under the BSD license.
## ---

## AUTOMAKE_OPTIONS = foreign

lib_LTLIBRARIES = libtclreadline.la

libtclreadline_la_SOURCES = config.h tclreadline.c 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


|














>
>







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
## -*- automake -*-
## FILE: "/home/joze/src/tclreadline/Makefile.am"
## LAST MODIFICATION: "Mit, 20 Sep 2000 16:25:22 +0200 (joze)"
## (C) 2000 by Johannes Zellner, <johannes@zellner.org>
## $Id$
## ---
## tclreadline -- gnu readline for tcl
## http://www.zellner.org/tclreadline/
## Copyright (c) 1998 - 2000, Johannes Zellner <johannes@zellner.org>
## This software is copyright under the BSD license.
## ---

## AUTOMAKE_OPTIONS = foreign

lib_LTLIBRARIES = libtclreadline.la

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

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

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
dnl -*- autoconf -*-
dnl FILE: "/home/joze/src/tclreadline/configure.in"
dnl LAST MODIFICATION: "Son, 27 Aug 2000 16:10:18 +0200 (joze)"
dnl (C) 1998 - 2000 by Johannes Zellner, <johannes@zellner.org>
dnl $Id$
dnl ---
dnl tclreadline -- gnu readline for tcl
dnl http://www.zellner.org/tclreadline/
dnl Copyright (c) 1998 - 2000, Johannes Zellner <johannes@zellner.org>
dnl This software is copyright under the BSD license.

AC_INIT(tclreadline.c)
AM_CONFIG_HEADER(config.h)
AC_PREREQ(2.13)
AC_REVISION($Revision$)
AC_CONFIG_AUX_DIR(./aux)

MAJOR=2
MINOR=0
PATCHLEVEL=3
VERSION=$MAJOR.$MINOR
PATCHLEVEL_STR=$VERSION.$PATCHLEVEL

AC_SUBST(MAJOR)
AC_SUBST(MINOR)
AC_SUBST(PATCHLEVEL)
AC_SUBST(VERSION)


|
















|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
dnl -*- autoconf -*-
dnl FILE: "/home/joze/src/tclreadline/configure.in"
dnl LAST MODIFICATION: "Mit, 20 Sep 2000 17:25:06 +0200 (joze)"
dnl (C) 1998 - 2000 by Johannes Zellner, <johannes@zellner.org>
dnl $Id$
dnl ---
dnl tclreadline -- gnu readline for tcl
dnl http://www.zellner.org/tclreadline/
dnl Copyright (c) 1998 - 2000, Johannes Zellner <johannes@zellner.org>
dnl This software is copyright under the BSD license.

AC_INIT(tclreadline.c)
AM_CONFIG_HEADER(config.h)
AC_PREREQ(2.13)
AC_REVISION($Revision$)
AC_CONFIG_AUX_DIR(./aux)

MAJOR=2
MINOR=0
PATCHLEVEL=4
VERSION=$MAJOR.$MINOR
PATCHLEVEL_STR=$VERSION.$PATCHLEVEL

AC_SUBST(MAJOR)
AC_SUBST(MINOR)
AC_SUBST(PATCHLEVEL)
AC_SUBST(VERSION)
92
93
94
95
96
97
98
99


100
101
102
103
104
105
106

# this is the default anyway:
# AC_PREFIX_DEFAULT(/usr/local)

if test "${prefix}" = "NONE"; then
    prefix=$TCL_PREFIX
fi
TCLRL_DIR="${prefix}/lib/tclreadline$VERSION"


AC_SUBST(TCLRL_DIR)

# HEADERS
AC_HEADER_STDC
AC_CHECK_HEADERS(string.h)

#--------------------------------------------------------------------







|
>
>







92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108

# this is the default anyway:
# AC_PREFIX_DEFAULT(/usr/local)

if test "${prefix}" = "NONE"; then
    prefix=$TCL_PREFIX
fi
TCLRL_LIBDIR="${prefix}/lib"
AC_SUBST(TCLRL_LIBDIR)
TCLRL_DIR="${TCLRL_LIBDIR}/tclreadline$VERSION"
AC_SUBST(TCLRL_DIR)

# HEADERS
AC_HEADER_STDC
AC_CHECK_HEADERS(string.h)

#--------------------------------------------------------------------

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

1
2
3
4
5
6
7
8
9
10
11

 /* ==================================================================
    FILE: "/home/joze/src/tclreadline/tclreadline.c"
    LAST MODIFICATION: "Son, 27 Aug 2000 16:11:02 +0200 (joze)"
    (C) 1998 - 2000 by Johannes Zellner, <johannes@zellner.org>
    $Id$
    ---
    tclreadline -- gnu readline for tcl
    http://www.zellner.org/tclreadline/
    Copyright (c) 1998 - 2000, Johannes Zellner <johannes@zellner.org>
    This software is copyright under the BSD license.



|







1
2
3
4
5
6
7
8
9
10
11

 /* ==================================================================
    FILE: "/home/joze/src/tclreadline/tclreadline.c"
    LAST MODIFICATION: "Mit, 20 Sep 2000 19:27:47 +0200 (joze)"
    (C) 1998 - 2000 by Johannes Zellner, <johannes@zellner.org>
    $Id$
    ---
    tclreadline -- gnu readline for tcl
    http://www.zellner.org/tclreadline/
    Copyright (c) 1998 - 2000, Johannes Zellner <johannes@zellner.org>
    This software is copyright under the BSD license.
41
42
43
44
45
46
47



48
49
50
51
52
53
54
 * We need it here to decide, if we should read more
 * characters from a macro. Dirty, but it should work.
 */
extern char* _rl_executing_macro;
#endif

#include "tclreadline.h"




#define MALLOC(size) Tcl_Alloc((int) size)
#define FREE(ptr) if (ptr) { Tcl_Free((char*) ptr); ptr = 0; }

enum {
    _CMD_SET     = (1 << 0),
    _CMD_GET     = (1 << 1)







>
>
>







41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
 * We need it here to decide, if we should read more
 * characters from a macro. Dirty, but it should work.
 */
extern char* _rl_executing_macro;
#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;

#define MALLOC(size) Tcl_Alloc((int) size)
#define FREE(ptr) if (ptr) { Tcl_Free((char*) ptr); ptr = 0; }

enum {
    _CMD_SET     = (1 << 0),
    _CMD_GET     = (1 << 1)
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
static int TclReadlineInitialize(Tcl_Interp* interp, char* historyfile);
static int blank_line(char* str);
static char** TclReadlineCompletion(char* text, int start, int end);
static char* TclReadline0generator(char* text, int state);
static char* TclReadlineKnownCommands(char* text, int state, int mode);
static int TclReadlineParse(char** args, int maxargs, char* buf);

/* must be non-static */
int Tclreadline_SafeInit(Tcl_Interp* interp);
int Tclreadline_Init(Tcl_Interp* interp);


enum { 
    LINE_PENDING = -1,
    LINE_EOF = (1 << 8),
    LINE_COMPLETE = (1 << 9)
};








<
<
<
<







81
82
83
84
85
86
87




88
89
90
91
92
93
94
static int TclReadlineInitialize(Tcl_Interp* interp, char* historyfile);
static int blank_line(char* str);
static char** TclReadlineCompletion(char* text, int start, int end);
static char* TclReadline0generator(char* text, int state);
static char* TclReadlineKnownCommands(char* text, int state, int mode);
static int TclReadlineParse(char** args, int maxargs, char* buf);






enum { 
    LINE_PENDING = -1,
    LINE_EOF = (1 << 8),
    LINE_COMPLETE = (1 << 9)
};

567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
		(char*) &tclrl_history_length, TCL_LINK_INT)))
	return status;

    if (TCL_OK != (status = Tcl_LinkVar(interp, "::tclreadline::library",
		(char*) &tclrl_library, TCL_LINK_STRING | TCL_LINK_READ_ONLY)))
	return status;
    if (TCL_OK != (status = Tcl_LinkVar(interp, "::tclreadline::version",
		(char*) &TCLRL_VERSION, TCL_LINK_STRING | TCL_LINK_READ_ONLY)))
	return status;
    if (TCL_OK != (status = Tcl_LinkVar(interp, "::tclreadline::patchLevel",
		(char*) &TCLRL_PATCHLEVEL, TCL_LINK_STRING | TCL_LINK_READ_ONLY)))
	return status;
    if (TCL_OK != (status = Tcl_LinkVar(interp, "::tclreadline::license",
		(char*) &tclrl_license, TCL_LINK_STRING | TCL_LINK_READ_ONLY)))
	return status;

    if (TCL_OK != (status = Tcl_LinkVar(interp, "tclreadline_library",
		(char*) &tclrl_library, TCL_LINK_STRING | TCL_LINK_READ_ONLY)))
	return status;
    if (TCL_OK != (status = Tcl_LinkVar(interp, "tclreadline_version",
		(char*) &TCLRL_VERSION, TCL_LINK_STRING | TCL_LINK_READ_ONLY)))
	return status;
    if (TCL_OK != (status = Tcl_LinkVar(interp, "tclreadline_patchLevel",
		(char*) &TCLRL_PATCHLEVEL, TCL_LINK_STRING | TCL_LINK_READ_ONLY)))
	return status;

    return Tcl_PkgProvide(interp, "tclreadline", TCLRL_VERSION);
}

static int
TclReadlineInitialize(Tcl_Interp* interp, char* historyfile)
{
    rl_readline_name = "tclreadline";
    /*    rl_special_prefixes = "${\"["; */







|


|









|


|


|







566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
		(char*) &tclrl_history_length, TCL_LINK_INT)))
	return status;

    if (TCL_OK != (status = Tcl_LinkVar(interp, "::tclreadline::library",
		(char*) &tclrl_library, TCL_LINK_STRING | TCL_LINK_READ_ONLY)))
	return status;
    if (TCL_OK != (status = Tcl_LinkVar(interp, "::tclreadline::version",
		(char*) &tclrl_version_str, TCL_LINK_STRING | TCL_LINK_READ_ONLY)))
	return status;
    if (TCL_OK != (status = Tcl_LinkVar(interp, "::tclreadline::patchLevel",
		(char*) &tclrl_patchlevel_str, TCL_LINK_STRING | TCL_LINK_READ_ONLY)))
	return status;
    if (TCL_OK != (status = Tcl_LinkVar(interp, "::tclreadline::license",
		(char*) &tclrl_license, TCL_LINK_STRING | TCL_LINK_READ_ONLY)))
	return status;

    if (TCL_OK != (status = Tcl_LinkVar(interp, "tclreadline_library",
		(char*) &tclrl_library, TCL_LINK_STRING | TCL_LINK_READ_ONLY)))
	return status;
    if (TCL_OK != (status = Tcl_LinkVar(interp, "tclreadline_version",
		(char*) &tclrl_version_str, TCL_LINK_STRING | TCL_LINK_READ_ONLY)))
	return status;
    if (TCL_OK != (status = Tcl_LinkVar(interp, "tclreadline_patchLevel",
		(char*) &tclrl_patchlevel_str, TCL_LINK_STRING | TCL_LINK_READ_ONLY)))
	return status;

    return Tcl_PkgProvide(interp, "tclreadline", (char*)tclrl_version_str);
}

static int
TclReadlineInitialize(Tcl_Interp* interp, char* historyfile)
{
    rl_readline_name = "tclreadline";
    /*    rl_special_prefixes = "${\"["; */

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

1
2
3
4
5
6
7
8
9
10
11
12
13
14


15

16
17
18
19

20
21



22
23











 /* ==================================================================
    FILE: "/home/joze/src/tclreadline/tclreadline.h.in"
    LAST MODIFICATION: "Sat, 01 Jul 2000 23:46:41 +0200 (joze)"
    (C) 1998 - 2000 by Johannes Zellner, <johannes@zellner.org>
    $Id$
    vim:set ft=c:
    ---
    tclreadline -- gnu readline for tcl
    http://www.zellner.org/tclreadline/
    Copyright (c) 1998 - 2000, Johannes Zellner <johannes@zellner.org>
    This software is copyright under the BSD license.
    ================================================================== */  



static char *TCLRL_VERSION = "@VERSION@";


static char* tclrl_library = "@TCLRL_DIR@";

/*

 * NOTE, that PATCHLEVEL is the complete version string.
 */



static char *TCLRL_PATCHLEVEL = "@PATCHLEVEL_STR@";














|










>
>
|
>

|

|
>
|
|
>
>
>
|

>
>
>
>
>
>
>
>
>
>
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40

 /* ==================================================================
    FILE: "/home/joze/src/tclreadline/tclreadline.h.in"
    LAST MODIFICATION: "Mit, 20 Sep 2000 17:18:12 +0200 (joze)"
    (C) 1998 - 2000 by Johannes Zellner, <johannes@zellner.org>
    $Id$
    vim:set ft=c:
    ---
    tclreadline -- gnu readline for tcl
    http://www.zellner.org/tclreadline/
    Copyright (c) 1998 - 2000, Johannes Zellner <johannes@zellner.org>
    This software is copyright under the BSD license.
    ================================================================== */  

#ifndef TCLREADLINE_H_
#define TCLREADLINE_H_

#include <tcl.h>

#define TCLRL_LIBRARY        "@TCLRL_DIR@"

/* VERSION STRINGS */
#define TCLRL_VERSION_STR    "@VERSION@"
#define TCLRL_PATCHLEVEL_STR "@PATCHLEVEL_STR@"

/* VERSION NUMBERS */
#define TCLRL_MAJOR      @MAJOR@
#define TCLRL_MINOR      @MINOR@
#define TCLRL_PATCHLEVEL @PATCHLEVEL@

#ifdef __cplusplus
extern "C" {
#endif
int Tclreadline_Init(Tcl_Interp *interp);
int Tclreadline_SafeInit(Tcl_Interp *interp);
#ifdef __cplusplus
}
#endif

#endif /* TCLREADLINE_H_ */

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

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/usr/local/bin/tclsh
# FILE: "/home/joze/src/tclreadline/tclreadlineInit.tcl.in"
# LAST MODIFICATION: "Sat, 01 Jul 2000 23:54:15 +0200 (joze)"
# (C) 1998 - 2000 by Johannes Zellner, <johannes@zellner.org>
# $Id$
# ---
# tclreadline -- gnu readline for tcl
# http://www.zellner.org/tclreadline/
# Copyright (c) 1998 - 2000, Johannes Zellner <johannes@zellner.org>
# This software is copyright under the BSD license.

package provide tclreadline @VERSION@

namespace eval tclreadline:: {
    namespace export Init
}

proc ::tclreadline::Init {} {
    uplevel #0 {
	if ![info exists tclreadline::library] {
	    if [catch {load @TCLRL_DIR@/../libtclreadline[info sharedlibextension]} msg] {
		puts stderr $msg
		exit 2
	    }
	}
    }
}



|

















|







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/usr/local/bin/tclsh
# FILE: "/home/joze/src/tclreadline/tclreadlineInit.tcl.in"
# LAST MODIFICATION: "Mit, 20 Sep 2000 19:29:26 +0200 (joze)"
# (C) 1998 - 2000 by Johannes Zellner, <johannes@zellner.org>
# $Id$
# ---
# tclreadline -- gnu readline for tcl
# http://www.zellner.org/tclreadline/
# Copyright (c) 1998 - 2000, Johannes Zellner <johannes@zellner.org>
# This software is copyright under the BSD license.

package provide tclreadline @VERSION@

namespace eval tclreadline:: {
    namespace export Init
}

proc ::tclreadline::Init {} {
    uplevel #0 {
	if ![info exists tclreadline::library] {
	    if [catch {load [file join @TCLRL_LIBDIR@ libtclreadline[info sharedlibextension]]} msg] {
		puts stderr $msg
		exit 2
	    }
	}
    }
}