dtcm: Coverity 88107
[oweals/cde.git] / cde / programs / dtwm / WmResParse.h
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 libraries 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 /* 
24  * (c) Copyright 1989, 1990, 1991, 1992 OPEN SOFTWARE FOUNDATION, INC. 
25  * ALL RIGHTS RESERVED 
26 */ 
27 /* 
28  * Motif Release 1.2
29 */ 
30 /*
31  * (c) Copyright 1987, 1988, 1989, 1990 HEWLETT-PACKARD COMPANY */
32
33 #include <stdio.h>
34
35
36 extern void            ProcessWmFile (WmScreenData *pSD, Boolean bNested);
37 extern void ProcessCommandLine (int argc,  char *argv[]);
38 extern void ProcessMotifBindings (void);
39 extern Boolean         FindDtSessionMatch(int commandArgc, 
40                                            char **commandArgv, 
41                                            ClientData *pCD, 
42                                            WmScreenData *pSD, 
43                                            char **pWorkSpaceList,
44                                            char *clientMachine);
45 extern void            WmDtGetHelpArgs(char *args, 
46                                        unsigned char* volume, 
47                                        unsigned char* topic, 
48                                        int *argsCount);
49 extern void GetActionIndex (int tableSize, int *actionIndex);
50 extern void            GetFunctionTableValues (int *execIndex, int *nopIndex,
51                     int *actionIndex);
52 extern void GetNopIndex (int tableSize, int *nopIndex);
53 extern void GetExecIndex (int tableSize, int *execIndex);
54 extern Boolean GetSessionHintsInfo (WmScreenData *pSD, long numItems);
55 extern FILE          * FopenConfigFile (void);
56 extern void            FreeMenuItem (MenuItem *menuItem);
57 extern unsigned char * GetStringC (unsigned char **linePP, Boolean SmBehavior);
58 extern void SystemCmd (char *pchCmd);
59 extern Boolean ParseBtnEvent (unsigned char  **linePP,
60                               unsigned int *eventType,
61                               unsigned int *button,
62                               unsigned int *state,
63                               Boolean      *fClick);
64
65 extern void            ParseButtonStr (WmScreenData *pSD, unsigned char *buttonStr);
66 extern void            ParseKeyStr (WmScreenData *pSD, unsigned char *keyStr);
67 extern Boolean ParseKeyEvent (unsigned char **linePP, unsigned int *eventType,
68                        KeyCode *keyCode,  unsigned int *state);
69 extern MenuItem      * ParseMwmMenuStr (WmScreenData *pSD, unsigned char *menuStr);
70 extern void ParseSessionClientState (WmScreenData *pSD, int count,
71                               unsigned char *string);
72 extern void ParseSessionCommand (WmScreenData *pSD,  int count,
73                           unsigned char **commandString);
74 extern void ParseSessionGeometry (WmScreenData *pSD, int count,
75                            unsigned char *string);
76 extern void ParseSessionItems (WmScreenData *pSD);
77 extern void ParseSessionWorkspaces (WmScreenData *pSD,  int count,
78                              unsigned char *string);
79 extern void ParseSessionHost (WmScreenData *pSD,  int count,
80                              unsigned char *string);
81 extern void ParseDtSessionHints (WmScreenData *pSD, unsigned char *property);
82 extern int             ParseWmFunction (unsigned char **linePP, unsigned int res_spec, WmFunction *pWmFunction);
83 extern void            PWarning (char *message);
84 extern void            SaveMenuAccelerators (WmScreenData *pSD, MenuSpec *newMenuSpec);
85 extern void      ScanAlphanumeric (unsigned char **linePP);
86 extern void            ToLower (unsigned char  *string);
87 extern void             SyncModifierStrings(void);
88 extern void DeleteTempConfigFileIfAny (void);
89 extern Boolean ParseWmFunctionArg (
90                 unsigned char **linePP,
91                 int ix, 
92                 WmFunction wmFunc, 
93                 void **ppArg,
94                 String sClientName,
95                 String sTitle);
96 extern Boolean ParseWmFuncMaybeStrArg (unsigned char **linePP, 
97                                        WmFunction wmFunction, String *pArgs);
98 extern Boolean ParseWmFuncStrArg (unsigned char **linePP, 
99                                        WmFunction wmFunction, String *pArgs);
100 extern Boolean ParseWmFuncActionArg (unsigned char **linePP, 
101                                   WmFunction wmFunction, String *pArgs);
102 #define ToLower(s)              (_DtWmParseToLower (s))
103 #define GetNextLine()           (_DtWmParseNextLine (wmGD.pWmPB))
104 #define GetSmartSMString(s)     (_DtWmParseNextTokenC (s, True))
105 #define GetSmartString(s)       (_DtWmParseNextTokenC (s, False))
106 #define GetString(s)            (_DtWmParseNextTokenC (s, False))
107 #define ScanWhitespace(s)       (_DtWmParseSkipWhitespaceC (s))
108