Debian Codegraph @

gui/GraphLib/libsrc/uimxR5/src/swidget.c

raw
1 /*---------------------------------------------------------------------
2 *
3 *
4 * Copyright (c) 1992, Visual Edge Software Ltd.
5 *
6 * ALL RIGHTS RESERVED. Permission to use, copy, modify, and
7 * distribute this software and its documentation for any purpose
8 * and without fee is hereby granted, provided that the above
9 * copyright notice appear in all copies and that both that
10 * copyright notice and this permission notice appear in supporting
11 * documentation, and that the name of Visual Edge Software not be
12 * used in advertising or publicity pertaining to distribution of
13 * the software without specific, written prior permission. The year
14 * included in the notice is the year of the creation of the work.
15 *---------------------------------------------------------------------
16 * swidget.c: the runtime swidget class.
17 *-------------------------------------------------------------------*/
18 /*
19
20 .VERSION
21 090818 last modfif
22 */
23
24
25 /*--- include files ---*/
26 #include <string.h>
27 #include <UxLib.h>
28 #include "UxLibP.h"
29 #include <resload.h>
30 #include "version.h"
31
32 /*--- macro symbolic constants ---*/
33
34 #define LIST_BLOCK 10
35
36 /*--- macro functions ---*/
37
38 /*--- types ---*/
39
40 /*--- external functions ---*/
41
42 /*--- external variables ---*/
43
44 /*--- global variables ---*/
45
46 /*--- file global variables ---*/
47 M_FILE_VERSION("$Header")
48
49 void UxSwidgetFreeArgs();
50
51 extern int UxStrEqual();
52 extern void UxFreeXValue();
53
54
55 /*--- forward declaration of static functions ---*/
56
57 /*--------------------------------------------------------------------------
58 NAME: UxCreateSwidget
59 UxCreateDialogSwidget
60
61 INPUT: char *name, WidgetClass cls, swidget parent
62
63 RETURN: swidget
64 DESCRIPTION: Create a swidget instance.
65 CreateDialogSwidget differs only in setting the Dialog flag,
66 so that the implicit shell for the widget is a Dialog shell.
67
68 CREATION: 25 May 1989
69 LAST REV: June 92 fix... -- remove components
70 --------------------------------------------------------------------------*/
71
72 swidget UxCreateSwidget(name, cls, parent)
73 char *name;
74 WidgetClass cls;
75 swidget parent;
76 {
77 swidget sw = (swidget) UxMalloc(sizeof(UxShadowWidget_t));
78
79 sw->Self = sw;
80 sw->Parent = parent;
81
82 sw->Name = UxCopyString(name);
83 sw->WClass = cls;
84 sw->Context = parent ? parent->Context : 0;
85 sw->ItsWidget = 0;
86
87 sw->Values = 0;
88 sw->NumValues = 0;
89
90 sw->UpdateFlag = 1;
91 sw->DefaultShell = 0;
92 sw->Flags = 0;
93 sw->IfClassCode = -1;
94
95 sw->Accelerators = 0;
96 sw->Translations = 0;
97
98 return sw;
99 }
100
101 swidget UxCreateDialogSwidget(name, cls, parent)
102 char *name;
103 WidgetClass cls;
104 swidget parent;
105 {
106 swidget sw = UxCreateSwidget(name, cls, parent);
107 UxSwidgetSetFlag(sw, UXDIALOG_FLAG);
108 return sw;
109 }
110
111 /*--------------------------------------------------------------------------
112 NAME: UxFreeSwidget
113 INPUT: swidget sw
114 RETURN:
115 DESCRIPTION: free the specified swidget
116 LAST REV: Apr 93 fix4133 -- Set Self to NULL for UxIsValidSwidget.
117 --------------------------------------------------------------------------*/
118 void UxFreeSwidget(sw)
119 swidget sw;
120 {
121 UxSwidgetFreeArgs(sw);
122 UxFree(sw->Name);
123 UxFree(sw->Values);
124 UxFree(sw->Accelerators);
125 UxFree(sw->Translations);
126
127 sw->Self = 0; /* For subsequent UxIsValidSwidget. */
128 UxFree(sw);
129 }
130
131 /*-----------------------------------------------------------------------------
132 NAME: int UxIsSwidget
133 INPUT: swidget
134 RETURN: integer (1 or 0)
135 DESCRIPTION: given swidget check if it is defined or not.
136 LAST REV: March 93 fix3963 Name change.
137 -----------------------------------------------------------------------------*/
138
139 int UxIsSwidget(sw)
140 swidget sw;
141 {
142 return ( sw && ! memcmp( sw, &sw, sizeof(swidget)) );
143 }
144
145 /*--------------------------------------------------------------------------
146 NAME: UxGetContext
147 INPUT: swidget sw
148 RETURN: void*
149 DESCRIPTION: return the swidget's context pointer
150 CREATION: 25 May 1989
151 LAST REV: March 93 fix3963 UxIsSwidget now called.
152 --------------------------------------------------------------------------*/
153 void *UxGetContext(sw)
154 swidget sw;
155 {
156 if (UxIsSwidget(sw))
157 return sw->Context;
158 return 0;
159 }
160
161 /*--------------------------------------------------------------------------
162 NAME: UxGetWidget
163 INPUT: swidget sw
164 RETURN: Widget
165 DESCRIPTION: Return the swidget's widget
166 CREATION: 25 May 1989
167 LAST REV: March 93 fix3963 UxIsSwidget now called.
168 --------------------------------------------------------------------------*/
169 Widget UxGetWidget(sw)
170 swidget sw;
171 {
172 if (UxIsSwidget(sw))
173 return sw->ItsWidget;
174 return (Widget)0;
175 }
176
177 /*--------------------------------------------------------------------------
178 NAME: UxPutContext
179 INPUT: swidget sw, void *ctx
180 RETURN:
181 DESCRIPTION: Set the swidget's context pointer.
182 CREATION: 25 May 1989
183 LAST REV: March 93 fix3963 UxIsSwidget now called.
184 --------------------------------------------------------------------------*/
185 void UxPutContext(sw, ctx)
186 swidget sw;
187 void *ctx;
188 {
189 if (UxIsSwidget(sw))
190 sw->Context = ctx;
191 }
192
193 /*--------------------------------------------------------------------------
194 NAME: UxPutWidget
195 INPUT: swidget sw, Widget w
196 RETURN:
197 DESCRIPTION: Set the swidget's widget
198 CREATION: 25 May 1989
199 LAST REV: March 93 fix3963 UxIsSwidget now called.
200 --------------------------------------------------------------------------*/
201 void UxPutWidget(sw, w)
202 swidget sw;
203 Widget w;
204 {
205 if (UxIsSwidget(sw))
206 sw->ItsWidget = w;
207 }
208
209 /*--------------------------------------------------------------------------
210 NAME: UxGetName
211 INPUT: swidget sw
212 RETURN: pointer to char
213 DESCRIPTION: return the swidget's name
214 CREATION: 25 May 1989
215 LAST REV: March 93 fix3963 UxIsSwidget now called.
216 --------------------------------------------------------------------------*/
217 char *UxGetName(sw)
218 swidget sw;
219 {
220 if (UxIsSwidget(sw))
221 return sw->Name;
222
223 return 0;
224 }
225
226 /*--------------------------------------------------------------------------
227 NAME: UxGetParent
228 INPUT: swidget sw
229 RETURN: swidget
230 DESCRIPTION: Return the swidget's parent
231 CREATION: 25 May 1989
232 LAST REV: March 93 fix3963 UxIsSwidget now called.
233 --------------------------------------------------------------------------*/
234 swidget UxGetParent(sw)
235 swidget sw;
236 {
237 if (UxIsSwidget(sw))
238 return sw->Parent;
239
240 return 0;
241 }
242
243
244 /*--------------------------------------------------------------------------
245 NAME: UxGetClass
246 INPUT: swidget sw;
247 RETURN: WidgetClass
248 DESCRIPTION: Return the swidget's widget class
249 CREATION: 25 May 1989
250 LAST REV: March 93 fix3963 UxIsSwidget now called.
251 --------------------------------------------------------------------------*/
252 WidgetClass UxGetClass(sw)
253 swidget sw;
254 {
255
256 if (UxIsSwidget(sw))
257 return sw->WClass;
258
259 return 0;
260 }
261
262 /*--------------------------------------------------------------------------
263 NAME: UxGetIfClassCode
264 INPUT: swidget sw;
265 RETURN: int
266 DESCRIPTION: Return the swidget's interface class code.
267 CREATION: 25 May 1992
268 LAST REV: March 93 fix3963 UxIsSwidget now called.
269 --------------------------------------------------------------------------*/
270 int UxGetIfClassCode(sw)
271 swidget sw;
272 {
273 if (UxIsSwidget(sw))
274 return(sw->IfClassCode);
275
276 return(-1); /* convention - means none specified */
277 }
278
279 /*--------------------------------------------------------------------------
280 NAME: UxPutClassCode
281 INPUT: swidget sw;
282 DESCRIPTION: Set the swidget's interface class code.
283 CREATION: 25 May 1992
284 LAST REV: March 93 fix3963 UxIsSwidget now called.
285 --------------------------------------------------------------------------*/
286 void UxPutClassCode(sw, cid)
287 swidget sw;
288 int cid;
289 {
290 if (UxIsSwidget(sw))
291 sw->IfClassCode = cid;
292 }
293
294 /*--------------------------------------------------------------------------
295 NAME: UxPutTranslations
296 INPUT: swidget sw, char* tr
297 RETURN:
298 DESCRIPTION: Set the swidget's translation property
299 Translations are not set via the Values list;
300 if the Widget is not present, the put will do nothing.
301 CREATION: 25 May 1989
302 LAST REV: March 93 fix3963 UxIsSwidget now called.
303 --------------------------------------------------------------------------*/
304 void UxPutTranslations(sw, tr)
305 swidget sw;
306 char *tr;
307 {
308 if (UxIsSwidget(sw))
309 {
310 if (sw->ItsWidget)
311 {
312 UxAddTranslations(sw, tr);
313 return;
314 }
315 sw->Translations = UxCopyString(tr);
316 }
317 }
318
319 /*--------------------------------------------------------------------------
320 NAME: UxPutAccelerators
321 INPUT: swidget sw, char* ac
322 RETURN:
323 DESCRIPTION: Set the swidget (or widget) accelerator property
324 Accelerators are not set via the Values list;
325 if the Widget is not present, the put will do nothing.
326 CREATION: 23 Nov. 1989
327 LAST REV: March 93 fix3963 UxIsSwidget now called.
328 --------------------------------------------------------------------------*/
329 void UxPutAccelerators(sw, ac)
330 swidget sw;
331 char *ac ;
332 {
333 if (UxIsSwidget(sw))
334 {
335 if (sw->ItsWidget)
336 {
337 UxAddAccelerators(sw, ac);
338 return;
339 }
340 sw->Accelerators = UxCopyString(ac);
341 }
342 }
343
344 /*--------------------------------------------------------------------------
345 NAME: UxGetAccelerators
346 INPUT: swidget sw
347 RETURN: char *
348 DESCRIPTION: return the swidget's accelerators string.
349 CREATION: 23 Nov. 1989
350 LAST REV: March 93 fix3963 UxIsSwidget now called.
351 --------------------------------------------------------------------------*/
352 char *UxGetAccelerators(sw)
353 swidget sw;
354 {
355 if (UxIsSwidget(sw))
356 return sw->Accelerators;
357 return 0;
358 }
359
360 /*--------------------------------------------------------------------------
361 NAME: UxGetTranslations
362 INPUT: swidget sw
363 RETURN: pointer to char
364 DESCRIPTION: Return the swidget's translations string.
365 CREATION: 25 May 1989
366 LAST REV: March 93 fix3963 UxIsSwidget now called.
367 --------------------------------------------------------------------------*/
368 char *UxGetTranslations(sw)
369 swidget sw;
370 {
371 if (UxIsSwidget(sw))
372 return sw->Translations;
373 return 0;
374 }
375
376
377 #ifdef MOTIF_WIDGETS
378 #include <Xm/DialogS.h>
379 #include <Xm/MenuShell.h>
380 #endif
381
382 /*----------------------------------------------------------------------
383 * NAME: <UxPutDefaultShell>
384 * DESCRIPTION: <Put shellclass name to swidget.>
385 * PARAMETERS:
386 * swidget sw I
387 * char* c I class name
388 * RETURN: none
389 * EXT REFS: UxShellNameList, AppShellIndex, OverrideShellIndex,
390 * applicationShellWidgetClass, overrideShellWidgetClass,
391 * TopLevelShellIndex, topLevelShellWidgetClass,
392 * TransientShellIndex, transientShellWidgetClass,
393 * DialogShellIndex, xmDialogShellWidgetClass,
394 * MenuShellIndex, xmMenuShellWidgetClass
395 * EXT EFFECTS:
396 * ASSUMPTIONS:
397 * REVISIONS: 10, Oct. 1989 created
398 * March 93 fix3963 UxIsSwidget now called.
399 * 09/03/93 fix3968 renamed class to c
400 *--------------------------------------------------------------------*/
401 void UxPutDefaultShell(sw, c)
402 swidget sw;
403 char *c;
404 {
405 if (UxIsSwidget(sw))
406 {
407 if (UxStrEqual(c, UxShellNameList[AppShellIndex]))
408 sw->DefaultShell = applicationShellWidgetClass;
409
410 else if (UxStrEqual(c, UxShellNameList[OverrideShellIndex]))
411 sw->DefaultShell = overrideShellWidgetClass;
412
413 else if (UxStrEqual(c, UxShellNameList[TopLevelShellIndex]))
414 sw->DefaultShell = topLevelShellWidgetClass;
415
416 else if (UxStrEqual(c, UxShellNameList[TransientShellIndex]))
417 sw->DefaultShell = transientShellWidgetClass;
418
419 #ifdef MOTIF_WIDGETS
420 else if (UxStrEqual(c, UxShellNameList[DialogShellIndex]))
421 sw->DefaultShell = xmDialogShellWidgetClass;
422
423 else if (UxStrEqual(c, UxShellNameList[MenuShellIndex]))
424 sw->DefaultShell = xmMenuShellWidgetClass;
425 #endif
426
427 }
428
429 }
430
431 /*--------------------------------------------------------------------------
432 NAME: UxGetDefaultShell
433 INPUT: swidget sw;
434 RETURN:
435 DESCRIPTION: return the defaultShell value
436 CREATION: 10, Oct. 1989
437 LAST REV: March 93 fix3963 UxIsSwidget now called.
438 --------------------------------------------------------------------------*/
439 WidgetClass UxGetDefaultShell (sw)
440 swidget sw;
441 {
442
443 if (UxIsSwidget(sw))
444 return sw->DefaultShell;
445
446 return 0;
447 }
448
449 /*--------------------------------------------------------------------------
450 NAME: UxSwidgetSetFlag
451 INPUT: swidget sw;
452 int mask; - mask specifying flag to be set
453 RETURN:
454 DESCRIPTION: sets the flags bit spedified in the mask
455 CREATION: 1, Aug. 1990 (see bug866)
456 LAST REV: March 93 fix3963 UxIsSwidget now called.
457 --------------------------------------------------------------------------*/
458 void UxSwidgetSetFlag(sw, mask)
459 swidget sw;
460 int mask;
461 {
462 if (UxIsSwidget(sw))
463 sw->Flags = sw->Flags | mask;
464 }
465
466 /*--------------------------------------------------------------------------
467 NAME: UxSwidgetUnsetFlag
468 INPUT: swidget sw;
469 int mask; - specifies bit to unset
470 RETURN:
471 DESCRIPTION: unsets the flags bit spedified in mask
472 CREATION: 1, Aug. 1990 (see bug866)
473 LAST REV: March 93 fix3963 UxIsSwidget now called.
474 --------------------------------------------------------------------------*/
475 void UxSwidgetUnsetFlag(sw, mask)
476 swidget sw;
477 int mask;
478 {
479 if (UxIsSwidget(sw))
480 sw->Flags = sw->Flags & ~mask;
481 }
482
483 /*--------------------------------------------------------------------------
484 NAME: UxSwidgetGetFlag
485 INPUT: swidget sw;
486 int mask; - specifies bit to get
487 RETURN:
488 DESCRIPTION: gets the flags bit spedified in mask
489 CREATION: 1, Aug. 1990 (see bug866)
490 LAST REV: March 93 fix3963 UxIsSwidget now called.
491 --------------------------------------------------------------------------*/
492 int UxSwidgetGetFlag (sw, mask)
493 swidget sw;
494 int mask;
495 {
496 if (UxIsSwidget(sw))
497 return (sw->Flags & mask ? 1 : 0);
498 return 0;
499 }
500
501 /*--------------------------------------------------------------------------
502 NAME: UxSwidgetSetWinGroupFlag
503 INPUT: swidget sw;
504 RETURN:
505 DESCRIPTION: sets the window group flag
506 CREATION: 1, Aug. 1990 (see bug866)
507 LAST REV: May 92 fix3571 -- swidget type is a pointer.
508 --------------------------------------------------------------------------*/
509 void UxSwidgetSetWinGroupFlag (sw)
510 swidget sw;
511 {
512 UxSwidgetSetFlag(sw, UXWIN_GROUP_FLAG);
513 }
514
515 /*--------------------------------------------------------------------------
516 NAME: UxSwidgetGetWinGroupFlag
517 INPUT: swidget sw;
518 RETURN:
519 DESCRIPTION: gets the window group flag
520 CREATION: 1, Aug. 1990 (see bug866)
521 LAST REV: May 92 fix3571 -- swidget type is a pointer.
522 --------------------------------------------------------------------------*/
523 int UxSwidgetGetWinGroupFlag (sw)
524 swidget sw;
525 {
526 return UxSwidgetGetFlag(sw, UXWIN_GROUP_FLAG);
527 }
528
529 /*--------------------------------------------------------------------------
530 NAME: UxSwidgetUnsetWinGroupFlag
531 INPUT: swidget sw;
532 RETURN:
533 DESCRIPTION: unsets the window group flag
534 CREATION: 1, Aug. 1990 (see bug866)
535 LAST REV: May 92 fix3571 -- swidget type is a pointer.
536 --------------------------------------------------------------------------*/
537 void UxSwidgetUnsetWinGroupFlag (sw)
538 swidget sw;
539 {
540 UxSwidgetSetFlag(sw, UXWIN_GROUP_FLAG);
541 }
542
543 /*--------------------------------------------------------------------------
544 NAME: UxGetCreateManaged
545 INPUT: swidget sw;
546 RETURN:
547 DESCRIPTION: gets the createManaged flag
548 CREATION: 15 April 1991 bugfix 2170
549 LAST REV: May 92 fix3571 -- swidget type is a pointer.
550 --------------------------------------------------------------------------*/
551 char* UxGetCreateManaged (sw)
552 swidget sw;
553 {
554 /** Create managed is true by default,
555 ** unless the create_unmanaged flag has been set.
556 **/
557
558 if (UxSwidgetGetFlag (sw, UXCREATE_UNMANAGED_FLAG))
559 {
560 return "false";
561 }
562 else
563 {
564 return "true";
565 }
566 }
567
568 /*--------------------------------------------------------------------------
569 NAME: UxPutCreateManaged
570 INPUT: swidget sw;
571 char *cm;
572 RETURN:
573 DESCRIPTION: sets the create unmanaged flag according to whether
574 'cm' is "true" or "false".
575
576 CREATION: 15 April 1991 bugfix 2170
577 LAST REV: May 92 fix3571 -- swidget type is a pointer.
578 --------------------------------------------------------------------------*/
579 void UxPutCreateManaged(sw, cm)
580 swidget sw;
581 char *cm;
582 {
583 if (UxStrEqual(cm, "false")) {
584 UxSwidgetSetFlag (sw, UXCREATE_UNMANAGED_FLAG);
585 } else {
586 UxSwidgetUnsetFlag (sw, UXCREATE_UNMANAGED_FLAG);
587 }
588 }
589
590 /*--------------------------------------------------------------------------
591 NAME: UxFindValue
592 INPUT: swidget sw -swidget
593 char *prop -resource
594 XtArgVal *value -output value
595 RETURN: True of False
596 DESCRIPTION: give a swidget and a resource, find the Xt value if available
597 in the swidget resource list.
598 CREATION: Nov 19/91 fix3186
599 LAST REV: May 92 fix3571 -- swidget type is a pointer.
600 ---------------------------------------------------------------------------*/
601 int UxFindValue (sw, prop, value)
602 swidget sw;
603 char *prop;
604 XtArgVal *value;
605 {
606 int i;
607
608 for (i = 0; i < sw->NumValues; i++)
609 {
610 if (UxStrEqual (prop, sw->Values[i].name))
611 {
612 *value = sw->Values[i].value;
613 return True;
614 }
615 }
616 return False;
617 }
618
619
620 /*--------------------------------------------------------------------------
621 NAME: UxSwidgetFreeArgs
622 INPUT: swidget w -swidget
623 DESCRIPTION:
624 Free the Values array of the swidget.
625
626 CREATION: Nov 19/91 fix3186
627 LAST REV: May 92 fix3571 -- swidget type is a pointer.
628 ---------------------------------------------------------------------------*/
629 void UxSwidgetFreeArgs (sw)
630 swidget sw;
631 {
632 int i;
633
634 for (i = 0; i < sw->NumValues; i++)
635 {
636 UxFreeXValue(sw, sw->Values[i].name, sw->Values[i].value);
637 UxFree(sw->Values[i].name);
638 }
639 UxFree(sw->Values);
640 sw->Values = 0;
641 sw->NumValues = 0;
642 }
643
644
645 /*------------------------------------------------------------------------
646 * NAME: UxSwidgetAddNamedValue
647 * INPUT:
648 * swidget sw;
649 * char *prop; -- name of resource
650 * XtArgVal val; -- value to save
651 * DESCRIPTION:
652 * Saves a resource on the swidget's Values list
653 * (so that it can be sent through XtSetValues when
654 * the swidget is next updated).
655 *
656 * LAST REV: May 92 fix3571 -- swidget type is a pointer.
657 *------------------------------------------------------------------------*/
658
659 void UxSwidgetAddNamedValue(sw, prop, val)
660 swidget sw;
661 char* prop;
662 XtArgVal val;
663 {
664 /*-------------------------------------------
665 * Grow by a block whenever the list length
666 * reaches a multiple of the block size.
667 *-------------------------------------------*/
668
669 if (sw->NumValues % LIST_BLOCK == 0)
670 {
671 sw->Values = (ArgList) UxRealloc(sw->Values,
672 sizeof(Arg) * (sw->NumValues + LIST_BLOCK));
673 }
674
675 sw->Values[sw->NumValues].name = UxCopyString(prop);
676 sw->Values[sw->NumValues].value = val;
677 sw->NumValues++;
678 }
679
680 /*------------------------------------------------------------------------
681 * NAME: UxSwidgetPropSet
682 * INPUT:
683 * swidget sw;
684 * char *prop; -- name of resource
685 * RETURNS: 0/1 -- 1 iff a value for the named resource has been
686 * saved on the swidget's values list.
687 * DESCRIPTION:
688 * Simply searches the Values list for the given name.
689 *
690 * LAST REV: May 92 fix3571 -- swidget type is a pointer.
691 *------------------------------------------------------------------------*/
692 int UxSwidgetPropSet (sw, prop)
693 swidget sw;
694 char* prop;
695 {
696 int i;
697
698 for (i = 0; i < sw->NumValues; i++)
699 {
700 if (UxStrEqual(sw->Values[i].name, prop))
701 return 1;
702 }
703 return 0;
704 }
705
706 /*------------------------------------------------------------------------
707 * NAME: UxSwidgetGetProp
708 * INPUT:
709 * swidget sw;
710 * char *prop; -- name of resource
711 * RETURNS: XtArgVal -- value of saved resource, or 0.
712 * DESCRIPTION:
713 * If a value for the named resource has been saved in the swidget's
714 * Values list, then that saved value is returned.
715 * LAST REV: May 92 fix3571 -- swidget type is a pointer.
716 *------------------------------------------------------------------------*/
717 XtArgVal UxSwidgetGetProp (sw, prop)
718 swidget sw;
719 char* prop;
720 {
721 XtArgVal val = 0;
722
723 UxFindValue(sw, prop, &val);
724 return val;
725 }
726
727 /*------------------------------------------------------------------------
728 * NAME: UxNewContext
729 * <Allocate a context structure>
730 * INPUT: size -- of the desired structure
731 * isSubclass -- nonzero if the requester is a subclass,
732 * requiring that the result also be
733 * returned for the base.
734 * RETURNS: Pointer to a data area of (at least) the desired size.
735 *------------------------------------------------------------------------*/
736
737 void* UxNewContext (size, isSubclass)
738 size_t size;
739 int isSubclass;
740 {
741 static void* LastSubclassResult = 0;
742 static int LastResultSize = 0;
743
744 void * result;
745
746 if (LastSubclassResult) {
747 result = LastSubclassResult;
748 } else {
749 result = UxMalloc(size);
750 }
751
752 if (isSubclass) {
753 LastSubclassResult = result;
754 if (LastResultSize < size) {
755 LastResultSize = size;
756 }
757 } else {
758 LastSubclassResult = 0;
759 LastResultSize = 0;
760 }
761
762 return (result);
763 }
764 /*--- end of file ---*/