diff options
author | Alejandro Pulver <alepulver@FreeBSD.org> | 2008-02-16 21:03:49 +0000 |
---|---|---|
committer | Alejandro Pulver <alepulver@FreeBSD.org> | 2008-02-16 21:03:49 +0000 |
commit | bb6b92bd341196348bc272f8918e803a0b4fb3e9 (patch) | |
tree | 20fb28edc61135a40ab7117cc9a440c2669b5ea6 /devel/libreadline-java/files/patch-src-org-gnu-readline-Readline.java | |
parent | Exception::Class::TryCatch - Syntactic try/catch sugar for use with (diff) |
Java-Readline is a port of GNU Readline for Java. Or, to be more
precise, it is a JNI-wrapper to Readline. It is distributed under the
LGPL.
You must call Readline.load(ReadlineLibrary lib); before using any
other methods. If you omit the call to the load()-method, the pure
Java fallback solution is used. Possible values for lib are:
ReadlineLibrary.PureJava
ReadlineLibrary.GnuReadline
ReadlineLibrary.Editline
ReadlineLibrary.Getline
Note that all programs using GnuReadline will fall under the GPL,
since Gnu-Readline is GPL software!
WWW: http://sourceforge.net/projects/java-readline/
PR: ports/116817
Submitted by: Martin Kammerhofer <mkamm at gmx.net>
Notes
Notes:
svn path=/head/; revision=207384
Diffstat (limited to 'devel/libreadline-java/files/patch-src-org-gnu-readline-Readline.java')
-rw-r--r-- | devel/libreadline-java/files/patch-src-org-gnu-readline-Readline.java | 52 |
1 files changed, 52 insertions, 0 deletions
diff --git a/devel/libreadline-java/files/patch-src-org-gnu-readline-Readline.java b/devel/libreadline-java/files/patch-src-org-gnu-readline-Readline.java new file mode 100644 index 000000000000..601aa2a65a2f --- /dev/null +++ b/devel/libreadline-java/files/patch-src-org-gnu-readline-Readline.java @@ -0,0 +1,52 @@ +--- src/org/gnu/readline/Readline.java.orig 2003-01-07 11:14:35.000000000 +0100 ++++ src/org/gnu/readline/Readline.java 2007-09-27 08:52:01.000000000 +0200 +@@ -568,6 +568,31 @@ + ///////////////////////////////////////////////////////////////////////////// + + /** ++ Query and set the completion append character. You might need ++ this in a {@link ReadlineCompleter} implementation. The argument ++ appendCharacter should be in the ASCII range. ++ ++ <p>Supporting implementations: ++ <ul> ++ <li>GNU-Readline</li> ++ <li>Editline</li> ++ </ul> ++ </p> ++ ++ */ ++ ++ public static char setCompletionAppendCharacter(char appendCharacter) { ++ if (iLib == ReadlineLibrary.GnuReadline || iLib == ReadlineLibrary.Editline) ++ return setCompletionAppendCharacterImpl(appendCharacter); ++ else if (iThrowException) ++ throw new UnsupportedOperationException(); ++ else ++ return '\uFFFF'; ++ } ++ ++ ///////////////////////////////////////////////////////////////////////////// ++ ++ /** + Query the current line buffer. This returns the current content of + the internal line buffer. You might need this in a + {@link ReadlineCompleter} implementation to access the full text +@@ -838,4 +863,17 @@ + private native static void + setWordBreakCharactersImpl(String wordBreakCharacters) + throws UnsupportedEncodingException; ++ ++ ///////////////////////////////////////////////////////////////////////////// ++ ++ /** ++ Native implementation of setCompletionAppendCharacter() ++ ++ @see ++ org.gnu.readline.Readline#setCompletionAppendCharacter(char appendCharacter) ++ */ ++ ++ private native static char ++ setCompletionAppendCharacterImpl(char appendCharacter); ++ + } |