Revert "dtudcfonted, dtudcexch: delete from repository"
[oweals/cde.git] / cde / programs / dtudcfonted / libfal / _falvarargs.h
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 /* Xvarargs.h 1.1 - Fujitsu source for CDEnext    95/11/06 20:32:13     */
24 /* $XConsortium: _falvarargs.h /main/1 1996/04/08 15:22:42 cde-fuj $ */
25 /*
26
27 Copyright (c) 1985, 1986, 1987, 1988, 1989  X Consortium
28
29 Permission is hereby granted, free of charge, to any person obtaining
30 a copy of this software and associated documentation files (the
31 "Software"), to deal in the Software without restriction, including
32 without limitation the rights to use, copy, modify, merge, publish,
33 distribute, sublicense, and/or sell copies of the Software, and to
34 permit persons to whom the Software is furnished to do so, subject to
35 the following conditions:
36
37 The above copyright notice and this permission notice shall be included
38 in all copies or substantial portions of the Software.
39
40 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
41 OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
42 MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
43 IN NO EVENT SHALL THE X CONSORTIUM BE LIABLE FOR ANY CLAIM, DAMAGES OR
44 OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
45 ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
46 OTHER DEALINGS IN THE SOFTWARE.
47
48 Except as contained in this notice, the name of the X Consortium shall
49 not be used in advertising or otherwise to promote the sale, use or
50 other dealings in this Software without prior written authorization
51 from the X Consortium.
52
53 */
54
55 #ifndef _XVARARGS_H_
56 #define _XVARARGS_H_
57
58 #ifdef __HIGHC__
59 #ifndef _STDARG_H
60 #define _STDARG_H
61
62 typedef char *va_list;
63
64 /* Amount of space required in an argument list for an arg of type TYPE.
65    TYPE may alternatively be an expression whose type is used.  */
66
67 #define __va_rounded_size(TYPE)  \
68   (((sizeof (TYPE) + sizeof (int) - 1) / sizeof (int)) * sizeof (int))
69
70 #define va_start(AP, LASTARG)                                           \
71  (AP = ((char *) &(LASTARG) + __va_rounded_size (LASTARG)))
72
73 #define va_end(AP)
74
75 #define va_arg(AP, TYPE)                                                \
76  (AP += __va_rounded_size (TYPE),                                       \
77   *((TYPE *) (AP - __va_rounded_size (TYPE))))
78
79 #endif /* _STDARG_H */
80
81 #define Va_start(a,b) va_start(a,b)
82
83 #else /* !__HIGHC__ */
84
85 #if NeedVarargsPrototypes
86 # include <stdarg.h>
87 # define Va_start(a,b) va_start(a,b)
88 #else
89 # include <varargs.h>
90 # define Va_start(a,b) va_start(a)
91 #endif
92
93 #endif /* __HIGHC__ */
94
95 #endif /* _XVARARGS_H_ */