Diff for /gforth/engine/main.c between versions 1.177 and 1.178

version 1.177, 2007/03/31 21:43:18 version 1.178, 2007/04/09 22:36:01
Line 633  void set_stack_sizes(ImageHeader * heade Line 633  void set_stack_sizes(ImageHeader * heade
   fsize=maxaligned(fsize);    fsize=maxaligned(fsize);
 }  }
   
   #ifdef STANDALONE
   void alloc_stacks(ImageHeader * h)
   {
   #define SSTACKSIZE 0x200
     static Cell dstack[SSTACKSIZE+1];
     static Cell rstack[SSTACKSIZE+1];
   
     h->dict_size=dictsize;
     h->data_stack_size=dsize;
     h->fp_stack_size=fsize;
     h->return_stack_size=rsize;
     h->locals_stack_size=lsize;
   
     h->data_stack_base=dstack+SSTACKSIZE;
     //  h->fp_stack_base=gforth_alloc(fsize);
     h->return_stack_base=rstack+SSTACKSIZE;
     //  h->locals_stack_base=gforth_alloc(lsize);
   }
   #else
 void alloc_stacks(ImageHeader * h)  void alloc_stacks(ImageHeader * h)
 {  {
   h->dict_size=dictsize;    h->dict_size=dictsize;
Line 667  void alloc_stacks(ImageHeader * h) Line 686  void alloc_stacks(ImageHeader * h)
   h->return_stack_base=gforth_alloc(rsize);    h->return_stack_base=gforth_alloc(rsize);
   h->locals_stack_base=gforth_alloc(lsize);    h->locals_stack_base=gforth_alloc(lsize);
 }  }
   #endif
   
 #warning You can ignore the warnings about clobbered variables in gforth_go  #warning You can ignore the warnings about clobbered variables in gforth_go
 int gforth_go(Address image, int stack, Cell *entries)  int gforth_go(Address image, int stack, Cell *entries)
Line 1824  Address gforth_loader(FILE *imagefile, c Line 1844  Address gforth_loader(FILE *imagefile, c
   image = dict_alloc_read(imagefile, preamblesize+header.image_size,    image = dict_alloc_read(imagefile, preamblesize+header.image_size,
                           preamblesize+dictsize, data_offset);                            preamblesize+dictsize, data_offset);
   imp=image+preamblesize;    imp=image+preamblesize;
   
   alloc_stacks((ImageHeader *)imp);    alloc_stacks((ImageHeader *)imp);
   if (clear_dictionary)    if (clear_dictionary)
     memset(imp+header.image_size, 0, dictsize-header.image_size);      memset(imp+header.image_size, 0, dictsize-header.image_size);
Line 1927  static FILE * open_image_file(char * ima Line 1948  static FILE * open_image_file(char * ima
 }  }
 #endif  #endif
   
 #ifdef STANDALONE  #ifdef STANDALONE_ALLOC
 Address gforth_alloc(Cell size)  Address gforth_alloc(Cell size)
 {  {
   Address r;    Address r;
Line 2252  int main(int argc, char **argv, char **e Line 2273  int main(int argc, char **argv, char **e
         *p2 = *p1;          *p2 = *p1;
     *p2='\0';      *p2='\0';
     retvalue = gforth_go(image, 4, environ);      retvalue = gforth_go(image, 4, environ);
 #ifdef SIGPIPE  #if defined(SIGPIPE) && !defined(STANDALONE)
     bsd_signal(SIGPIPE, SIG_IGN);      bsd_signal(SIGPIPE, SIG_IGN);
 #endif  #endif
 #ifdef VM_PROFILING  #ifdef VM_PROFILING

Removed from v.1.177  
changed lines
  Added in v.1.178


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>