2 * CDE - Common Desktop Environment
4 * Copyright (c) 1993-2012, The Open Group. All rights reserved.
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)
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
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
23 /* lcPubWrap.c 1.1 - Fujitsu source for CDEnext 95/11/06 20:32:39 */
24 /* $XConsortium: _fallcPubWrap.c /main/1 1996/04/08 15:18:09 cde-fuj $ */
26 * Copyright 1992, 1993 by TOSHIBA Corp.
28 * Permission to use, copy, modify, and distribute this software and its
29 * documentation for any purpose and without fee is hereby granted, provided
30 * that the above copyright notice appear in all copies and that both that
31 * copyright notice and this permission notice appear in supporting
32 * documentation, and that the name of TOSHIBA not be used in advertising
33 * or publicity pertaining to distribution of the software without specific,
34 * written prior permission. TOSHIBA make no representations about the
35 * suitability of this software for any purpose. It is provided "as is"
36 * without express or implied warranty.
38 * TOSHIBA DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
39 * ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
40 * TOSHIBA BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
41 * ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
42 * WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
43 * ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
46 * Author: Katsuhisa Yano TOSHIBA Corp.
47 * mopi@osa.ilab.toshiba.co.jp
50 #include "_fallibint.h"
51 #include "_fallcPubI.h"
53 #if NeedVarargsPrototypes
55 _falGetLCValues(XLCd lcd, ...)
58 _falGetLCValues(lcd, va_alist)
67 XLCdPublicMethodsPart *methods = XLC_PUBLIC_METHODS(lcd);
70 _fallcCountVaList(var, &num_args);
74 _fallcVaToArgList(var, num_args, &args);
77 if (args == (XlcArgList) NULL)
80 ret = (*methods->get_values)(lcd, args, num_args);
91 XLCdPublicMethods methods = (XLCdPublicMethods) lcd->methods;
93 (*methods->pub.destroy)(lcd);
97 _fallcCreateLC(name, methods)
101 XLCdPublicMethods pub_methods = (XLCdPublicMethods) methods;
104 lcd = (*pub_methods->pub.create)(name, methods);
108 if (lcd->core->name == NULL) {
109 lcd->core->name = (char*) Xmalloc(strlen(name) + 1);
110 if (lcd->core->name == NULL)
112 strcpy(lcd->core->name, name);
115 if (lcd->methods == NULL)
116 lcd->methods = methods;
118 if ((*pub_methods->pub.initialize)(lcd) == False)
124 _fallcDestroyLC(lcd);