xmcvt.c 43 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489
  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. /* $TOG: xmcvt.c /main/8 1999/09/16 13:42:47 mgreess $ */
  24. /* Copyright (c) 1991, 1992 UNIX System Laboratories, Inc. */
  25. /* All Rights Reserved */
  26. /* THIS IS UNPUBLISHED PROPRIETARY SOURCE CODE OF */
  27. /* UNIX System Laboratories, Inc. */
  28. /* The copyright notice above does not evidence any */
  29. /* actual or intended publication of such source code. */
  30. #include "shell.h"
  31. #include <signal.h>
  32. #include <fcntl.h>
  33. #include <X11/X.h>
  34. #include <X11/Intrinsic.h>
  35. #include <X11/IntrinsicP.h>
  36. #include <X11/CoreP.h>
  37. #include <X11/StringDefs.h>
  38. #include <Xm/XmStrDefs.h>
  39. #include <Xm/List.h>
  40. #include <Xm/MwmUtil.h>
  41. #include <setjmp.h>
  42. #include <string.h>
  43. #include <ctype.h>
  44. #include <Xm/Xm.h>
  45. #include <Xm/Protocols.h>
  46. #include <Dt/Service.h>
  47. #include <Dt/Wsm.h>
  48. #include <Dt/HourGlass.h>
  49. #include <Dt/Help.h>
  50. #include <Dt/EnvControlP.h>
  51. #include <Tt/tttk.h>
  52. #include "hash.h"
  53. #include "stdio.h"
  54. #define NO_AST
  55. #include "dtksh.h"
  56. #undef NO_AST
  57. #include "xmksh.h"
  58. #include "XtCvtrs.h"
  59. #include "dtkcmds.h"
  60. #include "xmcvt.h"
  61. #include "widget.h"
  62. #include "extra.h"
  63. #include "xmwidgets.h"
  64. #include "msgs.h"
  65. #include <Dt/Help.h>
  66. typedef struct {
  67. char * modifierName;
  68. unsigned int modifier;
  69. } ModifierState;
  70. /*
  71. * Converters for DTKSH
  72. */
  73. char *
  74. XmStringToString(
  75. XmString string )
  76. {
  77. static char *buf = NULL;
  78. XmStringContext context;
  79. XmStringCharSet charset;
  80. XmStringDirection dir;
  81. char *text;
  82. Boolean separator = FALSE;
  83. if (string == NULL)
  84. return(NULL);
  85. XmStringInitContext(&context, string);
  86. XtFree(buf);
  87. buf = NULL;
  88. while (!separator) {
  89. if (XmStringGetNextSegment(context, &text, &charset, &dir,
  90. &separator)) {
  91. if (buf) {
  92. buf = XtRealloc(buf, strlen(buf) + strlen(text) + 2);
  93. strcat(buf, text);
  94. } else
  95. buf = strdup(text);
  96. XtFree(text);
  97. } else
  98. break;
  99. }
  100. XmStringFreeContext(context);
  101. return(buf);
  102. }
  103. void
  104. DtkshCvtXmStringToString(
  105. Display *dpy,
  106. XrmValuePtr args,
  107. Cardinal *nargs,
  108. XrmValuePtr fval,
  109. XrmValuePtr toval,
  110. XtPointer data )
  111. {
  112. XmString string = ((XmString *)fval->addr)[0];
  113. char *buf;
  114. buf = XmStringToString(string);
  115. toval->addr = (caddr_t)buf;
  116. toval->size = buf ? strlen(buf) + 1 : 0;
  117. }
  118. void
  119. DtkshCvtKeySymToString(
  120. XrmValuePtr args,
  121. Cardinal *nargs,
  122. XrmValuePtr fval,
  123. XrmValuePtr toval )
  124. {
  125. static char buf[2];
  126. buf[0] = (char) (((KeySym *)(fval->addr))[0]);
  127. buf[1] = '\0';
  128. toval->addr = (caddr_t)buf;
  129. toval->size = 2;
  130. }
  131. /*
  132. * Convert an XmStringTable to a String.
  133. * In keeping with the standard CvtStringToStringTable function provided
  134. * by Motif, we will separate each item by a comma. This of course does not
  135. * work properly if there is a comma in the data, but what can we do?
  136. */
  137. char *
  138. _CvtXmStringTableToString(
  139. XmStringTable stringtable,
  140. int itemCount )
  141. {
  142. static char *buf = NULL;
  143. XmStringContext context;
  144. XmStringCharSet charset;
  145. XmStringDirection dir;
  146. char *text;
  147. Boolean separator = FALSE;
  148. XmString string;
  149. int i;
  150. char * ptr;
  151. char * nextComma;
  152. XtFree(buf);
  153. buf = XtMalloc(3);
  154. buf[0] = '\0';
  155. for (i = 0; i < itemCount; i++)
  156. {
  157. if (i > 0)
  158. strcat(buf, ",");
  159. XmStringInitContext(&context, stringtable[i]);
  160. while (!separator)
  161. {
  162. if (XmStringGetNextSegment(context, &text, &charset, &dir, &separator))
  163. {
  164. /*
  165. * To be consistent with the Motif converter, which will take
  166. * a comma-separated string, and convert it to an XmStringTable,
  167. * we need to escape any ',' characters contained within a list
  168. * item.
  169. */
  170. ptr = text;
  171. while (nextComma = strchr(ptr, ','))
  172. {
  173. *nextComma = '\0';
  174. buf = XtRealloc(buf, strlen(buf) + strlen(ptr) + 5);
  175. strcat(buf, ptr);
  176. strcat(buf, "\\,");
  177. *nextComma = ',';
  178. ptr = nextComma + 1;
  179. }
  180. buf = XtRealloc(buf, strlen(buf) + strlen(ptr) + 3);
  181. strcat(buf, ptr);
  182. XtFree(text);
  183. }
  184. else
  185. break;
  186. }
  187. XmStringFreeContext(context);
  188. }
  189. return(buf);
  190. }
  191. void
  192. DtkshCvtListItemsToString(
  193. Display *dpy,
  194. XrmValuePtr args,
  195. Cardinal *nargs,
  196. XrmValuePtr fval,
  197. XrmValuePtr toval,
  198. XtPointer data )
  199. {
  200. char *buf;
  201. XmStringTable stringtable = *((XmStringTable *)fval->addr);
  202. int itemCount = *((int *) args[0].addr);
  203. buf = _CvtXmStringTableToString(stringtable, itemCount);
  204. toval->addr = (caddr_t)buf;
  205. toval->size = buf ? strlen(buf) + 1 : 0;
  206. }
  207. /*
  208. * There are a number of resources in motif that consist of a few
  209. * named integer values. Most such resources only have 2 to 4 values,
  210. * none have more than 7. Because there are so few values, it's not
  211. * really worth the memory overhead to hash them. Also, these kinds
  212. * of resources are rarely read by programmers (most are written but
  213. * not read). So, we decided to go with a simple linear search converter
  214. * that takes as its first argument a table of the values allowed, and
  215. * as its second argument the number of items in the table.
  216. *
  217. * Note that we could not go with a simple indexing scheme because:
  218. * (1) the values are not guaranteed to be contiguous and (2) some
  219. * of the tables start with -1 instead of 0.
  220. *
  221. * If there are in the future many more items added to these lists, we
  222. * might want to convert to a hashing scheme or a binary search.
  223. */
  224. void
  225. DtkshCvtNamedValueToString(
  226. XrmValue *args,
  227. Cardinal *nargs,
  228. XrmValuePtr fval,
  229. XrmValuePtr toval )
  230. {
  231. /*
  232. * same buffer will get used each time
  233. */
  234. static char *ret = NULL;
  235. struct named_integer *table;
  236. int numtable;
  237. long value;
  238. int i;
  239. char * errmsg;
  240. switch(fval->size)
  241. {
  242. case sizeof(char):
  243. {
  244. value = (long)*((char *)fval->addr);
  245. break;
  246. }
  247. case sizeof(short):
  248. {
  249. value = (long)*((short *)fval->addr);
  250. break;
  251. }
  252. case sizeof(long):
  253. {
  254. value = (long)*((long *)fval->addr);
  255. break;
  256. }
  257. default:
  258. if (fval->size == sizeof(int))
  259. {
  260. value = (long)*((int *)fval->addr);
  261. break;
  262. }
  263. toval->addr = NULL;
  264. toval->size = 0;
  265. return;
  266. }
  267. if (*nargs != 1)
  268. {
  269. toval->addr = NULL;
  270. toval->size = 0;
  271. return;
  272. }
  273. table = (struct named_integer *)args[0].addr;
  274. numtable = args[0].size/sizeof(struct named_integer);
  275. for (i = 0; i < numtable; i++) {
  276. if (value == table[i].value) {
  277. toval->addr = (caddr_t)table[i].name;
  278. toval->size = strlen(table[i].name) + 1;
  279. return;
  280. }
  281. }
  282. toval->addr = NULL;
  283. toval->size = 0;
  284. return;
  285. }
  286. /*************************************************************************/
  287. void
  288. DtkshCvtStringToNamedValue(
  289. XrmValue *args,
  290. Cardinal *nargs,
  291. XrmValuePtr fval,
  292. XrmValuePtr toval )
  293. {
  294. /*
  295. * same buffer will get used each time
  296. */
  297. static int ret;
  298. struct named_integer *table;
  299. int numtable;
  300. char *value;
  301. int i;
  302. char * errbuf;
  303. char * errmsg;
  304. value = (String)fval->addr;
  305. if (*nargs != 1) {
  306. toval->addr = NULL;
  307. toval->size = 0;
  308. return;
  309. }
  310. table = (struct named_integer *)args[0].addr;
  311. numtable = args[0].size/sizeof(struct named_integer);
  312. for (i = 0; i < numtable; i++) {
  313. if (DtCompareISOLatin1(value, (char *)(table[i].name))) {
  314. toval->addr = (caddr_t)&table[i].value;
  315. toval->size = sizeof(table[i].value);
  316. return;
  317. }
  318. }
  319. errmsg =strdup(GETMESSAGE(16,2,
  320. "DtkshCvtStringToNamedValue: Unable to convert the string '%s'"));
  321. errbuf = XtMalloc(strlen(errmsg) + strlen(value) + 10);
  322. sprintf(errbuf, errmsg, value);
  323. XtWarning(errbuf);
  324. free(errmsg);
  325. XtFree(errbuf);
  326. toval->addr = NULL;
  327. toval->size = 0;
  328. return;
  329. }
  330. struct named_integer NI_TraversalDirection[] = {
  331. { "TRAVERSE_CURRENT", XmTRAVERSE_CURRENT },
  332. { "TRAVERSE_DOWN", XmTRAVERSE_DOWN },
  333. { "TRAVERSE_HOME", XmTRAVERSE_HOME },
  334. { "TRAVERSE_LEFT", XmTRAVERSE_LEFT },
  335. { "TRAVERSE_NEXT", XmTRAVERSE_NEXT },
  336. { "TRAVERSE_NEXT_TAB_GROUP", XmTRAVERSE_NEXT_TAB_GROUP },
  337. { "TRAVERSE_PREV", XmTRAVERSE_PREV },
  338. { "TRAVERSE_PREV_TAB_GROUP", XmTRAVERSE_PREV_TAB_GROUP },
  339. { "TRAVERSE_PREV_TAB_GROUP", XmTRAVERSE_PREV_TAB_GROUP },
  340. { "TRAVERSE_RIGHT", XmTRAVERSE_RIGHT },
  341. { "TRAVERSE_UP", XmTRAVERSE_UP },
  342. };
  343. struct named_integer NI_VisibilityType[] = {
  344. { "VISIBILITY_UNOBSCURED", XmVISIBILITY_UNOBSCURED },
  345. { "VISIBILITY_PARTIALLY_OBSCURED",XmVISIBILITY_PARTIALLY_OBSCURED },
  346. { "VISIBILITY_FULLY_OBSCURED", XmVISIBILITY_FULLY_OBSCURED },
  347. };
  348. struct named_integer NI_CommandChild[] = {
  349. { "DIALOG_COMMAND_TEXT", XmDIALOG_COMMAND_TEXT },
  350. { "DIALOG_PROMPT_LABEL", XmDIALOG_PROMPT_LABEL },
  351. { "DIALOG_HISTORY_LIST", XmDIALOG_HISTORY_LIST },
  352. { "DIALOG_WORK_AREA", XmDIALOG_WORK_AREA },
  353. };
  354. struct named_integer NI_MessageBoxChild[] = {
  355. { "DIALOG_CANCEL_BUTTON", XmDIALOG_CANCEL_BUTTON },
  356. { "DIALOG_DEFAULT_BUTTON", XmDIALOG_DEFAULT_BUTTON },
  357. { "DIALOG_HELP_BUTTON", XmDIALOG_HELP_BUTTON },
  358. { "DIALOG_MESSAGE_LABEL", XmDIALOG_MESSAGE_LABEL },
  359. { "DIALOG_OK_BUTTON", XmDIALOG_OK_BUTTON },
  360. { "DIALOG_SEPARATOR", XmDIALOG_SEPARATOR },
  361. { "DIALOG_SYMBOL_LABEL", XmDIALOG_SYMBOL_LABEL },
  362. };
  363. struct named_integer NI_FileSelChild[] = {
  364. { "DIALOG_APPLY_BUTTON", XmDIALOG_APPLY_BUTTON },
  365. { "DIALOG_CANCEL_BUTTON", XmDIALOG_CANCEL_BUTTON },
  366. { "DIALOG_DEFAULT_BUTTON", XmDIALOG_DEFAULT_BUTTON },
  367. { "DIALOG_DIR_LIST", XmDIALOG_DIR_LIST },
  368. { "DIALOG_DIR_LIST_LABEL", XmDIALOG_DIR_LIST_LABEL },
  369. { "DIALOG_FILTER_LABEL", XmDIALOG_FILTER_LABEL },
  370. { "DIALOG_FILTER_TEXT", XmDIALOG_FILTER_TEXT },
  371. { "DIALOG_HELP_BUTTON", XmDIALOG_HELP_BUTTON },
  372. { "DIALOG_LIST", XmDIALOG_LIST },
  373. { "DIALOG_LIST_LABEL", XmDIALOG_LIST_LABEL },
  374. { "DIALOG_OK_BUTTON", XmDIALOG_OK_BUTTON },
  375. { "DIALOG_SELECTION_LABEL", XmDIALOG_SELECTION_LABEL },
  376. { "DIALOG_SEPARATOR", XmDIALOG_SEPARATOR },
  377. { "DIALOG_TEXT", XmDIALOG_TEXT },
  378. { "DIALOG_WORK_AREA", XmDIALOG_WORK_AREA },
  379. };
  380. struct named_integer NI_SelBoxChild[] = {
  381. { "DIALOG_APPLY_BUTTON", XmDIALOG_APPLY_BUTTON },
  382. { "DIALOG_CANCEL_BUTTON", XmDIALOG_CANCEL_BUTTON },
  383. { "DIALOG_DEFAULT_BUTTON", XmDIALOG_DEFAULT_BUTTON },
  384. { "DIALOG_HELP_BUTTON", XmDIALOG_HELP_BUTTON },
  385. { "DIALOG_LIST", XmDIALOG_LIST },
  386. { "DIALOG_LIST_LABEL", XmDIALOG_LIST_LABEL },
  387. { "DIALOG_OK_BUTTON", XmDIALOG_OK_BUTTON },
  388. { "DIALOG_SELECTION_LABEL", XmDIALOG_SELECTION_LABEL },
  389. { "DIALOG_SEPARATOR", XmDIALOG_SEPARATOR },
  390. { "DIALOG_TEXT", XmDIALOG_TEXT },
  391. { "DIALOG_WORK_AREA", XmDIALOG_WORK_AREA },
  392. };
  393. /************************************************************************/
  394. struct named_integer NI_ArrowDirection[] = {
  395. { "ARROW_UP", XmARROW_UP },
  396. { "ARROW_DOWN", XmARROW_DOWN },
  397. { "ARROW_LEFT", XmARROW_LEFT },
  398. { "ARROW_RIGHT",XmARROW_RIGHT },
  399. };
  400. struct named_integer NI_MultiClick[] = {
  401. { "MULTICLICK_DISCARD", XmMULTICLICK_DISCARD },
  402. { "MULTICLICK_KEEP", XmMULTICLICK_KEEP },
  403. };
  404. struct named_integer NI_DialogStyle[] = {
  405. { "DIALOG_SYSTEM_MODAL", XmDIALOG_SYSTEM_MODAL },
  406. {"DIALOG_PRIMARY_APPLICATION_MODAL",XmDIALOG_PRIMARY_APPLICATION_MODAL},
  407. { "DIALOG_APPLICATION_MODAL", XmDIALOG_APPLICATION_MODAL },
  408. { "DIALOG_FULL_APPLICATION_MODAL", XmDIALOG_FULL_APPLICATION_MODAL },
  409. { "DIALOG_MODELESS", XmDIALOG_MODELESS },
  410. { "DIALOG_WORK_AREA", XmDIALOG_WORK_AREA },
  411. };
  412. struct named_integer NI_MWMInputMode[] = {
  413. { "-1", -1 },
  414. { "MWM_INPUT_MODELESS", MWM_INPUT_MODELESS},
  415. { "MWM_INPUT_PRIMARY_APPLICATION_MODAL",
  416. MWM_INPUT_PRIMARY_APPLICATION_MODAL },
  417. { "MWM_INPUT_SYSTEM_MODAL", MWM_INPUT_SYSTEM_MODAL },
  418. { "MWM_INPUT_FULL_APPLICATION_MODAL",
  419. MWM_INPUT_FULL_APPLICATION_MODAL },
  420. };
  421. struct named_integer NI_ResizePolicy[] = {
  422. { "RESIZE_NONE", XmRESIZE_NONE },
  423. { "RESIZE_ANY", XmRESIZE_ANY },
  424. { "RESIZE_GROW", XmRESIZE_GROW },
  425. };
  426. struct named_integer NI_FileTypeMask[] = {
  427. { "FILE_REGULAR", XmFILE_REGULAR },
  428. { "FILE_DIRECTORY", XmFILE_DIRECTORY },
  429. { "FILE_ANY_TYPE", XmFILE_ANY_TYPE },
  430. };
  431. struct named_integer NI_ShadowType[] = {
  432. { "SHADOW_IN", XmSHADOW_IN },
  433. { "SHADOW_OUT", XmSHADOW_OUT },
  434. { "SHADOW_ETCHED_IN", XmSHADOW_ETCHED_IN },
  435. { "SHADOW_ETCHED_OUT", XmSHADOW_ETCHED_OUT },
  436. };
  437. struct named_integer NI_Attachment[] = {
  438. { "ATTACH_NONE", XmATTACH_NONE },
  439. { "ATTACH_FORM", XmATTACH_FORM },
  440. { "ATTACH_OPPOSITE_FORM", XmATTACH_OPPOSITE_FORM },
  441. { "ATTACH_WIDGET", XmATTACH_WIDGET },
  442. { "ATTACH_OPPOSITE_WIDGET", XmATTACH_OPPOSITE_WIDGET },
  443. { "ATTACH_POSITION", XmATTACH_POSITION },
  444. { "ATTACH_SELF", XmATTACH_SELF },
  445. };
  446. struct named_integer NI_ChildType[] = {
  447. { "FRAME_TITLE_CHILD", XmFRAME_TITLE_CHILD },
  448. { "FRAME_WORKAREA_CHILD",XmFRAME_WORKAREA_CHILD },
  449. { "FRAME_GENERIC_CHILD",XmFRAME_GENERIC_CHILD },
  450. };
  451. struct named_integer NI_ChildVerticalAlignment[] = {
  452. { "ALIGNMENT_BASELINE_BOTTOM", XmALIGNMENT_BASELINE_BOTTOM },
  453. { "ALIGNMENT_BASELINE_TOP",XmALIGNMENT_BASELINE_TOP },
  454. { "ALIGNMENT_WIDGET_TOP",XmALIGNMENT_WIDGET_TOP },
  455. { "ALIGNMENT_CENTER",XmALIGNMENT_CENTER },
  456. { "ALIGNMENT_WIDGET_BOTTOM",XmALIGNMENT_WIDGET_BOTTOM },
  457. };
  458. struct named_integer NI_UnitType[] = {
  459. { "PIXELS", XmPIXELS },
  460. { "100TH_MILLIMETERS", Xm100TH_MILLIMETERS },
  461. { "1000TH_INCHES", Xm1000TH_INCHES },
  462. { "100TH_POINTS", Xm100TH_POINTS },
  463. { "100TH_FONT_UNITS", Xm100TH_FONT_UNITS },
  464. };
  465. struct named_integer NI_NavigationType[] = {
  466. { "NONE", XmNONE },
  467. { "TAB_GROUP", XmTAB_GROUP },
  468. { "STICKY_TAB_GROUP", XmSTICKY_TAB_GROUP },
  469. { "EXCLUSIVE_TAB_GROUP", XmEXCLUSIVE_TAB_GROUP },
  470. };
  471. struct named_integer NI_Alignment[] = {
  472. { "ALIGNMENT_CENTER", XmALIGNMENT_CENTER },
  473. { "ALIGNMENT_END", XmALIGNMENT_END },
  474. { "ALIGNMENT_BEGINNING", XmALIGNMENT_BEGINNING },
  475. };
  476. struct named_integer NI_LabelType[] = {
  477. { "STRING", XmSTRING },
  478. { "PIXMAP", XmPIXMAP }
  479. };
  480. struct named_integer NI_StringDirection[] = {
  481. { "STRING_DIRECTION_L_TO_R", XmSTRING_DIRECTION_L_TO_R },
  482. { "STRING_DIRECTION_R_TO_L", XmSTRING_DIRECTION_R_TO_L },
  483. };
  484. struct named_integer NI_SelectionPolicy[] = {
  485. { "SINGLE_SELECT", XmSINGLE_SELECT },
  486. { "MULTIPLE_SELECT", XmMULTIPLE_SELECT },
  487. { "EXTENDED_SELECT", XmEXTENDED_SELECT },
  488. { "BROWSE_SELECT", XmBROWSE_SELECT },
  489. };
  490. struct named_integer NI_ScrollBarPlacement[] = {
  491. { "TOP_LEFT", XmTOP_LEFT },
  492. { "BOTTOM_LEFT", XmBOTTOM_LEFT },
  493. { "TOP_RIGHT", XmTOP_RIGHT },
  494. { "BOTTOM_RIGHT", XmBOTTOM_RIGHT },
  495. };
  496. struct named_integer NI_ScrollBarDisplayPolicy[] = {
  497. { "AS_NEEDED", XmAS_NEEDED },
  498. { "STATIC", XmSTATIC },
  499. };
  500. struct named_integer NI_ScrollingPolicy[] = {
  501. { "AUTOMATIC", XmAUTOMATIC },
  502. { "APPLICATION_DEFINED", XmAPPLICATION_DEFINED },
  503. };
  504. struct named_integer NI_VisualPolicy[] = {
  505. { "VARIABLE", XmVARIABLE },
  506. { "CONSTANT", XmCONSTANT },
  507. };
  508. struct named_integer NI_ListSizePolicy[] = {
  509. { "CONSTANT", XmCONSTANT },
  510. { "VARIABLE", XmVARIABLE },
  511. { "RESIZE_IF_POSSIBLE", XmRESIZE_IF_POSSIBLE },
  512. };
  513. struct named_integer NI_EditMode[] = {
  514. { "SINGLE_LINE_EDIT", XmSINGLE_LINE_EDIT },
  515. { "MULTI_LINE_EDIT", XmMULTI_LINE_EDIT },
  516. };
  517. struct named_integer NI_CommandWindowLocation[] = {
  518. { "COMMAND_ABOVE_WORKSPACE", XmCOMMAND_ABOVE_WORKSPACE },
  519. { "COMMAND_BELOW_WORKSPACE", XmCOMMAND_BELOW_WORKSPACE },
  520. };
  521. struct named_integer NI_DefaultButtonType[] = {
  522. { "DIALOG_CANCEL_BUTTON", XmDIALOG_CANCEL_BUTTON },
  523. { "DIALOG_OK_BUTTON", XmDIALOG_OK_BUTTON },
  524. { "DIALOG_HELP_BUTTON", XmDIALOG_HELP_BUTTON },
  525. { "DIALOG_NONE", XmDIALOG_NONE },
  526. };
  527. struct named_integer NI_DialogType[] = {
  528. { "DIALOG_TEMPLATE", XmDIALOG_TEMPLATE },
  529. { "DIALOG_INFORMATION", XmDIALOG_INFORMATION },
  530. { "DIALOG_QUESTION", XmDIALOG_QUESTION },
  531. { "DIALOG_WORKING", XmDIALOG_WORKING },
  532. { "DIALOG_ERROR", XmDIALOG_ERROR },
  533. { "DIALOG_MESSAGE", XmDIALOG_MESSAGE },
  534. { "DIALOG_WARNING", XmDIALOG_WARNING },
  535. };
  536. struct named_integer NI_EntryVerticalAlignment[] = {
  537. { "ALIGNMENT_BASELINE_BOTTOM", XmALIGNMENT_BASELINE_BOTTOM },
  538. { "ALIGNMENT_BASELINE_TOP",XmALIGNMENT_BASELINE_TOP },
  539. { "ALIGNMENT_CONTENTS_BOTTOM",XmALIGNMENT_CONTENTS_BOTTOM },
  540. { "ALIGNMENT_CENTER",XmALIGNMENT_CENTER },
  541. { "ALIGNMENT_CONTENTS_TOP",XmALIGNMENT_CONTENTS_TOP },
  542. };
  543. struct named_integer NI_Orientation[] = {
  544. { "HORIZONTAL", XmHORIZONTAL },
  545. { "VERTICAL", XmVERTICAL },
  546. };
  547. struct named_integer NI_Packing[] = {
  548. { "PACK_TIGHT", XmPACK_TIGHT },
  549. { "PACK_COLUMN",XmPACK_COLUMN },
  550. { "PACK_NONE", XmPACK_NONE },
  551. };
  552. struct named_integer NI_RowColumnType[] = {
  553. { "WORK_AREA", XmWORK_AREA },
  554. { "MENU_BAR", XmMENU_BAR },
  555. { "MENU_PULLDOWN",XmMENU_PULLDOWN },
  556. { "MENU_POPUP", XmMENU_POPUP },
  557. { "MENU_OPTION",XmMENU_OPTION },
  558. };
  559. struct named_integer NI_ProcessingDirection[] = {
  560. { "MAX_ON_TOP", XmMAX_ON_TOP },
  561. { "MAX_ON_BOTTOM",XmMAX_ON_BOTTOM },
  562. { "MAX_ON_LEFT",XmMAX_ON_LEFT },
  563. { "MAX_ON_RIGHT",XmMAX_ON_RIGHT },
  564. };
  565. struct named_integer NI_ChildPlacement[] = {
  566. { "PLACE_ABOVE_SELECTION", XmPLACE_ABOVE_SELECTION },
  567. { "PLACE_BELOW_SELECTION", XmPLACE_BELOW_SELECTION },
  568. { "PLACE_TOP", XmPLACE_TOP },
  569. };
  570. struct named_integer NI_SelectionDialogType[] = {
  571. { "DIALOG_PROMPT", XmDIALOG_PROMPT },
  572. { "DIALOG_COMMAND", XmDIALOG_COMMAND },
  573. { "DIALOG_SELECTION", XmDIALOG_SELECTION },
  574. { "DIALOG_FILE_SELECTION", XmDIALOG_FILE_SELECTION },
  575. { "DIALOG_WORK_AREA", XmDIALOG_WORK_AREA },
  576. };
  577. struct named_integer NI_SeparatorType[] = {
  578. { "SINGLE_LINE", XmSINGLE_LINE },
  579. { "DOUBLE_LINE", XmDOUBLE_LINE },
  580. { "SINGLE_DASHED_LINE", XmSINGLE_DASHED_LINE },
  581. { "DOUBLE_DASHED_LINE", XmDOUBLE_DASHED_LINE },
  582. { "NO_LINE", XmNO_LINE },
  583. { "SHADOW_ETCHED_IN", XmSHADOW_ETCHED_IN },
  584. { "SHADOW_ETCHED_OUT", XmSHADOW_ETCHED_OUT },
  585. { "SHADOW_ETCHED_IN_DASH", XmSHADOW_ETCHED_IN_DASH },
  586. { "SHADOW_ETCHED_OUT_DASH", XmSHADOW_ETCHED_OUT_DASH },
  587. };
  588. struct named_integer NI_IndicatorType[] = {
  589. { "ONE_OF_MANY", XmONE_OF_MANY },
  590. { "N_OF_MANY", XmN_OF_MANY },
  591. };
  592. struct named_integer NI_AudibleWarning[] = {
  593. { "BELL", XmBELL },
  594. { "NONE", XmNONE },
  595. };
  596. struct named_integer NI_DeleteResponse[] = {
  597. { "DESTROY", XmDESTROY },
  598. { "UNMAP", XmUNMAP },
  599. { "DO_NOTHING", XmDO_NOTHING },
  600. };
  601. struct named_integer NI_KeyboardFocusPolicy[] = {
  602. { "EXPLICIT", XmEXPLICIT },
  603. { "POINTER", XmPOINTER },
  604. };
  605. struct named_integer NI_InitialState[] = {
  606. { "NormalState", NormalState },
  607. { "IconicState", IconicState },
  608. };
  609. struct named_integer NI_HelpReturnSelectedWidgetResultType[] = {
  610. { "HELP_SELECT_VALID", DtHELP_SELECT_VALID },
  611. { "HELP_SELECT_INVALID",DtHELP_SELECT_INVALID },
  612. { "HELP_SELECT_ABORT", DtHELP_SELECT_ABORT },
  613. { "HELP_SELECT_ERROR", DtHELP_SELECT_ERROR },
  614. };
  615. struct named_integer NI_QuickHelpChildType[] = {
  616. { "HELP_QUICK_CLOSE_BUTTON", DtHELP_QUICK_CLOSE_BUTTON },
  617. { "HELP_QUICK_PRINT_BUTTON",DtHELP_QUICK_PRINT_BUTTON },
  618. { "HELP_QUICK_HELP_BUTTON",DtHELP_QUICK_HELP_BUTTON },
  619. { "HELP_QUICK_SEPARATOR", DtHELP_QUICK_SEPARATOR },
  620. { "HELP_QUICK_MORE_BUTTON",DtHELP_QUICK_MORE_BUTTON },
  621. { "HELP_QUICK_BACK_BUTTON",DtHELP_QUICK_BACK_BUTTON },
  622. };
  623. struct named_integer NI_HelpType[] = {
  624. { "HELP_TYPE_TOPIC", DtHELP_TYPE_TOPIC },
  625. { "HELP_TYPE_STRING",DtHELP_TYPE_STRING },
  626. { "HELP_TYPE_DYNAMIC_STRING",DtHELP_TYPE_DYNAMIC_STRING },
  627. { "HELP_TYPE_MAN_PAGE", DtHELP_TYPE_MAN_PAGE },
  628. { "HELP_TYPE_FILE",DtHELP_TYPE_FILE },
  629. };
  630. struct named_integer NI_HelpScrollBarDisplayPolicy[] = {
  631. { "HELP_AS_NEEDED_SCROLLBARS", DtHELP_AS_NEEDED_SCROLLBARS },
  632. { "HELP_STATIC_SCROLLBARS", DtHELP_STATIC_SCROLLBARS },
  633. { "HELP_NO_SCROLLBARS",DtHELP_NO_SCROLLBARS },
  634. };
  635. struct named_integer NI_TextHighlightMode[] = {
  636. { "HIGHLIGHT_NORMAL", XmHIGHLIGHT_NORMAL },
  637. { "HIGHLIGHT_SELECTED", XmHIGHLIGHT_SELECTED },
  638. { "HIGHLIGHT_SECONDARY_SELECTED",XmHIGHLIGHT_SECONDARY_SELECTED },
  639. };
  640. struct named_integer NI_TextSearchDirection[] = {
  641. { "TEXT_FORWARD", XmTEXT_FORWARD },
  642. { "TEXT_BACKWARD", XmTEXT_BACKWARD },
  643. };
  644. struct named_integer NI_ListSelectionType[] = {
  645. { "INITIAL", XmINITIAL },
  646. { "MODIFICATION", XmMODIFICATION },
  647. { "ADDITION", XmADDITION },
  648. };
  649. struct named_integer NI_TT_STATUS[] = {
  650. { "TT_OK", TT_OK } ,
  651. { "TT_WRN_NOTFOUND", TT_WRN_NOTFOUND } ,
  652. { "TT_WRN_STALE_OBJID", TT_WRN_STALE_OBJID } ,
  653. { "TT_WRN_STOPPED", TT_WRN_STOPPED } ,
  654. { "TT_WRN_SAME_OBJID", TT_WRN_SAME_OBJID } ,
  655. { "TT_WRN_START_MESSAGE", TT_WRN_START_MESSAGE } ,
  656. { "TT_ERR_CLASS", TT_ERR_CLASS } ,
  657. { "TT_ERR_DBAVAIL", TT_ERR_DBAVAIL } ,
  658. { "TT_ERR_DBEXIST", TT_ERR_DBEXIST } ,
  659. { "TT_ERR_FILE", TT_ERR_FILE } ,
  660. { "TT_ERR_INVALID", TT_ERR_INVALID } ,
  661. { "TT_ERR_MODE", TT_ERR_MODE } ,
  662. { "TT_ERR_ACCESS", TT_ERR_ACCESS } ,
  663. { "TT_ERR_NOMP", TT_ERR_NOMP } ,
  664. { "TT_ERR_NOTHANDLER", TT_ERR_NOTHANDLER } ,
  665. { "TT_ERR_NUM", TT_ERR_NUM } ,
  666. { "TT_ERR_OBJID", TT_ERR_OBJID } ,
  667. { "TT_ERR_OP", TT_ERR_OP } ,
  668. { "TT_ERR_OTYPE", TT_ERR_OTYPE } ,
  669. { "TT_ERR_ADDRESS", TT_ERR_ADDRESS } ,
  670. { "TT_ERR_PATH", TT_ERR_PATH } ,
  671. { "TT_ERR_POINTER", TT_ERR_POINTER } ,
  672. { "TT_ERR_PROCID", TT_ERR_PROCID } ,
  673. { "TT_ERR_PROPLEN", TT_ERR_PROPLEN } ,
  674. { "TT_ERR_PROPNAME", TT_ERR_PROPNAME } ,
  675. { "TT_ERR_PTYPE", TT_ERR_PTYPE } ,
  676. { "TT_ERR_DISPOSITION", TT_ERR_DISPOSITION } ,
  677. { "TT_ERR_SCOPE", TT_ERR_SCOPE } ,
  678. { "TT_ERR_SESSION", TT_ERR_SESSION } ,
  679. { "TT_ERR_VTYPE", TT_ERR_VTYPE } ,
  680. { "TT_ERR_NO_VALUE", TT_ERR_NO_VALUE } ,
  681. { "TT_ERR_INTERNAL", TT_ERR_INTERNAL } ,
  682. { "TT_ERR_READONLY", TT_ERR_READONLY } ,
  683. { "TT_ERR_NO_MATCH", TT_ERR_NO_MATCH } ,
  684. { "TT_ERR_UNIMP", TT_ERR_UNIMP } ,
  685. { "TT_ERR_OVERFLOW", TT_ERR_OVERFLOW } ,
  686. { "TT_ERR_PTYPE_START", TT_ERR_PTYPE_START } ,
  687. { "TT_ERR_CATEGORY", TT_ERR_CATEGORY } ,
  688. { "TT_ERR_DBUPDATE", TT_ERR_DBUPDATE } ,
  689. { "TT_ERR_DBFULL", TT_ERR_DBFULL } ,
  690. { "TT_ERR_DBCONSIST", TT_ERR_DBCONSIST } ,
  691. { "TT_ERR_STATE", TT_ERR_STATE } ,
  692. { "TT_ERR_NOMEM", TT_ERR_NOMEM } ,
  693. { "TT_ERR_SLOTNAME", TT_ERR_SLOTNAME } ,
  694. { "TT_ERR_XDR", TT_ERR_XDR } ,
  695. { "TT_ERR_NETFILE", TT_ERR_NETFILE } ,
  696. { "TT_ERR_TOOLATE", TT_ERR_TOOLATE } ,
  697. { "TT_ERR_AUTHORIZATION", TT_ERR_AUTHORIZATION } ,
  698. { "TT_ERR_VERSION_MISMATCH", TT_ERR_VERSION_MISMATCH } ,
  699. { "TT_DESKTOP_EPERM", TT_DESKTOP_EPERM } ,
  700. { "TT_DESKTOP_ENOENT", TT_DESKTOP_ENOENT } ,
  701. { "TT_DESKTOP_EINTR", TT_DESKTOP_EINTR } ,
  702. { "TT_DESKTOP_EIO", TT_DESKTOP_EIO } ,
  703. { "TT_DESKTOP_EAGAIN", TT_DESKTOP_EAGAIN } ,
  704. { "TT_DESKTOP_ENOMEM", TT_DESKTOP_ENOMEM } ,
  705. { "TT_DESKTOP_EACCES", TT_DESKTOP_EACCES } ,
  706. { "TT_DESKTOP_EFAULT", TT_DESKTOP_EFAULT } ,
  707. { "TT_DESKTOP_EEXIST", TT_DESKTOP_EEXIST } ,
  708. { "TT_DESKTOP_ENODEV", TT_DESKTOP_ENODEV } ,
  709. { "TT_DESKTOP_ENOTDIR", TT_DESKTOP_ENOTDIR } ,
  710. { "TT_DESKTOP_EISDIR", TT_DESKTOP_EISDIR } ,
  711. { "TT_DESKTOP_EINVAL", TT_DESKTOP_EINVAL } ,
  712. { "TT_DESKTOP_ENFILE", TT_DESKTOP_ENFILE } ,
  713. { "TT_DESKTOP_EMFILE", TT_DESKTOP_EMFILE } ,
  714. { "TT_DESKTOP_ETXTBSY", TT_DESKTOP_ETXTBSY } ,
  715. { "TT_DESKTOP_EFBIG", TT_DESKTOP_EFBIG } ,
  716. { "TT_DESKTOP_ENOSPC", TT_DESKTOP_ENOSPC } ,
  717. { "TT_DESKTOP_EROFS", TT_DESKTOP_EROFS } ,
  718. { "TT_DESKTOP_EMLINK", TT_DESKTOP_EMLINK } ,
  719. { "TT_DESKTOP_EPIPE", TT_DESKTOP_EPIPE } ,
  720. { "TT_DESKTOP_ENOMSG", TT_DESKTOP_ENOMSG } ,
  721. { "TT_DESKTOP_EDEADLK", TT_DESKTOP_EDEADLK } ,
  722. { "TT_DESKTOP_ECANCELED", TT_DESKTOP_ECANCELED } ,
  723. { "TT_DESKTOP_ENOTSUP", TT_DESKTOP_ENOTSUP } ,
  724. { "TT_DESKTOP_ENODATA", TT_DESKTOP_ENODATA } ,
  725. { "TT_DESKTOP_EPROTO", TT_DESKTOP_EPROTO } ,
  726. { "TT_DESKTOP_ENOTEMPTY", TT_DESKTOP_ENOTEMPTY } ,
  727. { "TT_DESKTOP_ETIMEDOUT", TT_DESKTOP_ETIMEDOUT } ,
  728. { "TT_DESKTOP_EALREADY", TT_DESKTOP_EALREADY } ,
  729. { "TT_DESKTOP_UNMODIFIED", TT_DESKTOP_UNMODIFIED } ,
  730. { "TT_MEDIA_ERR_SIZE", TT_MEDIA_ERR_SIZE } ,
  731. { "TT_MEDIA_ERR_FORMAT", TT_MEDIA_ERR_FORMAT } ,
  732. { "TT_AUTHFILE_ACCESS", TT_AUTHFILE_ACCESS } ,
  733. { "TT_AUTHFILE_LOCK", TT_AUTHFILE_LOCK } ,
  734. { "TT_AUTHFILE_LOCK_TIMEOUT", TT_AUTHFILE_LOCK_TIMEOUT } ,
  735. { "TT_AUTHFILE_UNLOCK", TT_AUTHFILE_UNLOCK } ,
  736. { "TT_AUTHFILE_MISSING", TT_AUTHFILE_MISSING } ,
  737. { "TT_AUTHFILE_ENTRY_MISSING", TT_AUTHFILE_ENTRY_MISSING } ,
  738. { "TT_AUTHFILE_WRITE", TT_AUTHFILE_WRITE } ,
  739. };
  740. struct named_integer NI_TT_SCOPE[] = {
  741. { "TT_SCOPE_NONE", TT_SCOPE_NONE },
  742. { "TT_SESSION", TT_SESSION },
  743. { "TT_FILE", TT_FILE },
  744. { "TT_BOTH", TT_BOTH },
  745. { "TT_FILE_IN_SESSION", TT_FILE_IN_SESSION },
  746. };
  747. struct named_integer NI_TT_OP[] = {
  748. { "TTDT_OP_NONE", TTDT_OP_NONE },
  749. { "TTDT_CREATED", TTDT_CREATED },
  750. { "TTDT_DELETED", TTDT_DELETED },
  751. { "TTDT_DO_COMMAND", TTDT_DO_COMMAND },
  752. { "TTDT_SET_ENVIRONMENT", TTDT_SET_ENVIRONMENT },
  753. { "TTDT_GET_ENVIRONMENT", TTDT_GET_ENVIRONMENT },
  754. { "TTDT_SET_GEOMETRY", TTDT_SET_GEOMETRY },
  755. { "TTDT_GET_GEOMETRY", TTDT_GET_GEOMETRY },
  756. { "TTDT_SET_ICONIFIED", TTDT_SET_ICONIFIED },
  757. { "TTDT_GET_ICONIFIED", TTDT_GET_ICONIFIED },
  758. { "TTDT_SET_LOCALE", TTDT_SET_LOCALE },
  759. { "TTDT_GET_LOCALE", TTDT_GET_LOCALE },
  760. { "TTDT_SET_MAPPED", TTDT_SET_MAPPED },
  761. { "TTDT_GET_MAPPED", TTDT_GET_MAPPED },
  762. { "TTDT_MODIFIED", TTDT_MODIFIED },
  763. { "TTDT_REVERTED", TTDT_REVERTED },
  764. { "TTDT_GET_MODIFIED", TTDT_GET_MODIFIED },
  765. { "TTDT_MOVED", TTDT_MOVED },
  766. { "TTDT_PAUSE", TTDT_PAUSE },
  767. { "TTDT_RESUME", TTDT_RESUME },
  768. { "TTDT_QUIT", TTDT_QUIT },
  769. { "TTDT_RAISE", TTDT_RAISE },
  770. { "TTDT_LOWER", TTDT_LOWER },
  771. { "TTDT_SAVE", TTDT_SAVE },
  772. { "TTDT_REVERT", TTDT_REVERT },
  773. { "TTDT_SAVED", TTDT_SAVED },
  774. { "TTDT_SET_SITUATION", TTDT_SET_SITUATION },
  775. { "TTDT_GET_SITUATION", TTDT_GET_SITUATION },
  776. { "TTDT_SIGNAL", TTDT_SIGNAL },
  777. { "TTDT_STARTED", TTDT_STARTED },
  778. { "TTDT_STOPPED", TTDT_STOPPED },
  779. { "TTDT_STATUS", TTDT_STATUS },
  780. { "TTDT_GET_STATUS", TTDT_GET_STATUS },
  781. { "TTDT_GET_SYSINFO", TTDT_GET_SYSINFO },
  782. { "TTDT_SET_XINFO", TTDT_SET_XINFO },
  783. { "TTDT_GET_XINFO", TTDT_GET_XINFO },
  784. { "TTME_ABSTRACT", TTME_ABSTRACT },
  785. { "TTME_DEPOSIT", TTME_DEPOSIT },
  786. { "TTME_DISPLAY", TTME_DISPLAY },
  787. { "TTME_EDIT", TTME_EDIT },
  788. { "TTME_COMPOSE", TTME_COMPOSE },
  789. { "TTME_INTERPRET", TTME_INTERPRET },
  790. { "TTME_PRINT", TTME_PRINT },
  791. { "TTME_TRANSLATE", TTME_TRANSLATE },
  792. };
  793. struct named_integer NI_TEAR_OFF[] = {
  794. { "TEAR_OFF_ENABLED", XmTEAR_OFF_ENABLED },
  795. { "TEAR_OFF_DISABLED", XmTEAR_OFF_DISABLED },
  796. };
  797. /************************************************************************/
  798. struct named_integer NI_Button[] = {
  799. { "Button1", Button1 },
  800. { "Button2", Button2 },
  801. { "Button3", Button3 },
  802. { "Button4", Button4 },
  803. { "Button5", Button5 },
  804. };
  805. struct named_integer NI_EventType[] = {
  806. {"KeyPress", KeyPress},
  807. {"KeyRelease", KeyRelease},
  808. {"ButtonPress", ButtonPress},
  809. {"ButtonRelease", ButtonRelease},
  810. {"MotionNotify", MotionNotify},
  811. {"EnterNotify", EnterNotify},
  812. {"LeaveNotify", LeaveNotify},
  813. {"FocusIn", FocusIn},
  814. {"FocusOut", FocusOut},
  815. {"KeymapNotify", KeymapNotify},
  816. {"Expose", Expose},
  817. {"GraphicsExpose", GraphicsExpose},
  818. {"NoExpose", NoExpose},
  819. {"VisibilityNotify", VisibilityNotify},
  820. {"CreateNotify", CreateNotify},
  821. {"DestroyNotify", DestroyNotify},
  822. {"UnmapNotify", UnmapNotify},
  823. {"MapNotify", MapNotify},
  824. {"MapRequest", MapRequest},
  825. {"ReparentNotify", ReparentNotify},
  826. {"ConfigureNotify", ConfigureNotify},
  827. {"ConfigureRequest", ConfigureRequest},
  828. {"GravityNotify", GravityNotify},
  829. {"ResizeRequest", ResizeRequest},
  830. {"CirculateNotify", CirculateNotify},
  831. {"PropertyNotify", PropertyNotify},
  832. {"SelectionClear", SelectionClear},
  833. {"SelectionRequest", SelectionRequest},
  834. {"SelectionNotify", SelectionNotify},
  835. {"ColormapNotify", ColormapNotify},
  836. {"ClientMessage", ClientMessage},
  837. {"MappingNotify", MappingNotify},
  838. };
  839. struct named_integer NI_XBool[] = {
  840. { "true", 1 },
  841. { "false", 0 },
  842. };
  843. struct named_integer NI_TextFormat[] = {
  844. { "FMT_8_BIT", XmFMT_8_BIT },
  845. { "FMT_16_BIT", XmFMT_16_BIT },
  846. };
  847. struct named_integer NI_HelpHyperType[] = {
  848. { "HELP_LINK_TOPIC", DtHELP_LINK_TOPIC },
  849. { "HELP_LINK_MAN_PAGE", DtHELP_LINK_MAN_PAGE },
  850. { "HELP_LINK_APP_DEFINE", DtHELP_LINK_APP_DEFINE },
  851. };
  852. struct named_integer NI_WIN_GRAVITY[] = {
  853. { "ForgetGravity", ForgetGravity },
  854. { "NorthWestGravity", NorthWestGravity },
  855. { "NorthGravity", NorthGravity },
  856. { "NorthEastGravity", NorthEastGravity },
  857. { "WestGravity", WestGravity },
  858. { "CenterGravity", CenterGravity },
  859. { "EastGravity", EastGravity },
  860. { "SouthWestGravity", SouthWestGravity },
  861. { "SouthGravity", SouthGravity },
  862. { "SouthEastGravity", SouthEastGravity },
  863. { "StaticGravity", StaticGravity },
  864. { "-1", -1 },
  865. };
  866. /************************************************************************/
  867. void
  868. DtkshRegisterNamedIntConverters( void )
  869. {
  870. XtConvertArgRec args[1];
  871. #define SETARGS(X) args[0].address_mode = XtAddress; args[0].address_id = (caddr_t)&X[0]; args[0].size = sizeof(X);
  872. /* Special!! Converts string to named value */
  873. SETARGS(NI_TraversalDirection);
  874. XtAddConverter(XmRString, "TraversalDirection",
  875. DtkshCvtStringToNamedValue,
  876. args, 1);
  877. SETARGS(NI_CommandChild);
  878. XtAddConverter(XmRString, "CommandChildType",
  879. DtkshCvtStringToNamedValue,
  880. args, 1);
  881. SETARGS(NI_MessageBoxChild);
  882. XtAddConverter(XmRString, "MessageBoxChildType",
  883. DtkshCvtStringToNamedValue,
  884. args, 1);
  885. SETARGS(NI_FileSelChild);
  886. XtAddConverter(XmRString, "FileSelChildType",
  887. DtkshCvtStringToNamedValue,
  888. args, 1);
  889. SETARGS(NI_SelBoxChild);
  890. XtAddConverter(XmRString, "SelBoxChildType",
  891. DtkshCvtStringToNamedValue,
  892. args, 1);
  893. SETARGS(NI_QuickHelpChildType);
  894. XtAddConverter(XmRString, "QuickHelpChildType",
  895. DtkshCvtStringToNamedValue,
  896. args, 1);
  897. SETARGS(NI_HelpType);
  898. XtAddConverter(XmRString, "HelpType",
  899. DtkshCvtStringToNamedValue,
  900. args, 1);
  901. SETARGS(NI_HelpScrollBarDisplayPolicy);
  902. XtAddConverter(XmRString, "HelpScrollBarDisplayPolicy",
  903. DtkshCvtStringToNamedValue,
  904. args, 1);
  905. SETARGS(NI_TextHighlightMode);
  906. XtAddConverter(XmRString, "TextHighlightMode",
  907. DtkshCvtStringToNamedValue,
  908. args, 1);
  909. SETARGS(NI_TextSearchDirection);
  910. XtAddConverter(XmRString, "TextSearchDirection",
  911. DtkshCvtStringToNamedValue,
  912. args, 1);
  913. SETARGS(NI_TextFormat);
  914. XtAddConverter(XmRString, "TextFormat",
  915. DtkshCvtStringToNamedValue,
  916. args, 1);
  917. SETARGS(NI_TT_OP);
  918. XtAddConverter(XmRString, "TtOp", DtkshCvtStringToNamedValue,
  919. args, 1);
  920. SETARGS(NI_TT_SCOPE);
  921. XtAddConverter(XmRString, "TtScope", DtkshCvtStringToNamedValue,
  922. args, 1);
  923. SETARGS(NI_TT_STATUS);
  924. XtAddConverter(XmRString, "TtStatus", DtkshCvtStringToNamedValue,
  925. args, 1);
  926. SETARGS(NI_TEAR_OFF);
  927. XtAddConverter(XmRString, XmRTearOffModel, DtkshCvtStringToNamedValue,
  928. args, 1);
  929. SETARGS(NI_WIN_GRAVITY);
  930. XtAddConverter(XmRString, "XWinGravity", DtkshCvtStringToNamedValue,
  931. args, 1);
  932. SETARGS(NI_MWMInputMode);
  933. XtAddConverter(XmRString, "MWMInputMode", DtkshCvtStringToNamedValue,
  934. args, 1);
  935. /* The rest of these convert named values into strings */
  936. SETARGS(NI_ArrowDirection);
  937. XtAddConverter(XmRArrowDirection, XtRString,
  938. DtkshCvtNamedValueToString,
  939. args, 1);
  940. SETARGS(NI_MultiClick);
  941. XtAddConverter(XmRMultiClick, XtRString,
  942. DtkshCvtNamedValueToString,
  943. args, 1);
  944. SETARGS(NI_DialogStyle);
  945. XtAddConverter(XmRDialogStyle, XtRString,
  946. DtkshCvtNamedValueToString,
  947. args, 1);
  948. SETARGS(NI_MWMInputMode);
  949. XtAddConverter("MWMInputMode", XtRString,
  950. DtkshCvtNamedValueToString,
  951. args, 1);
  952. SETARGS(NI_ResizePolicy);
  953. XtAddConverter(XmRResizePolicy, XtRString,
  954. DtkshCvtNamedValueToString,
  955. args, 1);
  956. SETARGS(NI_FileTypeMask);
  957. XtAddConverter(XmRFileTypeMask, XtRString,
  958. DtkshCvtNamedValueToString,
  959. args, 1);
  960. SETARGS(NI_ShadowType);
  961. XtAddConverter(XmRShadowType, XtRString,
  962. DtkshCvtNamedValueToString,
  963. args, 1);
  964. SETARGS(NI_Attachment);
  965. XtAddConverter(XmRAttachment, XtRString,
  966. DtkshCvtNamedValueToString,
  967. args, 1);
  968. SETARGS(NI_ChildType);
  969. XtAddConverter(XmRChildType, XtRString,
  970. DtkshCvtNamedValueToString,
  971. args, 1);
  972. SETARGS(NI_Alignment);
  973. XtAddConverter(XmRChildHorizontalAlignment, XtRString,
  974. DtkshCvtNamedValueToString,
  975. args, 1);
  976. SETARGS(NI_ChildVerticalAlignment);
  977. XtAddConverter(XmRChildVerticalAlignment, XtRString,
  978. DtkshCvtNamedValueToString,
  979. args, 1);
  980. SETARGS(NI_UnitType);
  981. XtAddConverter(XmRUnitType, XtRString,
  982. DtkshCvtNamedValueToString,
  983. args, 1);
  984. SETARGS(NI_NavigationType);
  985. XtAddConverter(XmRNavigationType, XtRString,
  986. DtkshCvtNamedValueToString,
  987. args, 1);
  988. SETARGS(NI_Alignment);
  989. XtAddConverter(XmRAlignment, XtRString,
  990. DtkshCvtNamedValueToString,
  991. args, 1);
  992. SETARGS(NI_LabelType);
  993. XtAddConverter(XmRLabelType, XtRString,
  994. DtkshCvtNamedValueToString,
  995. args, 1);
  996. SETARGS(NI_StringDirection);
  997. XtAddConverter(XmRStringDirection, XtRString,
  998. DtkshCvtNamedValueToString,
  999. args, 1);
  1000. SETARGS(NI_SelectionPolicy);
  1001. XtAddConverter(XmRSelectionPolicy, XtRString,
  1002. DtkshCvtNamedValueToString,
  1003. args, 1);
  1004. SETARGS(NI_ScrollBarPlacement);
  1005. XtAddConverter(XmRScrollBarPlacement, XtRString,
  1006. DtkshCvtNamedValueToString,
  1007. args, 1);
  1008. SETARGS(NI_ScrollBarDisplayPolicy);
  1009. XtAddConverter(XmRScrollBarDisplayPolicy, XtRString,
  1010. DtkshCvtNamedValueToString,
  1011. args, 1);
  1012. SETARGS(NI_ScrollingPolicy);
  1013. XtAddConverter(XmRScrollingPolicy, XtRString,
  1014. DtkshCvtNamedValueToString,
  1015. args, 1);
  1016. SETARGS(NI_VisualPolicy);
  1017. XtAddConverter(XmRVisualPolicy, XtRString,
  1018. DtkshCvtNamedValueToString,
  1019. args, 1);
  1020. SETARGS(NI_ListSizePolicy);
  1021. XtAddConverter(XmRListSizePolicy, XtRString,
  1022. DtkshCvtNamedValueToString,
  1023. args, 1);
  1024. SETARGS(NI_EditMode);
  1025. XtAddConverter(XmREditMode, XtRString,
  1026. DtkshCvtNamedValueToString,
  1027. args, 1);
  1028. SETARGS(NI_CommandWindowLocation);
  1029. XtAddConverter(XmRCommandWindowLocation, XtRString,
  1030. DtkshCvtNamedValueToString,
  1031. args, 1);
  1032. SETARGS(NI_DefaultButtonType);
  1033. XtAddConverter(XmRDefaultButtonType, XtRString,
  1034. DtkshCvtNamedValueToString,
  1035. args, 1);
  1036. SETARGS(NI_DialogType);
  1037. XtAddConverter(XmRDialogType, XtRString,
  1038. DtkshCvtNamedValueToString,
  1039. args, 1);
  1040. SETARGS(NI_EntryVerticalAlignment);
  1041. XtAddConverter(XmRVerticalAlignment, XtRString,
  1042. DtkshCvtNamedValueToString,
  1043. args, 1);
  1044. SETARGS(NI_Orientation);
  1045. XtAddConverter(XmROrientation, XtRString,
  1046. DtkshCvtNamedValueToString,
  1047. args, 1);
  1048. SETARGS(NI_Packing);
  1049. XtAddConverter(XmRPacking, XtRString,
  1050. DtkshCvtNamedValueToString,
  1051. args, 1);
  1052. SETARGS(NI_RowColumnType);
  1053. XtAddConverter(XmRRowColumnType, XtRString,
  1054. DtkshCvtNamedValueToString,
  1055. args, 1);
  1056. SETARGS(NI_ProcessingDirection);
  1057. XtAddConverter(XmRProcessingDirection, XtRString,
  1058. DtkshCvtNamedValueToString,
  1059. args, 1);
  1060. SETARGS(NI_ChildPlacement);
  1061. XtAddConverter(XmRChildPlacement, XtRString,
  1062. DtkshCvtNamedValueToString,
  1063. args, 1);
  1064. SETARGS(NI_SelectionDialogType);
  1065. XtAddConverter(XmRSelectionType, XtRString,
  1066. DtkshCvtNamedValueToString,
  1067. args, 1);
  1068. SETARGS(NI_SeparatorType);
  1069. XtAddConverter(XmRSeparatorType, XtRString,
  1070. DtkshCvtNamedValueToString,
  1071. args, 1);
  1072. SETARGS(NI_IndicatorType);
  1073. XtAddConverter(XmRIndicatorType, XtRString,
  1074. DtkshCvtNamedValueToString,
  1075. args, 1);
  1076. SETARGS(NI_AudibleWarning);
  1077. XtAddConverter(XmRAudibleWarning, XtRString,
  1078. DtkshCvtNamedValueToString,
  1079. args, 1);
  1080. SETARGS(NI_DeleteResponse);
  1081. XtAddConverter(XmRDeleteResponse, XtRString,
  1082. DtkshCvtNamedValueToString,
  1083. args, 1);
  1084. SETARGS(NI_KeyboardFocusPolicy);
  1085. XtAddConverter(XmRKeyboardFocusPolicy, XtRString,
  1086. DtkshCvtNamedValueToString,
  1087. args, 1);
  1088. SETARGS(NI_InitialState);
  1089. XtAddConverter(XmRInitialState, XtRString,
  1090. DtkshCvtNamedValueToString,
  1091. args, 1);
  1092. SETARGS(NI_HelpReturnSelectedWidgetResultType);
  1093. XtAddConverter("HelpReturnSelectedWidgetResultType", XtRString,
  1094. DtkshCvtNamedValueToString,
  1095. args, 1);
  1096. SETARGS(NI_HelpType);
  1097. XtAddConverter("HelpType", XtRString,
  1098. DtkshCvtNamedValueToString,
  1099. args, 1);
  1100. SETARGS(NI_HelpScrollBarDisplayPolicy);
  1101. XtAddConverter("HelpScrollBarDisplayPolicy", XtRString,
  1102. DtkshCvtNamedValueToString,
  1103. args, 1);
  1104. SETARGS(NI_Button);
  1105. XtAddConverter("XE_Button", XtRString,
  1106. DtkshCvtNamedValueToString,
  1107. args, 1);
  1108. SETARGS(NI_EventType);
  1109. XtAddConverter("XE_EventType", XtRString,
  1110. DtkshCvtNamedValueToString,
  1111. args, 1);
  1112. SETARGS(NI_XBool);
  1113. XtAddConverter("X_Bool", XtRString,
  1114. DtkshCvtNamedValueToString,
  1115. args, 1);
  1116. SETARGS(NI_TraversalDirection);
  1117. XtAddConverter("TraversalDirection", XtRString,
  1118. DtkshCvtNamedValueToString,
  1119. args, 1);
  1120. SETARGS(NI_VisibilityType);
  1121. XtAddConverter("VisibilityType", XtRString,
  1122. DtkshCvtNamedValueToString,
  1123. args, 1);
  1124. SETARGS(NI_ListSelectionType);
  1125. XtAddConverter("ListSelectionType", XtRString,
  1126. DtkshCvtNamedValueToString,
  1127. args, 1);
  1128. SETARGS(NI_TextFormat);
  1129. XtAddConverter("TextFormat", XtRString,
  1130. DtkshCvtNamedValueToString,
  1131. args, 1);
  1132. SETARGS(NI_HelpHyperType);
  1133. XtAddConverter("HelpHyperType", XtRString,
  1134. DtkshCvtNamedValueToString,
  1135. args, 1);
  1136. SETARGS(NI_TT_STATUS);
  1137. XtAddConverter("TtStatus", XtRString, DtkshCvtNamedValueToString,
  1138. args, 1);
  1139. SETARGS(NI_TT_OP);
  1140. XtAddConverter("TtOp", XtRString, DtkshCvtNamedValueToString, args, 1);
  1141. SETARGS(NI_TEAR_OFF);
  1142. XtAddConverter(XmRTearOffModel, XtRString, DtkshCvtNamedValueToString,
  1143. args, 1);
  1144. SETARGS(NI_WIN_GRAVITY);
  1145. XtAddConverter("XWinGravity", XtRString, DtkshCvtNamedValueToString,
  1146. args, 1);
  1147. }
  1148. /*****************************************************************************/
  1149. static ModifierState modifierTable[] = {
  1150. {"Button1Mask", Button1Mask},
  1151. {"Button2Mask", Button2Mask},
  1152. {"Button3Mask", Button3Mask},
  1153. {"Button4Mask", Button4Mask},
  1154. {"Button5Mask", Button5Mask},
  1155. {"ControlMask", ControlMask},
  1156. {"LockMask", LockMask},
  1157. {"Mod1Mask", Mod1Mask},
  1158. {"Mod2Mask", Mod2Mask},
  1159. {"Mod3Mask", Mod3Mask},
  1160. {"Mod4Mask", Mod4Mask},
  1161. {"Mod5Mask", Mod5Mask},
  1162. {"ShiftMask", ShiftMask},
  1163. {NULL, NULL},
  1164. };
  1165. void
  1166. DtkshCvtXEModifierStateToString(
  1167. XrmValuePtr args,
  1168. Cardinal *nargs,
  1169. XrmValuePtr fval,
  1170. XrmValuePtr toval )
  1171. {
  1172. static char *string = NULL;
  1173. unsigned int value;
  1174. int i = 0;
  1175. Boolean firstOne = True;
  1176. string = XtRealloc(string, 1);
  1177. string[0] = '\0';
  1178. value = ((unsigned int *)(fval->addr))[0];
  1179. while (modifierTable[i].modifierName)
  1180. {
  1181. if (value & modifierTable[i].modifier)
  1182. {
  1183. if (!firstOne)
  1184. {
  1185. string = XtRealloc(string,
  1186. strlen(string) + strlen(modifierTable[i].modifierName) + 2);
  1187. strcat(string, "|");
  1188. strcat(string, modifierTable[i].modifierName);
  1189. }
  1190. else
  1191. {
  1192. firstOne = False;
  1193. string = XtRealloc(string,
  1194. strlen(string) + strlen(modifierTable[i].modifierName) + 1);
  1195. strcat(string, modifierTable[i].modifierName);
  1196. }
  1197. }
  1198. i++;
  1199. }
  1200. toval->addr = (caddr_t)string;
  1201. toval->size = strlen(string) + 1;
  1202. }
  1203. void
  1204. DtkshCvtXEMotionHintToString(
  1205. XrmValuePtr args,
  1206. Cardinal *nargs,
  1207. XrmValuePtr fval,
  1208. XrmValuePtr toval )
  1209. {
  1210. if (fval->size != sizeof(char))
  1211. {
  1212. toval->addr = NULL;
  1213. toval->size = 0;
  1214. return;
  1215. }
  1216. if ((((char *)(fval->addr))[0]) == NotifyNormal)
  1217. toval->addr = (caddr_t)("NotifyNormal");
  1218. else
  1219. toval->addr = (caddr_t)("NotifyHint");
  1220. toval->size = strlen(toval->addr)+1;
  1221. }
  1222. /*
  1223. * The following routines exist in order to enable ToolTalk commands
  1224. * to operate without the script having to call XtInitialize. Another way
  1225. * of accomplishing the conversions done by these routines is by calling
  1226. * XtConvert with appropriate parameters, but XtConvert requires a valid
  1227. * widget in order to look up the converter tables.
  1228. *
  1229. * The routines provided are:
  1230. * DtkshCvtTtStatusToString()
  1231. * DtkshCvtStringToTtStatus()
  1232. * DtkshCvtStringToBool()
  1233. * DtkshCvtStringToTtOp()
  1234. * DtkshCvtTtOpToString()
  1235. * DtkshCvtStringToTtScope()
  1236. */
  1237. /*
  1238. * DtkshCvtTtStatusToString takes a toolTalk error code and a pointer to an
  1239. * XrmValue struct. The XrmValue struct will be filled in with the
  1240. * results of the translation - presumably a string version of the
  1241. * error code.
  1242. * This routine is in this file because it must "know" the size of the
  1243. * NI_TT_STATUS array.
  1244. */
  1245. void
  1246. DtkshCvtTtStatusToString(
  1247. Tt_status ttStatus,
  1248. XrmValue *pToVal)
  1249. {
  1250. XrmValue cval[1], fval;
  1251. Cardinal nargs;
  1252. fval.addr = (caddr_t)&ttStatus;
  1253. fval.size = sizeof(Tt_status);
  1254. nargs = 1;
  1255. cval[0].size = sizeof(NI_TT_STATUS);
  1256. cval[0].addr = (caddr_t)NI_TT_STATUS;
  1257. DtkshCvtNamedValueToString(cval, &nargs, &fval, pToVal);
  1258. return;
  1259. }
  1260. /*
  1261. * DtkshCvtStringToTtStatus - converts a string to the corresponding
  1262. * TtStatus value.
  1263. */
  1264. void
  1265. DtkshCvtStringToTtStatus(
  1266. char *pString,
  1267. XrmValue *pToVal)
  1268. {
  1269. XrmValue cval[1], fval;
  1270. Cardinal nargs;
  1271. fval.addr = (caddr_t)pString;
  1272. fval.size = strlen(pString);
  1273. nargs = 1;
  1274. cval[0].size = sizeof(NI_TT_STATUS);
  1275. cval[0].addr = (caddr_t)NI_TT_STATUS;
  1276. DtkshCvtStringToNamedValue(cval, &nargs, &fval, pToVal);
  1277. return;
  1278. }
  1279. /*
  1280. * DtkshCvtStringToBool - takes a string (either "true" or "false")
  1281. * and a pointer to an XrmValue struct. The XrmValue struct will be filled
  1282. * out with the results of the conversion of the string to a boolean.
  1283. * This routine is in this file because it must "know" the size of the
  1284. * NI_XBool array.
  1285. */
  1286. void
  1287. DtkshCvtStringToBool(
  1288. char *pString,
  1289. XrmValue *pToVal)
  1290. {
  1291. XrmValue cval[1], fval;
  1292. Cardinal nargs;
  1293. cval[0].size = sizeof(NI_XBool);
  1294. cval[0].addr = (caddr_t)NI_XBool;
  1295. fval.addr = pString;
  1296. fval.size = strlen(pString);
  1297. nargs = 1;
  1298. DtkshCvtStringToNamedValue(cval, &nargs, &fval, pToVal);
  1299. return;
  1300. }
  1301. /*
  1302. * DtkshCvtStringToTtOp - converts a string to the corresponding
  1303. * TtOp value.
  1304. */
  1305. void
  1306. DtkshCvtStringToTtOp(
  1307. char *pString,
  1308. XrmValue *pToVal)
  1309. {
  1310. XrmValue cval[1], fval;
  1311. Cardinal nargs;
  1312. fval.addr = (caddr_t)pString;
  1313. fval.size = strlen(pString);
  1314. nargs = 1;
  1315. cval[0].size = sizeof(NI_TT_OP);
  1316. cval[0].addr = (caddr_t)NI_TT_OP;
  1317. DtkshCvtStringToNamedValue(cval, &nargs, &fval, pToVal);
  1318. return;
  1319. }
  1320. /*
  1321. * DtkshCvtTtOpToString - converts a TtOp to the representative string.
  1322. */
  1323. void
  1324. DtkshCvtTtOpToString(
  1325. Tttk_op op,
  1326. XrmValue *pToVal)
  1327. {
  1328. XrmValue cval[1], fval;
  1329. Cardinal nargs;
  1330. fval.addr = (caddr_t)&op;
  1331. fval.size = sizeof(Tttk_op);
  1332. nargs = 1;
  1333. cval[0].size = sizeof(NI_TT_OP);
  1334. cval[0].addr = (caddr_t)NI_TT_OP;
  1335. DtkshCvtNamedValueToString(cval, &nargs, &fval, pToVal);
  1336. return;
  1337. }
  1338. /*
  1339. * DtkshCvtStringToTtScope - converts a string to the appropriate
  1340. * TtScope numeric value.
  1341. */
  1342. void
  1343. DtkshCvtStringToTtScope(
  1344. char *pString,
  1345. XrmValue *pToVal)
  1346. {
  1347. XrmValue cval[1], fval;
  1348. Cardinal nargs;
  1349. fval.addr = (caddr_t)pString;
  1350. fval.size = strlen(pString);
  1351. nargs = 1;
  1352. cval[0].size = sizeof(NI_TT_OP);
  1353. cval[0].addr = (caddr_t)NI_TT_OP;
  1354. DtkshCvtNamedValueToString(cval, &nargs, &fval, pToVal);
  1355. return;
  1356. }