The pseudo-file '-', referring to standard input, is now accepted as a

command-line argument.
This commit is contained in:
dchandler 2003-06-22 21:05:16 +00:00
parent 900f7492b0
commit afe73c2228

View file

@ -126,12 +126,16 @@ public class TibetanConverter {
+ ThdlVersion.getTimeOfCompilation()); + ThdlVersion.getTimeOfCompilation());
return 77; return 77;
} }
String tmwRtfPath = args[args.length - 1]; String inputRtfPath = args[args.length - 1];
DuffPane dp = new DuffPane(); DuffPane dp = new DuffPane();
// Read in the rtf file. // Read in the rtf file.
{ {
InputStream in = new FileInputStream(tmwRtfPath); InputStream in;
if (inputRtfPath.equals("-"))
in = System.in;
else
in = new FileInputStream(inputRtfPath);
try { try {
dp.rtfEd.read(in, dp.getDocument(), 0); dp.rtfEd.read(in, dp.getDocument(), 0);
} catch (Exception e) { } catch (Exception e) {