One more check on valid display which is known to be in the startup
[xcircuit.git] / Xw / ResConvert.c
blobd705c260476793dda10f0c999ab9697401cdc6d4
1 /*************************************<+>*************************************
2 *****************************************************************************
3 **
4 ** File: ResConvert.c
5 **
6 ** Project: X Widgets
7 **
8 ** Description: Contains a function to register all of the resource
9 ** type converters used within Xw and the converter
10 ** routines.
12 *****************************************************************************
13 **
14 ** Copyright (c) 1988 by Hewlett-Packard Company
15 ** Copyright (c) 1988 by the Massachusetts Institute of Technology
16 **
17 ** Permission to use, copy, modify, and distribute this software
18 ** and its documentation for any purpose and without fee is hereby
19 ** granted, provided that the above copyright notice appear in all
20 ** copies and that both that copyright notice and this permission
21 ** notice appear in supporting documentation, and that the names of
22 ** Hewlett-Packard or M.I.T. not be used in advertising or publicity
23 ** pertaining to distribution of the software without specific, written
24 ** prior permission.
25 **
26 *****************************************************************************
27 *************************************<+>*************************************/
30 #include <stdio.h>
31 #include <string.h>
32 #include <ctype.h>
33 #include <X11/Xlib.h>
34 #include <X11/IntrinsicP.h>
35 #include <X11/Intrinsic.h>
36 #include <Xw/Xw.h>
37 #include <Xw/XwP.h>
38 #include <Xw/TextEdit.h>
39 #include <X11/StringDefs.h>
42 static void _XwCvtStringToTraversalType ();
43 static void _XwCvtStringToHighlightStyle ();
44 static void _XwCvtStringToTileType();
45 static void _XwCvtStringToLayoutPolicy();
46 static void _XwCvtStringToLabelLocation();
47 static Boolean StringsAreEqual();
48 static void _XwCvtStringToAlignment();
49 static void _XwCvtStringToWidgetType();
50 static void _XwCvtStringToSelectionMethod();
51 static void _XwCvtStringToSelectionStyle();
52 static void _XwCvtStringToSelectionBias();
53 static void _XwCvtStringToElementHighlight();
54 static void _XwCvtStringToDestroyMode();
55 static void _XwCvtStringToGravity ();
56 static void _XwCvtStringToTitlePositionType();
57 static void _XwCvtStringToLabelType();
58 static void _XwCvtStringToTitleType();
59 static void _XwCvtLongToLong();
60 static void CvtStringToEditMode();
61 static void CvtStringToSourceType();
62 static void CvtStringToWrap();
63 static void CvtStringToWrapBreak();
64 static void CvtStringToWrapForm();
65 static void CvtStringToScroll();
66 static void CvtStringToGrow();
68 typedef struct {
69 unsigned char *string;
70 int value;
71 } XwSetValuePair;
73 #define NUMVALUESETS 7
74 #define XwEditTypeValueSetNum 0
75 #define XwSourceTypeValueSetNum 1
76 #define XwWrapValueSetNum 2
77 #define XwWrapFormValueSetNum 3
78 #define XwWrapBreakValueSetNum 4
79 #define XwScrollValueSetNum 5
80 #define XwGrowValueSetNum 6
82 static XwSetValuePair XwEditTypeValueSet[] =
83 { {(unsigned char *)"edit", (int) XwtextEdit},
84 {(unsigned char *)"append", (int) XwtextAppend},
85 {(unsigned char *)"read", (int) XwtextRead},
86 NULL };
87 static XwSetValuePair XwSourceTypeValueSet[] =
88 {{(unsigned char *)"stringsrc", (int) XwstringSrc},
89 {(unsigned char *)"disksrc", (int) XwdiskSrc},
90 {(unsigned char *)"userdefined", (int) XwprogDefinedSrc},
91 NULL };
92 static XwSetValuePair XwWrapValueSet[] =
93 {{(unsigned char *)"wrapoff", (int) XwWrapOff},
94 {(unsigned char *)"softwrap", (int) XwSoftWrap},
95 {(unsigned char *)"hardwrap", (int) XwHardWrap},
96 NULL };
97 static XwSetValuePair XwWrapFormValueSet[] =
98 {{(unsigned char *)"sourceform", (int) XwSourceForm},
99 {(unsigned char *)"displayform", (int) XwDisplayForm},
100 NULL };
101 static XwSetValuePair XwWrapBreakValueSet[] =
102 {{(unsigned char *)"wrapany", (int) XwWrapAny},
103 {(unsigned char *)"wrapwhitespace", (int) XwWrapWhiteSpace},
104 NULL };
105 static XwSetValuePair XwScrollValueSet[] =
106 {{(unsigned char *)"autoscrolloff", (int) XwAutoScrollOff},
107 {(unsigned char *)"autoscrollvertical", (int) XwAutoScrollVertical},
108 {(unsigned char *)"autoscrollhorizontal", (int) XwAutoScrollHorizontal},
109 {(unsigned char *)"autoscrollboth", (int) XwAutoScrollBoth},
110 NULL };
111 static XwSetValuePair XwGrowValueSet[] =
112 {{(unsigned char *)"growoff", (int) XwGrowOff},
113 {(unsigned char *)"growhorizontal", (int) XwGrowHorizontal},
114 {(unsigned char *)"growvertical", (int) XwGrowVertical},
115 {(unsigned char *)"growboth", (int) XwGrowBoth},
116 NULL };
118 static XwSetValuePair *valuepairsets[NUMVALUESETS];
120 /************************************************************************
122 * XwRegisterConverters
123 * Register all of the Xw resource type converters. Retain a
124 * flag indicating whether the converters have already been
125 * registered.
127 ************************************************************************/
129 XwRegisterConverters ()
131 static Boolean registered = False;
133 if (!registered)
135 XtAddConverter (XtRString, XtRTraversalType,
136 _XwCvtStringToTraversalType, NULL, 0);
137 XtAddConverter (XtRString, XtRLayout,
138 _XwCvtStringToLayoutPolicy, NULL, 0);
139 XtAddConverter (XtRString, XtRHighlightStyle,
140 _XwCvtStringToHighlightStyle, NULL, 0);
141 XtAddConverter (XtRString, XtRTileType,
142 _XwCvtStringToTileType, NULL, 0);
143 XtAddConverter (XtRString, XtRLabelLocation,
144 _XwCvtStringToLabelLocation, NULL, 0);
145 XtAddConverter (XtRString, XtRAlignment,
146 _XwCvtStringToAlignment, NULL, 0);
147 XtAddConverter (XtRString, XtRWidgetType,
148 _XwCvtStringToWidgetType, NULL, 0);
149 XtAddConverter (XtRString, XtRGravity,
150 _XwCvtStringToGravity, NULL,0);
151 XtAddConverter (XtRString, XtRTitlePositionType,
152 _XwCvtStringToTitlePositionType, NULL, 0);
153 XtAddConverter (XtRString, XtRTitleType, _XwCvtStringToTitleType,
154 NULL, 0);
155 XtAddConverter (XtRString, XtRLabelType, _XwCvtStringToLabelType,
156 NULL, 0);
157 XtAddConverter (XtRLong, XtRLong, _XwCvtLongToLong, NULL, 0);
159 valuepairsets[XwEditTypeValueSetNum] = XwEditTypeValueSet;
160 valuepairsets[XwSourceTypeValueSetNum] = XwSourceTypeValueSet;
161 valuepairsets[XwWrapValueSetNum] = XwWrapValueSet;
162 valuepairsets[XwWrapFormValueSetNum] = XwWrapFormValueSet;
163 valuepairsets[XwWrapBreakValueSetNum] = XwWrapBreakValueSet;
164 valuepairsets[XwScrollValueSetNum] = XwScrollValueSet;
165 valuepairsets[XwGrowValueSetNum] = XwGrowValueSet;
167 XtAddConverter(XtRString, XtREditMode, CvtStringToEditMode, NULL, 0);
168 XtAddConverter(XtRString, XtRSourceType, CvtStringToSourceType, NULL, 0);
169 XtAddConverter(XtRString, XtRWrap, CvtStringToWrap, NULL, 0);
170 XtAddConverter(XtRString, XtRWrapBreak, CvtStringToWrapBreak, NULL, 0);
171 XtAddConverter(XtRString, XtRWrapForm, CvtStringToWrapForm, NULL, 0);
172 XtAddConverter(XtRString, XtRScroll, CvtStringToScroll, NULL, 0);
173 XtAddConverter(XtRString, XtRGrow, CvtStringToGrow, NULL, 0);
176 registered = True;
182 /************************************************************************
184 * Resource Conversion Functions
185 * The following set of functions are used by the resource
186 * manager to convert the resource types defined for this class.
188 ************************************************************************/
191 /* Convert a string to a traversal type. */
193 static void _XwCvtStringToTraversalType (args, numArgs, fromVal, toVal)
194 XrmValue * args;
195 Cardinal numArgs;
196 XrmValue * fromVal;
197 XrmValue * toVal;
200 char * in_str = (char *) (fromVal->addr);
201 static int i;
203 i = XwHIGHLIGHT_OFF;
205 if (((*in_str) == 'H') || ((*in_str) == 'h'))
207 if (StringsAreEqual (in_str, "highlight_traversal"))
208 i = XwHIGHLIGHT_TRAVERSAL;
209 else if (StringsAreEqual (in_str, "highlight_enter"))
210 i = XwHIGHLIGHT_ENTER;
213 (*toVal).size = sizeof (int);
214 (*toVal).addr = (caddr_t) &i;
217 /******************************************************/
218 /* Convert a string to a ButtonClass Label Location. */
219 /******************************************************/
220 static void _XwCvtStringToLabelLocation (args, numArgs, fromVal, toVal)
221 XrmValue * args;
222 Cardinal numArgs;
223 XrmValue * fromVal;
224 XrmValue * toVal;
227 char * in_str = (char *) (fromVal->addr);
228 static int i;
230 if (((*in_str)== 'L') || ((*in_str)=='l'))
232 if (StringsAreEqual(in_str,"left")) i = XwLEFT;
234 else
235 i = XwRIGHT;
237 (*toVal).size = sizeof (int);
238 (*toVal).addr = (caddr_t) &i;
241 /********************************************************/
242 /* Convert a string to ManagerClass layout mode type. */
243 /********************************************************/
244 static void _XwCvtStringToLayoutPolicy (args, numArgs, fromVal, toVal)
245 XrmValue * args;
246 Cardinal numArgs;
247 XrmValue * fromVal;
248 XrmValue * toVal;
251 char * in_str = (char *) (fromVal->addr);
252 static int i;
254 i = XwMINIMIZE;
256 switch(*in_str)
258 case 'I':
259 case 'i':
260 if (StringsAreEqual(in_str,"ignore")) i = XwIGNORE;
261 break;
263 case 'M':
264 case 'm':
265 if (StringsAreEqual(in_str,"maximize")) i = XwMAXIMIZE;
269 (*toVal).size = sizeof (int);
270 (*toVal).addr = (caddr_t) &i;
275 static Boolean StringsAreEqual(in_str, test_str)
276 char *in_str, *test_str;
278 int i, j;
280 for (;;)
282 i = *in_str;
283 j = *test_str;
285 if (isupper(i)) i = tolower(i);
286 if (isupper(j)) j = tolower(j);
287 if (i != j) return (False);
288 if (i == 0) return (True);
290 in_str++;
291 test_str++;
296 /* Convert a string to a highlight type. */
298 static void _XwCvtStringToHighlightStyle (args, numArgs, fromVal, toVal)
299 XrmValue * args;
300 Cardinal numArgs;
301 XrmValue * fromVal;
302 XrmValue * toVal;
305 char * in_str = (char *) (fromVal->addr);
306 static int i;
308 i = XwWIDGET_DEFINED;
310 if (((*in_str) == 'P') || ((*in_str) == 'p'))
311 if (StringsAreEqual (in_str, "pattern_border"))
312 i = XwPATTERN_BORDER;
314 (*toVal).size = sizeof (int);
315 (*toVal).addr = (caddr_t) &i;
318 /* Convert a string to an tile type. */
320 static void _XwCvtStringToTileType (args, numArgs, fromVal, toVal)
321 XrmValue * args;
322 Cardinal numArgs;
323 XrmValue * fromVal;
324 XrmValue * toVal;
327 char * in_str = (char *) (fromVal->addr);
328 static int i;
330 i = XwFOREGROUND;
332 switch (*in_str)
334 case 'F':
335 case 'f':
336 if (StringsAreEqual (in_str, "foreground")) i = XwFOREGROUND;
337 break;
339 case 'B':
340 case 'b':
341 if (StringsAreEqual (in_str, "background")) i = XwBACKGROUND;
342 break;
346 (*toVal).size = sizeof (int);
347 (*toVal).addr = (caddr_t) &i;
351 /*************************************<->*************************************
353 * static void _XwCvtStringToAlignment()
354 * Display *display;
355 * XrmValue *p_fromVal;
356 * XrmValue *toVal;
358 * Description:
359 * -----------
360 * This is a type conversion procedure for the resource manager.
361 * converts strings to type XwAlignment. The conversion is case
362 * insensitive.
364 * Inputs:
365 * ------
366 * See "Xlib - C Language X Interface Protocol Version 11"
368 * Outputs:
369 * -------
370 * See "Xlib - C Language X Interface Protocol Version 11"
372 * Procedures Called
373 * -----------------
374 * StringsAreEqual
376 *************************************<->***********************************/
377 static void _XwCvtStringToAlignment(args,num,p_fromVal,toVal)
378 XrmValue *args;
379 Cardinal num;
380 XrmValue *p_fromVal;
381 XrmValue *toVal;
383 static XwAlignment Align = XwALIGN_LEFT;
384 char *from_str;
385 Boolean match = FALSE;
387 from_str = (char *) (p_fromVal->addr);
388 toVal->addr = (caddr_t) &Align;
389 toVal->size = sizeof(XwAlignment);
391 switch(*from_str)
393 case 'L':
394 case 'l':
395 if (match = StringsAreEqual(from_str,"left"))
396 Align = XwALIGN_LEFT;
397 break;
398 case 'C':
399 case 'c':
400 if (match = StringsAreEqual(from_str,"center"))
401 Align = XwALIGN_CENTER;
402 break;
403 case 'R':
404 case 'r':
405 if (match = StringsAreEqual(from_str,"right"))
406 Align = XwALIGN_RIGHT;
407 break;
408 case 'N':
409 case 'n':
410 if (match = StringsAreEqual(from_str,"none"))
411 Align = XwALIGN_NONE;
412 break;
413 default:
414 match = FALSE;
415 break;
418 if(!match)
420 toVal->addr = NULL;
421 toVal->size = 0;
426 /*************************************<->*************************************
428 * static void _XwCvtStringToWidgetType()
429 * Display *display;
430 * XrmValue *p_fromVal;
431 * XrmValue *toVal;
433 * Description:
434 * -----------
435 * This is a type conversion procedure for the resource manager.
436 * converts strings to type XwWidgetType. The conversion is case
437 * insensitive.
439 * Inputs:
440 * ------
441 * See "Xlib - C Language X Interface Protocol Version 11"
443 * Outputs:
444 * -------
445 * See "Xlib - C Language X Interface Protocol Version 11"
447 * Procedures Called
448 * -----------------
449 * StringsAreEqual
451 *************************************<->***********************************/
452 static void _XwCvtStringToWidgetType(args,num,p_fromVal,toVal)
453 XrmValue *args;
454 Cardinal num;
455 XrmValue *p_fromVal;
456 XrmValue *toVal;
458 static XwWidgetType WType = XwUNKNOWN;
459 char *from_str;
460 Boolean match = FALSE;
462 from_str = (char *) (p_fromVal->addr);
463 toVal->addr = (caddr_t) &WType;
464 toVal->size = sizeof(XwWidgetType);
466 switch(*from_str)
468 case 'T':
469 case 't':
470 if (match = StringsAreEqual(from_str,"title"))
471 WType = XwTITLE;
472 break;
473 case 'P':
474 case 'p':
475 if (match = StringsAreEqual(from_str,"pulldown"))
476 WType = XwPULLDOWN;
477 break;
478 case 'W':
479 case 'w':
480 if (match = StringsAreEqual(from_str,"work space"))
481 WType = XwWORK_SPACE;
482 break;
483 case 'U':
484 case 'u':
485 if (match = StringsAreEqual(from_str,"unknown"))
486 WType = XwUNKNOWN;
487 break;
488 default:
489 match = FALSE;
490 break;
493 if(!match)
495 toVal->addr = NULL;
496 toVal->size = 0;
503 /************************************************************************
505 * _XwCvtStringToGravity
506 * Convert a resource string to a gravity value.
508 ************************************************************************/
510 static void _XwCvtStringToGravity (args, numArgs, fromVal, toVal)
511 XrmValue * args;
512 Cardinal numArgs;
513 XrmValue * fromVal;
514 XrmValue * toVal;
517 static int gravity = CenterGravity;
518 char *from_str;
519 Boolean match = FALSE;
521 from_str = (char *) (fromVal->addr);
522 toVal->addr = (caddr_t) &gravity;
523 toVal->size = sizeof(int);
525 switch (*from_str)
527 case 'N':
528 case 'n':
529 if (match = StringsAreEqual(from_str,"NorthGravity"))
530 gravity = NorthGravity;
531 else if (match = StringsAreEqual(from_str,"NorthWestGravity"))
532 gravity = NorthWestGravity;
533 else if (match = StringsAreEqual(from_str,"NorthEastGravity"))
534 gravity = NorthEastGravity;
535 break;
536 case 'S':
537 case 's':
538 if (match = StringsAreEqual(from_str,"SouthGravity"))
539 gravity = SouthGravity;
540 else if (match = StringsAreEqual(from_str,"SouthWestGravity"))
541 gravity = SouthWestGravity;
542 else if (match = StringsAreEqual(from_str,"SouthEastGravity"))
543 gravity = SouthEastGravity;
544 break;
545 case 'W':
546 case 'w':
547 if (match = StringsAreEqual(from_str,"WestGravity"))
548 gravity = WestGravity;
549 break;
550 case 'E':
551 case 'e':
552 if (match = StringsAreEqual(from_str,"EastGravity"))
553 gravity = EastGravity;
554 break;
555 case 'C':
556 case 'c':
557 if (match = StringsAreEqual(from_str,"CenterGravity"))
558 gravity = CenterGravity;
559 break;
560 default:
561 match = FALSE;
562 break;
565 if(!match)
567 toVal->addr = NULL;
568 toVal->size = 0;
572 static void _XwCvtStringToTitleType (args, num_args, fromVal, toVal)
574 XrmValuePtr args;
575 Cardinal * num_args;
576 XrmValuePtr fromVal;
577 XrmValuePtr toVal;
580 static int i;
581 String source = (String) fromVal->addr;
583 if (source)
585 if (strcmp ("string", source) == 0)
586 i = XwSTRING;
587 else if (strcmp ("image", source) == 0)
588 i = XwIMAGE;
589 else if (strcmp ("rect", source) == 0)
590 i = XwRECT;
591 else
593 i = XwSTRING;
594 XtWarning (
595 "MenuPane: Unknown title type specified; using string title");
598 else
600 i = XwSTRING;
601 XtWarning ("MenuPane: Unknown title type specified; using string title");
604 (*toVal).size = sizeof(int);
605 (*toVal).addr = (caddr_t) &i;
609 static void _XwCvtStringToLabelType (args, num_args, fromVal, toVal)
611 XrmValuePtr args;
612 Cardinal * num_args;
613 XrmValuePtr fromVal;
614 XrmValuePtr toVal;
617 static int i;
619 if (strcmp ("string", (char *) fromVal->addr) == 0)
620 i = XwSTRING;
621 else if (strcmp ("image", (char *) fromVal->addr) == 0)
622 i = XwIMAGE;
623 else
625 i = XwSTRING;
626 XtWarning
627 ("MenuButton: Unknown label type specified; using string label");
630 (*toVal).size = sizeof(int);
631 (*toVal).addr = (caddr_t) &i;
634 static void _XwCvtStringToTitlePositionType (args, num_args, fromVal, toVal)
636 XrmValuePtr args;
637 Cardinal * num_args;
638 XrmValuePtr fromVal;
639 XrmValuePtr toVal;
642 static int i;
643 String source = (char *) fromVal->addr;
645 if (source)
647 /* Force the comparison to be case insensitive */
648 for (i = 0; i < XwStrlen(source); i++)
650 if (isupper (source[i]))
651 source[i] = tolower(source[i]);
654 if (strcmp ("bottom", source) == 0)
655 i = XwBOTTOM;
656 else if (strcmp ("top", source) == 0)
657 i = XwTOP;
658 else if (strcmp ("both", source) == 0)
659 i = XwTOP | XwBOTTOM;
660 else
662 i = XwTOP;
663 XtWarning ("Cascade: Invalid title position; position set to top");
666 else
668 i = XwTOP;
669 XtWarning ("Cascade: Invalid title position; position set to top");
672 (*toVal).size = sizeof(int);
673 (*toVal).addr = (caddr_t) &i;
676 /*---------------------------------------------------------------------------*/
677 /* Type long to type long conversion (mostly to satisfy picky 64-bit OSF) */
678 /*---------------------------------------------------------------------------*/
680 static void _XwCvtLongToLong (args, num_args, fromVal, toVal)
682 XrmValuePtr args;
683 Cardinal * num_args;
684 XrmValuePtr fromVal;
685 XrmValuePtr toVal;
688 long result = (long) fromVal->addr;
690 if (!result) {
691 XtWarning ("SourceStr: Invalid max_size; max_size set to -1");
692 result = -1;
694 (*toVal).size = sizeof(long);
695 (*toVal).addr = (caddr_t) &result;
698 /*--------------------------------------------------------------------------+*/
699 static void SetConverter(fromVal, toVal, setNum)
700 /*--------------------------------------------------------------------------+*/
701 XrmValuePtr fromVal, toVal;
702 int setNum;
704 int j;
705 XwSetValuePair *ptr;
706 static int value;
707 unsigned char *fromstr;
709 fromstr = (unsigned char *)fromVal->addr;
710 ptr = valuepairsets[setNum];
711 for(j=0; *ptr[j].string; j++)
712 if (!strcmp(ptr[j].string, fromstr)) {
713 value = ptr[j].value;
714 toVal->size = sizeof(int);
715 toVal->addr = (caddr_t)&value;
716 return;
718 toVal->size = 0;
719 toVal->addr = NULL;
722 /*--------------------------------------------------------------------------+*/
723 static void CvtStringToEditMode(args, num_args, fromVal, toVal)
724 /*--------------------------------------------------------------------------+*/
725 XrmValuePtr *args; /* unused */
726 Cardinal *num_args; /* unused */
727 XrmValuePtr fromVal;
728 XrmValuePtr toVal;
730 SetConverter(fromVal, toVal, XwEditTypeValueSetNum);
733 /*--------------------------------------------------------------------------+*/
734 static void CvtStringToSourceType(args, num_args, fromVal, toVal)
735 /*--------------------------------------------------------------------------+*/
736 XrmValuePtr *args; /* unused */
737 Cardinal *num_args; /* unused */
738 XrmValuePtr fromVal;
739 XrmValuePtr toVal;
741 SetConverter(fromVal, toVal, XwSourceTypeValueSetNum);
744 /*--------------------------------------------------------------------------+*/
745 static void CvtStringToWrap(args, num_args, fromVal, toVal)
746 /*--------------------------------------------------------------------------+*/
747 XrmValuePtr *args; /* unused */
748 Cardinal *num_args; /* unused */
749 XrmValuePtr fromVal;
750 XrmValuePtr toVal;
752 SetConverter(fromVal, toVal, XwWrapValueSetNum);
755 /*--------------------------------------------------------------------------+*/
756 static void CvtStringToWrapForm(args, num_args, fromVal, toVal)
757 /*--------------------------------------------------------------------------+*/
758 XrmValuePtr *args; /* unused */
759 Cardinal *num_args; /* unused */
760 XrmValuePtr fromVal;
761 XrmValuePtr toVal;
763 SetConverter(fromVal, toVal, XwWrapFormValueSetNum);
766 /*--------------------------------------------------------------------------+*/
767 static void CvtStringToWrapBreak(args, num_args, fromVal, toVal)
768 /*--------------------------------------------------------------------------+*/
769 XrmValuePtr *args; /* unused */
770 Cardinal *num_args; /* unused */
771 XrmValuePtr fromVal;
772 XrmValuePtr toVal;
774 SetConverter(fromVal, toVal, XwWrapBreakValueSetNum);
777 /*--------------------------------------------------------------------------+*/
778 static void CvtStringToScroll(args, num_args, fromVal, toVal)
779 /*--------------------------------------------------------------------------+*/
780 XrmValuePtr *args; /* unused */
781 Cardinal *num_args; /* unused */
782 XrmValuePtr fromVal;
783 XrmValuePtr toVal;
785 SetConverter(fromVal, toVal, XwScrollValueSetNum);
788 /*--------------------------------------------------------------------------+*/
789 static void CvtStringToGrow(args, num_args, fromVal, toVal)
790 /*--------------------------------------------------------------------------+*/
791 XrmValuePtr *args; /* unused */
792 Cardinal *num_args; /* unused */
793 XrmValuePtr fromVal;
794 XrmValuePtr toVal;
796 SetConverter(fromVal, toVal, XwGrowValueSetNum);