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