summaryrefslogtreecommitdiffstats
path: root/Modules/readline.c
Commit message (Collapse)AuthorAgeFilesLines
* Patch #568124: Add doc string macros.Martin v. Löwis2002-06-131-73/+59
|
* patch #562492 - prevent duplicate lines in historySkip Montanaro2002-06-111-2/+19
| | | | also call using_history() to properly initialize history variables
* SF #558432: Prevent Annoying ' ' from readline (Holker Krekel).Guido van Rossum2002-05-301-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | readline in all python versions is configured to append a 'space' character for a successful completion. But for almost all python expressions 'space' is not wanted (see coding conventions PEP 8). For example if you have a function 'longfunction' and you type 'longf<TAB>' you get 'longfunction ' as a completion. note the unwanted space at the end. The patch fixes this behaviour by setting readline's append_character to '\0' which means don't append anything. This doesn't work with readline < 2.1 (AFAIK nowadays readline2.2 is in good use). An alternative approach would be to make the append_character accessable from python so that modules like the rlcompleter.py can set it to '\0'. [Ed.: I think expecting readline >= 2.2 is fine. If a completer wants another character they can append that to the keyword in the list.]
* #544265, Remove warnings for passing const to free()Neal Norwitz2002-04-211-1/+1
|
* Get rid of warnings due to changing to METH_NOARGSNeal Norwitz2002-03-311-5/+5
|
* Remove many uses of PyArg_NoArgs macro, change METH_OLDARGS to METH_NOARGS.Neal Norwitz2002-03-251-23/+10
|
* Add get_history_item, get_current_history_length, and redisplay functions.Neil Schemenauer2002-03-241-2/+61
| | | | Clarify the docstring for get_history_length. Closes SF patch 494066.
* OS/2 EMX port changes (Modules part of patch #450267):Andrew MacIntyre2002-03-031-0/+4
| | | | | | | | | | | | | | | Modules/ _hotshot.c dbmmodule.c fcntlmodule.c main.c pwdmodule.c readline.c selectmodule.c signalmodule.c termios.c timemodule.c unicodedata.c
* Simon Budig's patch (posted by me):Michael W. Hudson2002-02-131-0/+3
| | | | [ #513235 ] prevent readline filename completion
* Include <unistd.h> in Python.h. Fixes #500924.Martin v. Löwis2002-01-121-4/+0
|
* sprintf -> PyOS_snprintf in some "obviously safe" cases.Tim Peters2001-11-281-2/+4
| | | | | Also changed <>-style #includes to ""-style in some places where the former didn't make sense.
* Fixes for possible buffer overflows in sprintf() usages.Marc-André Lemburg2001-11-281-2/+2
|
* SF patch #443759: Add Interface to readline's add_historyGuido van Rossum2001-10-191-0/+18
| | | | | | | | | | | | | | This was submitted by Moshe, but apparently he's too busy to check it in himself. He wrote: Here is a function in GNU readline called add_history, which is used to manage the history list. Though Python uses this function internally, it does not expose it to the Python programmer. This patch adds direct interface to this function with documentation. This could be used by friendly modules to "seed" the history with commands.
* Patch #462122: add readline startup and pre_event hooks.Martin v. Löwis2001-09-301-24/+127
|
* Cleaned up the docstring for readline.set_completer().Fred Drake2001-08-011-1/+1
| | | | Thanks to Nathaniel Gray for reporting the confusion.
* SF Patch #432457 by Jason Tishler: support for readline 4.2.Guido van Rossum2001-07-101-0/+4
| | | | | | | This patch allows the readline module to build cleanly with GNU readline 4.2 without breaking the build for earlier GNU readline versions. The configure script checks for the presence of rl_completion_matches in libreadline.
* Clean up the unsightly mess around the readline header files. We nowGuido van Rossum2001-04-131-24/+1
| | | | | | | | | | | | | | | | | | | | | | | always: - #undef HAVE_CONFIG_H (because otherwise chardefs.h tries to include strings.h) - #include readline.h and history.h and we never declare any readline function prototypes ourselves. This makes it compile with readline 4.2, albeit with a few warnings. Some of the remaining warnings are about completion_matches(), which is renamed to rl_completion_matches(). I've tested it with various other versions, from 2.0 up, and they all seem to work (some with warnings) -- but only on Red Hat Linux 6.2. Fixing the warnings for readline 4.2 would break compatibility with 3.0 (and maybe even earlier versions), and readline doesn't seem to have a way to test for its version at compile time, so I'd rather leave the warnings in than break compilation with older versions.
* Part of SF patch #102409 by jlt63 to support building these modulesGuido van Rossum2001-01-101-2/+6
| | | | under CYGWIN as shared libraries (DLLs).
* Supporting rl_library_version is more trouble than it's worth --Guido van Rossum2000-10-021-8/+1
| | | | | | | readline doesn't have it before readline 2.2 and there's no compile-time way to find out which readline version is in use. Sigh. GNU readline sucks.
* Add a definition of rl_library_version. Reported by jpettit@sourceforge.Guido van Rossum2000-09-201-0/+1
|
* Use PyOS_setsig() instead of directly calling signal() or sigaction().Guido van Rossum2000-09-161-5/+12
| | | | | | | This fixes the first half of bug #110611: the immediate exit when ^C is hit when readline and threads are configured. Also added a new module variable, readline.library_version.
* Add three prototypes for functions in history.h to shut up gcc -Wall.Guido van Rossum2000-09-011-0/+3
|
* Peter Schneider-Kamp <nowonder@nowonder.de>:Fred Drake2000-08-311-7/+7
| | | | | | Remove some of GCC's warning in -Wstrict-prototypes mode. This closes SourceForge patch #101342.
* Removed unnecessary local variable -- gave warning on gcc -WallMoshe Zadka2000-08-041-2/+0
|
* Use METH_OLDARGS instead of numeric constant 0 in method def. tablesAndrew M. Kuchling2000-08-031-7/+8
|
* Use METH_VARARGS instead of numeric constant 1 in method def. tablesAndrew M. Kuchling2000-08-031-8/+12
|
* Removed all instances of RETSIGTYPE from the source code: signalTim Peters2000-07-231-5/+2
| | | | | | | handlers "return void", according to ANSI C. Removed the new Py_RETURN_FROM_SIGNAL_HANDLER macro. Left RETSIGTYPE in the config stuff, because it's not clear to me that others aren't relying on it (e.g., extension modules).
* ANSIfication of function-pointers and declarations. Also, make sure toThomas Wouters2000-07-221-2/+5
| | | | | return something if RETSIGTYPE is not void, in functions that are defined as returning RETSIGTYPE.
* Bunch of minor ANSIfications: 'void initfunc()' -> 'void initfunc(void)',Thomas Wouters2000-07-211-2/+2
| | | | | | | | | | | | | | | | | | and a couple of functions that were missed in the previous batches. Not terribly tested, but very carefully scrutinized, three times. All these were found by the little findkrc.py that I posted to python-dev, which means there might be more lurking. Cases such as this: long func(a, b) long a; long b; /* flagword */ { and other cases where the last ; in the argument list isn't followed by a newline and an opening curly bracket. Regexps to catch all are welcome, of course ;)
* added history file truncation based upon code from Johannes Zellner.Skip Montanaro2000-07-191-0/+42
|
* ANSI-ficationPeter Schneider-Kamp2000-07-101-44/+15
|
* Nuke all remaining occurrences of Py_PROTO and Py_FPROTO.Tim Peters2000-07-091-1/+1
|
* added read_history_file and write_history_fileSkip Montanaro2000-07-061-0/+50
| | | | XXX should perhaps support history truncation as well
* Trent Mick: use size_t instead of int where appropriate (call_readline()).Guido van Rossum2000-06-281-1/+1
|
* Vladimir Marangozov's long-awaited malloc restructuring.Guido van Rossum2000-05-031-3/+11
| | | | | | | | | | For more comments, read the patches@python.org archives. For documentation read the comments in mymalloc.h and objimpl.h. (This is not exactly what Vladimir posted to the patches list; I've made a few changes, and Vladimir sent me a fix in private email for a problem that only occurs in debug mode. I'm also holding back on his change to main.c, which seems unnecessary to me.)
* Massive patch by Skip Montanaro to add ":name" to as manyGuido van Rossum2000-02-291-5/+5
| | | | PyArg_ParseTuple() format string arguments as possible.
* Patches by Kannan Vijayan:Guido van Rossum1999-11-181-4/+108
| | | | | | | | | | | | | | | | | | | | | | | | | | | new: readline.get_begidx() -> int gets the beginning index in the command line string delimiting the tab-completion scope. This would probably be used from within a tab-completion handler readline.get_endidx() -> int gets the ending index in the command line string delimiting the tab-completion scope. This would probably be used from within a tab-compeltion handler readline.set_completer_delims(string) -> None sets the delimiters used by readline as word breakpoints for tab-completion readline.get_completer_delims() -> string gets the delimiters used by readline as word breakpoints for tab-completion fixed: readline.get_line_buffer() -> string doesnt cause a debug message every other call
* setup_readline(): Added a comment about memory leak (reported byBarry Warsaw1999-01-291-1/+5
| | | | | | | | | Purify) being caused by a bug in the readline library. Nothing we can do about it. Cause: readline_initialize_everything() throws away the return value from rl_read_init_file(), but that happens to be the last reference to a dynamically allocated char*.
* Patches by William Lewis for Nextstep descendants.Guido van Rossum1999-01-271-0/+1
|
* Add DL_EXPORT() to all modules that could possibly be usedGuido van Rossum1998-12-041-1/+1
| | | | on BeOS or Windows.
* Bernard Herzog pointed out that rl_parse_and_bind modifies itsGuido van Rossum1998-12-041-2/+9
| | | | argument string (bad function!), so we make a temporary copy.
* Changes for BeOS, QNX and long long, by Chris Herborth.Guido van Rossum1998-08-041-0/+9
|
* Correct bug doc string (discovered by Berthold Hoellmann):Guido van Rossum1998-05-201-1/+1
| | | | get_line_buffer() does not take an optional argument.
* Make new gcc -Wall happyGuido van Rossum1998-04-101-0/+8
|
* Add unistd.h for isatty().Guido van Rossum1998-01-191-0/+4
|
* Darn. When thread support is disabled, the BEGIN/END macros don'tGuido van Rossum1997-10-101-0/+3
| | | | | | save and restore the tstate, but explicitly calling PyEval_SaveThread() does reset it! While I think about how to fix this for real, here's a fix that avoids getting a fatal error.
* Add get_line_buffer() and insert_text(), suggested by Michael McLay.Guido van Rossum1997-10-071-0/+40
|
* Set the completer's word break characters appropriate for Python.Guido van Rossum1997-09-261-0/+4
|
* Reordered and reformatted, and added some cool new features:Guido van Rossum1997-09-261-62/+183
| | | | | | | | | | set_completer(function) parse_and_bind(string) read_init_file(filename) The first is the most exciting feature: with an appropriate Python completer function, it can do dynamic completion based on the contents of your namespace!
* Renamed Py_input_hook to PyOS_InputHook.Guido van Rossum1997-08-111-2/+2
| | | | Also cleaned out some CR's left by the VC++ editor.