comparison src/luan/tools/CmdLine.java @ 39:e5bcb1eeafc1

change naming convention git-svn-id: https://luan-java.googlecode.com/svn/trunk@40 21e917c8-12df-6dd8-5cb6-c86387c605b9
author fschmidt@gmail.com <fschmidt@gmail.com@21e917c8-12df-6dd8-5cb6-c86387c605b9>
date Thu, 20 Dec 2012 02:54:06 +0000
parents 30fcb4fb0f76
children e3624b7cd603
comparison
equal deleted inserted replaced
38:30fcb4fb0f76 39:e5bcb1eeafc1
45 System.err.println("command line error: "+e.getMessage()); 45 System.err.println("command line error: "+e.getMessage());
46 System.exit(-1); 46 System.exit(-1);
47 } 47 }
48 } else if( arg.equals("-") ) { 48 } else if( arg.equals("-") ) {
49 try { 49 try {
50 BasicLib.dofile(lua,null); 50 BasicLib.do_file(lua,null);
51 } catch(LuaException e) { 51 } catch(LuaException e) {
52 System.err.println(e.getMessage()); 52 System.err.println(e.getMessage());
53 System.exit(-1); 53 System.exit(-1);
54 } 54 }
55 System.exit(0); 55 System.exit(0);
69 for( int j=0; j<args.length; j++ ) { 69 for( int j=0; j<args.length; j++ ) {
70 argsTable.put( new LuaNumber(j), args[j] ); 70 argsTable.put( new LuaNumber(j), args[j] );
71 } 71 }
72 lua.global().put("arg",argsTable); 72 lua.global().put("arg",argsTable);
73 try { 73 try {
74 LuaFunction fn = BasicLib.loadfile(lua,file); 74 LuaFunction fn = BasicLib.load_file(lua,file);
75 fn.call(lua,varArgs); 75 fn.call(lua,varArgs);
76 } catch(LuaException e) { 76 } catch(LuaException e) {
77 // System.err.println(e.getMessage()); 77 // System.err.println(e.getMessage());
78 e.printStackTrace(); 78 e.printStackTrace();
79 System.exit(-1); 79 System.exit(-1);