summaryrefslogtreecommitdiffstats
path: root/src/util/ss/options.c
blob: c3452f9e18782c0b1ce3534361940d7d9b94d1db (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
/* -*- mode: c; c-basic-offset: 4; indent-tabs-mode: nil -*- */
/*
 * Copyright 1987, 1988 by MIT Student Information Processing Board
 *
 * For copyright information, see copyright.h.
 */
#include "copyright.h"
#include <stdio.h>
#include "ss.h"

struct option {
    char *text;
    long value;
};

static struct option options[] = {
    { "dont_list", SS_OPT_DONT_LIST },
    { "^list", SS_OPT_DONT_LIST },
    { "dont_summarize", SS_OPT_DONT_SUMMARIZE },
    { "^summarize", SS_OPT_DONT_SUMMARIZE },
    { (char *)NULL, 0 }
};

long
flag_val(string)
    register char *string;
{
    register struct option *opt;
    for (opt = options; opt->text; opt++)
        if (!strcmp(opt->text, string))
            return(opt->value);
    return(0);
}