more use of native flag

This commit is contained in:
Doug MacEachern 2005-05-10 00:14:39 +00:00
parent 9b626f890c
commit 442c90c506
1 changed files with 6 additions and 2 deletions

View File

@ -76,8 +76,10 @@ public class Getline {
public void initHistoryFile(File file) public void initHistoryFile(File file)
throws IOException { throws IOException {
if (useNative) {
histinit(file.getCanonicalPath()); histinit(file.getCanonicalPath());
} }
}
public void addToHistory(String line) { public void addToHistory(String line) {
if ((line == null) || if ((line == null) ||
@ -85,6 +87,8 @@ public class Getline {
{ {
return; return;
} }
if (useNative) {
histadd(line); histadd(line);
} }
}
} }