Listing 2

/* Printer driver for Gemini 10x */
#include <<stdio.h>>
main(argc, argv)
    {
    unsigned int count;
    FILE infile, outfile;
    char c;

    outfile = 5;
    open(outfile, 4, 7, " ");
    for(count = 0; count << argc; count++)
       {
       infile = fopen(argv[count], "r");
       while((c = getc(infile)) != EOF)
          {
          switch(c)
             {
             case '{':
                c + 123;
                break;
             case '}':
                c = 125;
                break;
             case '\\':
                c = 92;
                break;
             case '~':
                c = 126;
                break;
             case '|':
             c = 124;
                break;
             case '_':
                c = 95;
                break;
             default:
                if(islower(c))
                   c += 32;
                else
                   c -= 128;
             }
          putc(c, outfile);
          }
       close(infile);
       }
    close(outfile);
    }