summaryrefslogtreecommitdiffstats
path: root/Misc
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1996-09-12 17:29:33 (GMT)
committerGuido van Rossum <guido@python.org>1996-09-12 17:29:33 (GMT)
commitdc082eba02cd2845eb0c8a9fc27f79bf0847ddf0 (patch)
tree99d855654882811662376a08e8b181440ff454c5 /Misc
parent3f3691e12f1e39d5f8935ca9abf47d242c4952bb (diff)
downloadcpython-dc082eba02cd2845eb0c8a9fc27f79bf0847ddf0.zip
cpython-dc082eba02cd2845eb0c8a9fc27f79bf0847ddf0.tar.gz
cpython-dc082eba02cd2845eb0c8a9fc27f79bf0847ddf0.tar.bz2
Added editline fix
Diffstat (limited to 'Misc')
-rw-r--r--Misc/README1
-rw-r--r--Misc/editline-fix80
2 files changed, 81 insertions, 0 deletions
diff --git a/Misc/README b/Misc/README
index 81c0dca..0ad373b 100644
--- a/Misc/README
+++ b/Misc/README
@@ -25,6 +25,7 @@ NEWS News for this release
README The file you're reading now
RFD Request For Discussion about a Python newsgroup
cheatsheet Quick summary of Python by Ken Manheimer
+editline-fix A news article on how to fix R$'s editline for Python
fixfuncptrs.sh Shell script to fix function pointer initializers
gMakefile Generic Makefile for dynamically loadable modules
indent.pro GNU indent profile approximating my C style
diff --git a/Misc/editline-fix b/Misc/editline-fix
new file mode 100644
index 0000000..713b1a4
--- /dev/null
+++ b/Misc/editline-fix
@@ -0,0 +1,80 @@
+Subject: Problems trying to use readline or editline ...
+From: Skip Montanaro <skip@dolphin.automatrix.com>
+To: python-list@cwi.nl
+Date: 19 Nov 1995 14:19:56 GMT
+X-Newsgroups: comp.lang.python
+X-Organization: Automatrix, Inc.
+
+
+I'm having some trouble with either of the line editing libraries available
+to me. If I build Python with libreadline, I get "staircases" in my
+interpreter output:
+
+ >>> s = 1
+ >>> a = 3
+ >>> etc.
+
+So I figured I'd give Rich Salz's editline a try. It seems to be missing a
+couple readline functions. When I link I get:
+
+ myreadline.o: Undefined symbol _rl_insert referenced from text segment
+ myreadline.o: Undefined symbol _rl_bind_key referenced from text segment
+
+I'm running on BSD/OS 2.0 with GCC 2.6.3 as the compiler. My configure line
+was
+
+ ./configure --with-readline=/home/dolphin/skip/src/editline \
+ --with-dl-dld=/home/dolphin/skip/src/dl-dld,/home/dolphin/skip/src/dld
+
+For editline I tried several things before arriving at something that does
+work ... sort of. First I commented out the tab key binding in Python's
+Parser/myreadline.c then had to fiddle with editline.c to get tabs to
+insert. The diffs below seem to work, but have no notion of tab stops (I
+like 4-char tab stops).
+
+I'd be grateful if anybody had a solution to the readline staircases or a
+better solution for making editline work.
+
+*** editline.c~ Tue Nov 15 08:53:01 1994
+--- editline.c Sun Nov 19 09:15:16 1995
+***************
+*** 142,145 ****
+--- 142,148 ----
+ TTYput('?');
+ }
++ else if (c == '\t') {
++ TTYput('\t');
++ }
+ else if (ISCTL(c)) {
+ TTYput('^');
+***************
+*** 1326,1329 ****
+--- 1329,1338 ----
+ }
+
++ STATIC STATUS
++ tab()
++ {
++ return insert_char('\t');
++ }
++
+ STATIC KEYMAP Map[33] = {
+ { CTL('@'), ring_bell },
+***************
+*** 1335,1339 ****
+ { CTL('G'), ring_bell },
+ { CTL('H'), bk_del_char },
+! { CTL('I'), c_complete },
+ { CTL('J'), accept_line },
+ { CTL('K'), kill_line },
+--- 1344,1348 ----
+ { CTL('G'), ring_bell },
+ { CTL('H'), bk_del_char },
+! { CTL('I'), tab },
+ { CTL('J'), accept_line },
+ { CTL('K'), kill_line },
+--
+Skip Montanaro skip@automatrix.com (518)372-5583
+Musi-Cal: http://www.calendar.com/concerts/ or mailto:concerts@calendar.com
+Internet Conference Calendar: http://www.calendar.com/conferences/
+ >>> ZLDF: http://www.netresponse.com/zldf <<<