diff --git b/readline/.classpath a/readline/.classpath new file mode 100644 index 0000000..18d70f0 --- /dev/null +++ a/readline/.classpath @@ -0,0 +1,6 @@ + + + + + + diff --git b/readline/.project a/readline/.project new file mode 100644 index 0000000..5d31856 --- /dev/null +++ a/readline/.project @@ -0,0 +1,17 @@ + + + readline + + + + + + org.eclipse.jdt.core.javabuilder + + + + + + org.eclipse.jdt.core.javanature + + diff --git b/readline/.settings/org.eclipse.jdt.core.prefs a/readline/.settings/org.eclipse.jdt.core.prefs new file mode 100644 index 0000000..8000cd6 --- /dev/null +++ a/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 b/readline/bin/pad/prac1/EditableBufferedReader.class a/readline/bin/pad/prac1/EditableBufferedReader.class new file mode 100644 index 0000000..688a694 --- /dev/null +++ a/readline/bin/pad/prac1/EditableBufferedReader.class diff --git b/readline/bin/pad/prac1/MainClass.class a/readline/bin/pad/prac1/MainClass.class new file mode 100644 index 0000000..b38d6f4 --- /dev/null +++ a/readline/bin/pad/prac1/MainClass.class diff --git b/readline/src/pad/prac1/EditableBufferedReader.java a/readline/src/pad/prac1/EditableBufferedReader.java new file mode 100644 index 0000000..cbe521f --- /dev/null +++ a/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