Annotation of 43BSDReno/pgrm/lisp/franz/tahoe/fixmask.c, revision 1.1

1.1     ! root        1: /*
        !             2: ** file: fixmask.c
        !             3: ** new & improved version by P. S. Housel 04/27/86
        !             4: **
        !             5: ** note: "changing register save masks" involves making sure r6 and r7
        !             6: **      are saved for use as "np" and "lbot"
        !             7: */
        !             8: 
        !             9: /*
        !            10:  *     fixmask.c
        !            11:  * complete program to change register save masks on the CCI "tahoe"
        !            12:  *
        !            13:  * (c) copyright 1982, Regents of the University of California
        !            14:  */
        !            15: 
        !            16: #include <stdio.h>
        !            17: 
        !            18: char mybuf[BUFSIZ];
        !            19: int mask;
        !            20: 
        !            21: main()
        !            22: {
        !            23:  register savesize = 0;
        !            24:  char *cp;
        !            25: 
        !            26:  while(fgets(mybuf,BUFSIZ,stdin) != NULL)
        !            27:       {
        !            28:        if(*mybuf=='#')
        !            29:          if(strcmpn(mybuf,"#protect", 8)==0)
        !            30:            {
        !            31:             savesize = 1;
        !            32:            }
        !            33: 
        !            34:        if(savesize && strcmpn(mybuf,"  .set    L",7)==0)
        !            35:          {
        !            36:          for(cp=mybuf;*cp++!=',';) ;
        !            37:          sscanf(cp, "0x%x", &mask);
        !            38:          sprintf(cp,"0x%X\n", mask | 0x0C0);
        !            39:          savesize = 0;
        !            40:         }
        !            41: 
        !            42:        fputs(mybuf,stdout);
        !            43:       }
        !            44: }

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.