Add GNU LGPL headers to all .c .C and .h files
[oweals/cde.git] / cde / programs / dthelp / parser.ccdf / htag / parser / optstrg.c
1 /*
2  * CDE - Common Desktop Environment
3  *
4  * Copyright (c) 1993-2012, The Open Group. All rights reserved.
5  *
6  * These libraries and programs are free software; you can
7  * redistribute them and/or modify them under the terms of the GNU
8  * Lesser General Public License as published by the Free Software
9  * Foundation; either version 2 of the License, or (at your option)
10  * any later version.
11  *
12  * These libraries and programs are distributed in the hope that
13  * they will be useful, but WITHOUT ANY WARRANTY; without even the
14  * implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR
15  * PURPOSE. See the GNU Lesser General Public License for more
16  * details.
17  *
18  * You should have received a copy of the GNU Lesser General Public
19  * License along with these librararies and programs; if not, write
20  * to the Free Software Foundation, Inc., 51 Franklin Street, Fifth
21  * Floor, Boston, MA 02110-1301 USA
22  */
23 /* $XConsortium: optstrg.c /main/3 1995/11/08 11:26:29 rswiston $ */
24 /*
25 Copyright 1988, 1989 Hewlett-Packard Co.
26 */
27
28 #include <stdio.h>
29 #include <string.h>
30 #include "basic.h"
31 #include "trie.h"
32 #include "dtdext.h"
33 #include "parser.h"
34
35 /* Get program options from a string */
36 void m_optstring(p)
37   char *p ;
38   {
39     if (strchr(p, 'a')) m_malftrace = TRUE ;
40     if (strchr(p, 'c')) m_chtrace = TRUE ;
41     if (strchr(p, 'd')) m_cdtrace = TRUE ;
42     if (strchr(p, 'e')) m_entdupchk = FALSE ;
43     if (strchr(p, 'h')) m_heapchk = TRUE ;
44     if (strchr(p, 'l')) m_explimit = FALSE ;
45     if (strchr(p, 'm')) m_conform = TRUE ;
46     if (strchr(p, 's')) m_scantrace = TRUE ;
47     if (strchr(p, 't')) m_tagtrace = TRUE ;
48     if (strchr(p, 'w')) m_wholetag = TRUE ;
49
50     if (strchr(p, 'A')) m_malftrace = TRUE ;
51     if (strchr(p, 'C')) m_chtrace = TRUE ;
52     if (strchr(p, 'D')) m_cdtrace = TRUE ;
53     if (strchr(p, 'E')) m_entdupchk = FALSE ;
54     if (strchr(p, 'H')) m_heapchk = TRUE ;
55     if (strchr(p, 'L')) m_explimit = FALSE ;
56     if (strchr(p, 'M')) m_conform = TRUE ;
57     if (strchr(p, 'S')) m_scantrace = TRUE ;
58     if (strchr(p, 'T')) m_tagtrace = TRUE ;
59     if (strchr(p, 'W')) m_wholetag = TRUE ;
60     }