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