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