Initial import of the CDE 2.1.30 sources from the Open Group.
[oweals/cde.git] / cde / programs / dtksh / msgs.c
1 /* $XConsortium: msgs.c /main/4 1995/11/01 15:56:14 rswiston $ */
2 #include "stdio.h"
3 #include <sys/param.h>
4 #include <string.h>
5 #ifndef _SUN_OS
6 #include <nl_types.h>
7 #endif
8 #include "msgs.h"
9
10
11 char *
12 GetSharedMsg(
13         int msgId )
14 {
15    char * msg;
16
17    switch (msgId)
18    {
19       case DT_BAD_FIELD_NAME:
20          msg = GETMESSAGE(11,1, "Cannot find a field named '%s' in the structure '%s'");
21          break;
22
23       case DT_CONV_BUF_OVFL:
24          msg = GETMESSAGE(11,2, "DtkshCvtCallbackToString: An internal conversion buffer overflowed");
25          break;
26
27       case DT_HASHING_FAILURE:
28          msg = GETMESSAGE(11,3, "Hashing failure for resource '%s' in widget class '%s'");
29          break;
30
31       case DT_NO_FUNC_NAME:
32          msg = GETMESSAGE(11,4, "No function name was supplied");
33          break;
34
35       case DT_TK_NOT_INIT:
36          msg = GETMESSAGE(11,5, "The command cannot be executed; the toolkit has not been initialized");
37          break;
38
39       case DT_WIDGET_CREATE_FAILED:
40          msg = GETMESSAGE(11,6, "The creation of widget '%s' failed");
41          break;
42
43       case DT_BAD_DISPLAY:
44          msg = GETMESSAGE(11,7, "The display parameter is invalid: %s");
45          break;
46
47       case DT_BAD_ATOM:
48          msg = GETMESSAGE(11,8, "The following property atom is invalid: %s");
49          break;
50
51       case DT_UNDEF_RESOURCE:
52          msg = GETMESSAGE(11,9, "The following resource is not defined for widget '%s': %s");
53          break;
54
55       case DT_BAD_POSITION:
56          msg = GETMESSAGE(11,10, "The position specified is invalid: %s");
57          break;
58
59       case DT_BAD_FONT:
60          msg = GETMESSAGE(11,11, "The specified font is invalid: %s");
61          break;
62
63       case DT_BAD_WIDGET_HANDLE:
64          msg = GETMESSAGE(11,12, "The widget handle '%s' does not refer to an existing widget");
65          break;
66
67       case DT_CMD_WIDGET:
68          msg = GETMESSAGE(11,13, "The widget must be a 'command' widget");
69          break;
70
71       case DT_MAIN_WIN_WIDGET:
72          msg = GETMESSAGE(11,14, "The widget must be a 'mainWindow' widget");
73          break;
74
75       case DT_SCALE_WIDGET:
76          msg = GETMESSAGE(11,15, "The widget must be a 'scale' widget");
77          break;
78
79       case DT_SCROLLBAR_WIDGET:
80          msg = GETMESSAGE(11,16, "The widget must be a 'scrollBar' widget");
81          break;
82
83       case DT_TOGGLE_WIDGET:
84          msg = GETMESSAGE(11,17, "The widget must be a 'toggleButton' widget or gadget");
85          break;
86
87       case DT_BAD_WINDOW:
88          msg = GETMESSAGE(11,18, "The window parameter is invalid: %s");
89          break;
90
91       case DT_ALLOC_FAILURE:
92          msg = GETMESSAGE(11,19, "Unable to allocate required memory; exiting");
93          break;
94
95       case DT_NO_PARENT:
96          msg = GETMESSAGE(11,20, "Unable to find the parent widget");
97          break;
98
99       case DT_UNDEF_SYMBOL:
100          msg = GETMESSAGE(11,21, "Unable to locate the symbol '%s'");
101          break;
102
103       case DT_UNDEF_TYPE:
104          msg = GETMESSAGE(11,22, "Unable to locate the type '%s'");
105          break;
106
107       case DT_BAD_DECL:
108          msg = GETMESSAGE(11,23, "Unable to parse the declaration '%s'; using 'unsigned long'");
109          break;
110
111       case DT_UNKNOWN_CHILD_TYPE:
112          msg = GETMESSAGE(11,24, "Unknown child type: %s");
113          break;
114
115       case DT_UNKNOWN_OPTION:
116          msg = GETMESSAGE(11,25, "Unrecognized option flag: %s");
117          break;
118
119       case DT_USAGE_WIDGET_POS:
120          msg = GETMESSAGE(11,26, "Usage: %s widget position");
121          break;
122
123       case DT_USAGE_WIDGET_TIME:
124          msg = GETMESSAGE(11,27, "Usage: %s widget time");
125          break;
126
127       case DT_USAGE_WIDGET:
128          msg = GETMESSAGE(11,28, "Usage: %s widget");
129          break;
130
131       case DT_ERROR:
132          msg = GETMESSAGE(11,29, "dtksh error");
133          break;
134
135       case DT_WARNING:
136          msg = GETMESSAGE(11,30, "dtksh warning");
137          break;
138
139       case DT_USAGE_DISPLAY_WINDOW:
140          msg = GETMESSAGE(11,31, "Usage: %s display window");
141          break;
142
143       case DT_USAGE_DISPLAY_WINDOW_VAR:
144          msg = GETMESSAGE(11,32, "Usage: %s display window variable");
145          break;
146
147       case DT_USAGE_DISPLAY_ROOT_VAR:
148          msg = GETMESSAGE(11,33, "Usage: %s display rootWindow variable");
149          break;
150
151       case DT_BAD_TIMEOUT:
152          msg = GETMESSAGE(11,34, "The timeout parameter is invalid: %s");
153          break;
154
155       case DT_BAD_MESSAGE:
156          msg = GETMESSAGE(11,35, "The msg parameter is invalid: %s");
157          break;
158
159       case DT_BAD_PATTERN:
160          msg = GETMESSAGE(11,36, "The patterns parameter is invalid: %s");
161          break;
162    }
163    return(msg);
164 }