[gforth] / gforth / engine / main.c  

gforth: gforth/engine/main.c

Diff for /gforth/engine/main.c between version 1.12 and 1.13

version 1.12, Tue Dec 8 22:03:06 1998 UTC version 1.13, Sun Dec 13 23:30:02 1998 UTC
Line 69 
Line 69 
 static UCell lsize=0;  static UCell lsize=0;
 int offset_image=0;  int offset_image=0;
 int die_on_signal=0;  int die_on_signal=0;
   #ifndef INCLUDE_IMAGE
 static int clear_dictionary=0;  static int clear_dictionary=0;
 static int debug=0;  
 static size_t pagesize=0;  static size_t pagesize=0;
   #endif
   static int debug=0;
 char *progname;  char *progname;
   
 /* image file format:  /* image file format:
Line 128 
Line 130 
 /*  printf("relocating %x[%x]\n", image, size); */  /*  printf("relocating %x[%x]\n", image, size); */
   
   for(k=0; k<=steps; k++)    for(k=0; k<=steps; k++)
     for(j=0, bits=bitstring[k]; j<8; j++, i++, bits<<=1) {      for(j=0, bits=bitstring[k]; j<RELINFOBITS; j++, i++, bits<<=1) {
       /*      fprintf(stderr,"relocate: image[%d]\n", i);*/        /*      fprintf(stderr,"relocate: image[%d]\n", i);*/
       if(bits & 0x80) {        if(bits & (1U << (RELINFOBITS-1))) {
         /* fprintf(stderr,"relocate: image[%d]=%d\n", i, image[i]);*/          /* fprintf(stderr,"relocate: image[%d]=%d\n", i, image[i]);*/
         if((token=image[i])<0)          if((token=image[i])<0)
           switch(token)            switch(token)
Line 294 
Line 296 
   Cell *rp=(Cell *)(((ImageHeader *)image)->return_stack_base + rsize);    Cell *rp=(Cell *)(((ImageHeader *)image)->return_stack_base + rsize);
   Address lp=((ImageHeader *)image)->locals_stack_base + lsize;    Address lp=((ImageHeader *)image)->locals_stack_base + lsize;
   Xt *ip=(Xt *)(((ImageHeader *)image)->boot_entry);    Xt *ip=(Xt *)(((ImageHeader *)image)->boot_entry);
   #ifdef SYSSIGNALS
   int throw_code;    int throw_code;
   #endif
   
   /* ensure that the cached elements (if any) are accessible */    /* ensure that the cached elements (if any) are accessible */
   IF_TOS(sp--);    IF_TOS(sp--);
Line 307 
Line 311 
   get_winsize();    get_winsize();
 #endif  #endif
   
   #ifdef SYSSIGNALS
   install_signal_handlers(); /* right place? */    install_signal_handlers(); /* right place? */
   
   if ((throw_code=setjmp(throw_jmp_buf))) {    if ((throw_code=setjmp(throw_jmp_buf))) {
Line 319 
Line 324 
     return((int)engine(((ImageHeader *)image)->throw_entry,signal_data_stack+7,      return((int)engine(((ImageHeader *)image)->throw_entry,signal_data_stack+7,
                        signal_return_stack+8,signal_fp_stack,0));                         signal_return_stack+8,signal_fp_stack,0));
   }    }
   #endif
   
   return((int)engine(ip,sp,rp,fp,lp));    return((int)engine(ip,sp,rp,fp,lp));
 }  }
Line 608 
Line 614 
 int main(int argc, char **argv, char **env)  int main(int argc, char **argv, char **env)
 {  {
   char *path = getenv("GFORTHPATH") ? : DEFAULTPATH;    char *path = getenv("GFORTHPATH") ? : DEFAULTPATH;
   #ifndef INCLUDE_IMAGE
   char *imagename="gforth.fi";    char *imagename="gforth.fi";
   FILE *image_file;    FILE *image_file;
 #ifndef INCLUDE_IMAGE  
   Address image;    Address image;
 #endif  #endif
   int retvalue;    int retvalue;
Line 670 
Line 676 
     *p2='\0';      *p2='\0';
     retvalue = go_forth(image, 4, environ);      retvalue = go_forth(image, 4, environ);
     deprep_terminal();      deprep_terminal();
     exit(retvalue);  
   }    }
     return retvalue;
 }  }


Generate output suitable for use with a patch program
Legend:
Removed from v.1.12  
changed lines
  Added in v.1.13

CVS Admin

Powered by ViewCVS 1.0-dev
(Powered by ViewCVS)

ViewCVS and CVS Help