From f77c94da20190b8fce0e8f6db468058d8c8d9155 Mon Sep 17 00:00:00 2001 From: Imanol-Mikel Barba Sabariego Date: Fri, 13 Sep 2013 18:05:30 +0000 Subject: [PATCH] initial commit --- readline/.classpath | 6 ++++++ readline/.project | 17 +++++++++++++++++ readline/.settings/org.eclipse.jdt.core.prefs | 11 +++++++++++ readline/bin/pad/prac1/EditableBufferedReader.class | Bin 0 -> 2287 bytes readline/bin/pad/prac1/MainClass.class | Bin 0 -> 1124 bytes readline/src/pad/prac1/EditableBufferedReader.java | 81 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ readline/src/pad/prac1/MainClass.java | 16 ++++++++++++++++ 7 files changed, 131 insertions(+), 0 deletions(-) create mode 100644 readline/.classpath create mode 100644 readline/.project create mode 100644 readline/.settings/org.eclipse.jdt.core.prefs create mode 100644 readline/bin/pad/prac1/EditableBufferedReader.class create mode 100644 readline/bin/pad/prac1/MainClass.class create mode 100644 readline/src/pad/prac1/EditableBufferedReader.java create mode 100644 readline/src/pad/prac1/MainClass.java diff --git a/readline/.classpath b/readline/.classpath new file mode 100644 index 0000000..18d70f0 --- /dev/null +++ b/readline/.classpath @@ -0,0 +1,6 @@ + + + + + + diff --git a/readline/.project b/readline/.project new file mode 100644 index 0000000..5d31856 --- /dev/null +++ b/readline/.project @@ -0,0 +1,17 @@ + + + readline + + + + + + org.eclipse.jdt.core.javabuilder + + + + + + org.eclipse.jdt.core.javanature + + diff --git a/readline/.settings/org.eclipse.jdt.core.prefs b/readline/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000..8000cd6 --- /dev/null +++ b/readline/.settings/org.eclipse.jdt.core.prefs @@ -0,0 +1,11 @@ +eclipse.preferences.version=1 +org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6 +org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve +org.eclipse.jdt.core.compiler.compliance=1.6 +org.eclipse.jdt.core.compiler.debug.lineNumber=generate +org.eclipse.jdt.core.compiler.debug.localVariable=generate +org.eclipse.jdt.core.compiler.debug.sourceFile=generate +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error +org.eclipse.jdt.core.compiler.source=1.6 diff --git a/readline/bin/pad/prac1/EditableBufferedReader.class b/readline/bin/pad/prac1/EditableBufferedReader.class new file mode 100644 index 0000000..688a694 Binary files /dev/null and b/readline/bin/pad/prac1/EditableBufferedReader.class differ diff --git a/readline/bin/pad/prac1/MainClass.class b/readline/bin/pad/prac1/MainClass.class new file mode 100644 index 0000000..b38d6f4 Binary files /dev/null and b/readline/bin/pad/prac1/MainClass.class differ diff --git a/readline/src/pad/prac1/EditableBufferedReader.java b/readline/src/pad/prac1/EditableBufferedReader.java new file mode 100644 index 0000000..cbe521f --- /dev/null +++ b/readline/src/pad/prac1/EditableBufferedReader.java @@ -0,0 +1,81 @@ +package pad.prac1; +import java.io.*; + + +public class EditableBufferedReader extends BufferedReader +{ + private String line = ""; + private boolean returnKey = false; + + public EditableBufferedReader(Reader in) + { + super(in); + } + + public EditableBufferedReader(Reader in, int sz) + { + super(in,sz); + } + + private void setRaw() throws IOException, InterruptedException + { + String[] cmd = {"/bin/sh", "-c", "stty raw -echo