/* Copyright (c) 1979 Regents of the University of California */ static char sccsid[] = "@(#)yyoptions.c 1.1 08/27/80"; #include "whoami.h" #include "0.h" #include "yy.h" /* * Options processes the option * strings which can appear in * comments and returns the next character. */ options() { register c, ch; register char *optp; int ok; c = readch(); if (c != '$') return (c); do { ch = c = readch(); switch (c) { case 'b': optp = &opt( 'b' ); c = readch(); if (!digit(c)) return (c); *optp = c - '0'; c = readch(); break; # 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; c = readch(); } else if (c == '-') { *optp = 0; c = readch(); } else { return (c); } break; default: return (c); } #ifdef PI0 send(ROSET, ch, *optp); #endif } while (c == ','); if ( opt( 'u' ) ) setuflg(); return (c); }