/* Copyright (c) 1979 Regents of the University of California */
-#
-/*
- * pi - Pascal interpreter code translator
- *
- * Charles Haley, Bill Joy UCB
- * Version 1.1 February 1978
- */
-#include "whoami"
+static char sccsid[] = "@(#)yyoptions.c 1.1 8/27/80";
+
+#include "whoami.h"
#include "0.h"
#include "yy.h"
ch = c = readch();
switch (c) {
case 'b':
- optp = &opts['b'-'a'];
- goto optdig;
- case 'x':
- optp = &opts['x'-'a'];
- goto optdig;
- optdig:
+ optp = &opt( 'b' );
c = readch();
if (!digit(c))
return (c);
*optp = c - '0';
c = readch();
break;
- default:
- if (c < 'a' || c > 'z')
- return (c);
- optp = &opts[c-'a'];
+# ifdef PC
+ case 'C':
+ /*
+ * C is a replacement for t, fake it.
+ */
+ c = 't';
+ /* and fall through */
+ case 'g':
+# endif PC
+ case 'k':
+ case 'l':
+ case 'n':
+ case 'p':
+ case 's':
+ case 't':
+ case 'u':
+ case 'w':
+ case 'z':
+ optp = &opt( c );
c = readch();
if (c == '+') {
*optp = 1;
} else if (c == '-') {
*optp = 0;
c = readch();
- } else
+ } else {
return (c);
+ }
break;
+ default:
+ return (c);
}
#ifdef PI0
send(ROSET, ch, *optp);
#endif
} while (c == ',');
- if (opts['u'-'a'])
+ if ( opt( 'u' ) )
setuflg();
return (c);
}