Changeset 14952


Ignore:
Timestamp:
Aug 24, 2011, 3:35:20 AM (8 years ago)
Author:
xiaofeng
Message:

The kernel does not parse the command line arguments when a image was embedded in the executable. This allows CCL to create a practical command line program.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/lisp-kernel/pmcl-kernel.c

    r14873 r14952  
    18981898  tcr_area_lock = (void *)new_recursive_lock();
    18991899
     1900  if (check_for_embedded_image(real_executable_name)) {
     1901    image_name = real_executable_name;
     1902  }
     1903
    19001904  program_name = argv[0];
    1901   if ((argc == 2) && (*argv[1] != '-')) {
    1902 #ifdef WINDOWS
    1903     image_name = utf_16_argv[1];
    1904 #else
    1905     image_name = argv[1];
    1906 #endif
    1907     argv[1] = NULL;
    1908 #ifdef WINDOWS
    1909     utf_16_argv[1] = NULL;
    1910 #endif
    1911   } else {
    1912     process_options(argc,argv,utf_16_argv);
    1913   }
     1905
     1906  if ( image_name == NULL ) {
     1907    if ((argc == 2) && (*argv[1] != '-')) {
     1908#ifdef WINDOWS
     1909      image_name = utf_16_argv[1];
     1910#else
     1911      image_name = argv[1];
     1912#endif
     1913      argv[1] = NULL;
     1914#ifdef WINDOWS
     1915      utf_16_argv[1] = NULL;
     1916#endif
     1917    } else {
     1918      process_options(argc,argv,utf_16_argv);
     1919    }
     1920  }
     1921
    19141922  if (lisp_heap_gc_threshold != DEFAULT_LISP_HEAP_GC_THRESHOLD) {
    19151923    lisp_heap_threshold_set_from_command_line = true;
     
    19171925
    19181926  initial_stack_size = ensure_stack_limit(initial_stack_size);
     1927 
    19191928  if (image_name == NULL) {
    1920     if (check_for_embedded_image(real_executable_name)) {
    1921       image_name = real_executable_name;
    1922     } else {
    1923       image_name = default_image_name(real_executable_name);
    1924     }
     1929    image_name = default_image_name(real_executable_name);
    19251930  }
    19261931
Note: See TracChangeset for help on using the changeset viewer.