Improve compatibility with vm1 and C-based lua.
This commit is contained in:
@@ -126,7 +126,7 @@ public class lua {
|
||||
break;
|
||||
} else if ( "-".equals( args[i] ) ) {
|
||||
setGlobalArg( _G, args, i );
|
||||
processScript( System.in, "stdin" );
|
||||
processScript( System.in, "=stdin" );
|
||||
break;
|
||||
} else {
|
||||
switch ( args[i].charAt(1) ) {
|
||||
@@ -202,7 +202,7 @@ public class lua {
|
||||
String line = reader.readLine();
|
||||
if ( line == null )
|
||||
return;
|
||||
processScript( new ByteArrayInputStream(line.getBytes()), "stdin" );
|
||||
processScript( new ByteArrayInputStream(line.getBytes()), "=stdin" );
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -134,7 +134,7 @@ public class luac {
|
||||
String chunkname = args[i].substring(0,args[i].length()-4);
|
||||
processScript( new FileInputStream(args[i]), chunkname, fos );
|
||||
} else if ( args[i].length() <= 1 ) {
|
||||
processScript( System.in, "stdin", fos );
|
||||
processScript( System.in, "=stdin", fos );
|
||||
} else {
|
||||
switch ( args[i].charAt(1) ) {
|
||||
case 'o':
|
||||
|
||||
Reference in New Issue
Block a user