Changeset 560


Ignore:
Timestamp:
Apr 30, 2011, 12:24:53 AM (6 years ago)
Author:
sam
Message:

lisp: remove arguments to lisp_init(), they are no longer useful now
that we can dynamically resize everything.

Location:
abuse/trunk/src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • abuse/trunk/src/game.cpp

    r555 r560  
    23092309        if(!strcmp(argv[i], "-lisp"))
    23102310        {
    2311             lisp_init(0xf000, 0x30000);
     2311            lisp_init();
    23122312            char const *eof_char = "Ctrl-D";
    23132313            fprintf(stderr,
     
    24902490
    24912491        game_net_init(argc, argv);
    2492         lisp_init(0x8000, 0x94000);
     2492        lisp_init();
    24932493
    24942494        dev_init(argc, argv);
  • abuse/trunk/src/lisp/lisp.cpp

    r559 r560  
    31503150
    31513151void l_comp_init();
    3152 void lisp_init(long perm_size, long tmp_size)
    3153 {
    3154   unsigned int i;
    3155   LSymbol::root = NULL;
    3156   total_user_functions = 0;
    3157 
    3158   free_space[0] = space[0] = (uint8_t *)malloc(perm_size);
    3159   space_size[0] = perm_size;
    3160 
    3161   free_space[1] = space[1] = (uint8_t *)malloc(tmp_size);
    3162   space_size[1] = tmp_size;
    3163 
    3164 
    3165   current_space=PERM_SPACE;
    3166 
    3167 
    3168   l_comp_init();
    3169   for(i = 0; i < sizeof(sys_funcs) / sizeof(*sys_funcs); i++)
    3170     add_sys_function(sys_funcs[i].name,
    3171                      sys_funcs[i].min_args, sys_funcs[i].max_args, i);
    3172   clisp_init();
    3173   current_space=TMP_SPACE;
    3174   dprintf("Lisp : %d symbols defined, %d system functions, %d pre-compiled functions\n",
    3175       LSymbol::count, sizeof(sys_funcs) / sizeof(*sys_funcs), total_user_functions);
     3152
     3153void lisp_init()
     3154{
     3155    LSymbol::root = NULL;
     3156    total_user_functions = 0;
     3157
     3158    free_space[0] = space[0] = (uint8_t *)malloc(0x1000);
     3159    space_size[0] = 0x1000;
     3160
     3161    free_space[1] = space[1] = (uint8_t *)malloc(0x1000);
     3162    space_size[1] = 0x1000;
     3163
     3164    current_space = PERM_SPACE;
     3165
     3166    l_comp_init();
     3167    for(size_t i = 0; i < sizeof(sys_funcs) / sizeof(*sys_funcs); i++)
     3168        add_sys_function(sys_funcs[i].name,
     3169                         sys_funcs[i].min_args, sys_funcs[i].max_args, i);
     3170    clisp_init();
     3171    current_space = TMP_SPACE;
     3172    dprintf("Lisp: %d symbols defined, %d system functions, "
     3173            "%d pre-compiled functions\n", LSymbol::count,
     3174            sizeof(sys_funcs) / sizeof(*sys_funcs), total_user_functions);
    31763175}
    31773176
  • abuse/trunk/src/lisp/lisp.h

    r555 r560  
    240240int end_of_program(char *s);
    241241void clear_tmp();
    242 void lisp_init(long perm_size, long tmp_size);
     242void lisp_init();
    243243void lisp_uninit();
    244244
Note: See TracChangeset for help on using the changeset viewer.