main.java 1.2 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071
  1. class main extends c2jrt
  2. {
  3. private static String class_name = "main";
  4. static Class pcmain[]=
  5. {
  6. java.lang.Integer.TYPE,java.lang.Integer.TYPE
  7. }
  8. ;
  9. public static int cmain;
  10. static
  11. {
  12. try
  13. {
  14. cmain=getMethod(Class.forName(class_name),"cmain",pcmain);
  15. }catch(Exception ex){
  16. ex.printStackTrace();
  17. }
  18. }
  19. static int strmain2= jtocstr("The Java version of sfg.c version %d is running\n");
  20. /* file main.c line 6*/
  21. public static int cmain(int cargc,int cargv)
  22. {
  23. nextlevel();
  24. if(true)
  25. {
  26. int label= 0;
  27. int retval= 0;
  28. {
  29. startargs(
  30. /* file main.c line 7*/
  31. sfg.csfg_version());
  32. /* file main.c line 7*/
  33. cprintf(strmain2,endargs());
  34. retval= 0;
  35. if(true)
  36. {
  37. prevlevel();
  38. return retval;
  39. };
  40. }
  41. };
  42. prevlevel();
  43. return 0;
  44. }
  45. public static void main(String[] args)
  46. throws Exception
  47. {
  48. int argc=args.length;
  49. int argv;
  50. nextlevel();
  51. argv = makeargv(new Object(), args, argc);
  52. c_c2jstartup ();
  53. {
  54. cmain(argc+1,argv);
  55. }
  56. c_c2jexit();
  57. prevlevel();
  58. }
  59. }