[gforth] / gforth / Attic / main.c  

gforth: gforth/Attic/main.c

Diff for /gforth/Attic/main.c between version 1.54 and 1.55

version 1.54, Tue Mar 4 17:49:52 1997 UTC version 1.55, Tue Mar 11 16:00:40 1997 UTC
Line 118 
Line 118 
 /*  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<8; j++, i++, bits<<=1) {
       if(bits & 0x80)        /*      fprintf(stderr,"relocate: image[%d]\n", i);*/
         if(bits & 0x80) {
           /* fprintf(stderr,"relocate: image[%d]=%d\n", i, image[i]);*/
         if(image[i]<0)          if(image[i]<0)
           switch(image[i])            switch(image[i])
             {              {
Line 144 
Line 146 
         else          else
           image[i]+=(Cell)image;            image[i]+=(Cell)image;
 }  }
       }
   }
   
 UCell checksum(Label symbols[])  UCell checksum(Label symbols[])
 {  {
Line 180 
Line 184 
     fprintf(stderr,"try mmap($%lx, $%lx, ..., MAP_ANON, ...); ", (long)next_address, (long)size);      fprintf(stderr,"try mmap($%lx, $%lx, ..., MAP_ANON, ...); ", (long)next_address, (long)size);
   r=mmap(next_address, size, PROT_EXEC|PROT_READ|PROT_WRITE, MAP_ANON|MAP_PRIVATE, -1, 0);    r=mmap(next_address, size, PROT_EXEC|PROT_READ|PROT_WRITE, MAP_ANON|MAP_PRIVATE, -1, 0);
 #else /* !defined(MAP_ANON) */  #else /* !defined(MAP_ANON) */
     /* Ultrix (at least does not define MAP_FILE and MAP_PRIVATE (both are
        apparently defaults*/
   #ifndef MAP_FILE
   # define MAP_FILE 0
   #endif
   #ifndef MAP_PRIVATE
   # define MAP_PRIVATE 0
   #endif
   static int dev_zero=-1;    static int dev_zero=-1;
   
   if (dev_zero == -1)    if (dev_zero == -1)
Line 442 
Line 454 
       {"help", no_argument, NULL, 'h'},        {"help", no_argument, NULL, 'h'},
       /* put something != 0 into offset_image */        /* put something != 0 into offset_image */
       {"offset-image", no_argument, &offset_image, 1},        {"offset-image", no_argument, &offset_image, 1},
         {"no-offset-im", no_argument, &offset_image, 0},
       {"clear-dictionary", no_argument, &clear_dictionary, 1},        {"clear-dictionary", no_argument, &clear_dictionary, 1},
       {"debug", no_argument, &debug, 1},        {"debug", no_argument, &debug, 1},
       {0,0,0,0}        {0,0,0,0}


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

CVS Admin

Powered by ViewCVS 1.0-dev
(Powered by ViewCVS)

ViewCVS and CVS Help