1*0Sstevel@tonic-gate #pragma ident "%Z%%M% %I% %E% SMI" 2*0Sstevel@tonic-gate 3*0Sstevel@tonic-gate /* 4*0Sstevel@tonic-gate * Copyright 1987, 1988 by MIT Student Information Processing Board 5*0Sstevel@tonic-gate * 6*0Sstevel@tonic-gate * For copyright information, see copyright.h. 7*0Sstevel@tonic-gate */ 8*0Sstevel@tonic-gate #include "copyright.h" 9*0Sstevel@tonic-gate #include <stdio.h> 10*0Sstevel@tonic-gate #include <ss/ss.h> 11*0Sstevel@tonic-gate 12*0Sstevel@tonic-gate struct option { 13*0Sstevel@tonic-gate char *text; 14*0Sstevel@tonic-gate long value; 15*0Sstevel@tonic-gate }; 16*0Sstevel@tonic-gate 17*0Sstevel@tonic-gate static struct option options[] = { 18*0Sstevel@tonic-gate { "dont_list", SS_OPT_DONT_LIST }, 19*0Sstevel@tonic-gate { "^list", SS_OPT_DONT_LIST }, 20*0Sstevel@tonic-gate { "dont_summarize", SS_OPT_DONT_SUMMARIZE }, 21*0Sstevel@tonic-gate { "^summarize", SS_OPT_DONT_SUMMARIZE }, 22*0Sstevel@tonic-gate { (char *)NULL, 0 } 23*0Sstevel@tonic-gate }; 24*0Sstevel@tonic-gate 25*0Sstevel@tonic-gate long 26*0Sstevel@tonic-gate flag_val(string) 27*0Sstevel@tonic-gate register char *string; 28*0Sstevel@tonic-gate { 29*0Sstevel@tonic-gate register struct option *opt; 30*0Sstevel@tonic-gate for (opt = options; opt->text; opt++) 31*0Sstevel@tonic-gate if (!strcmp(opt->text, string)) 32*0Sstevel@tonic-gate return(opt->value); 33*0Sstevel@tonic-gate return(0); 34*0Sstevel@tonic-gate } 35