1444c061aSmrg/***********************************************************
2444c061aSmrg
3444c061aSmrgCopyright 1987, 1988, 1998  The Open Group
4444c061aSmrg
5444c061aSmrgPermission to use, copy, modify, distribute, and sell this software and its
6444c061aSmrgdocumentation for any purpose is hereby granted without fee, provided that
7444c061aSmrgthe above copyright notice appear in all copies and that both that
8444c061aSmrgcopyright notice and this permission notice appear in supporting
9444c061aSmrgdocumentation.
10444c061aSmrg
11444c061aSmrgThe above copyright notice and this permission notice shall be included in
12444c061aSmrgall copies or substantial portions of the Software.
13444c061aSmrg
14444c061aSmrgTHE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
15444c061aSmrgIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
16444c061aSmrgFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.  IN NO EVENT SHALL THE
17444c061aSmrgOPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
18444c061aSmrgAN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
19444c061aSmrgCONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
20444c061aSmrg
21444c061aSmrgExcept as contained in this notice, the name of The Open Group shall not be
22444c061aSmrgused in advertising or otherwise to promote the sale, use or other dealings
23444c061aSmrgin this Software without prior written authorization from The Open Group.
24444c061aSmrg
25444c061aSmrgCopyright 1987, 1988 by Digital Equipment Corporation, Maynard, Massachusetts.
26444c061aSmrg
27444c061aSmrg                        All Rights Reserved
28444c061aSmrg
29444c061aSmrgPermission to use, copy, modify, and distribute this software and its
30444c061aSmrgdocumentation for any purpose and without fee is hereby granted,
31444c061aSmrgprovided that the above copyright notice appear in all copies and that
32444c061aSmrgboth that copyright notice and this permission notice appear in
33444c061aSmrgsupporting documentation, and that the name of Digital not be
34444c061aSmrgused in advertising or publicity pertaining to distribution of the
35444c061aSmrgsoftware without specific, written prior permission.
36444c061aSmrg
37444c061aSmrgDIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
38444c061aSmrgALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
39444c061aSmrgDIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
40444c061aSmrgANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
41444c061aSmrgWHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
42444c061aSmrgARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
43444c061aSmrgSOFTWARE.
44444c061aSmrg
45444c061aSmrg******************************************************************/
46444c061aSmrg
47444c061aSmrg#ifdef HAVE_CONFIG_H
48444c061aSmrg#include <config.h>
49444c061aSmrg#endif
50a3bd7f05Smrg#include        "IntrinsicI.h"
51a3bd7f05Smrg#include        <stdio.h>
52444c061aSmrg
53444c061aSmrg/*
54444c061aSmrg * This routine merges two arglists. It does NOT check for duplicate entries.
55444c061aSmrg */
56444c061aSmrg
57a3bd7f05SmrgArgList
58a3bd7f05SmrgXtMergeArgLists(ArgList args1,
59a3bd7f05Smrg                Cardinal num_args1,
60a3bd7f05Smrg                ArgList args2,
61a3bd7f05Smrg                Cardinal num_args2)
62444c061aSmrg{
63444c061aSmrg    ArgList result, args;
64444c061aSmrg
65444c061aSmrg    result = (ArgList) __XtCalloc((unsigned) num_args1 + num_args2,
66a3bd7f05Smrg                                  (unsigned) sizeof(Arg));
67444c061aSmrg
68444c061aSmrg    for (args = result; num_args1 != 0; num_args1--)
69a3bd7f05Smrg        *args++ = *args1++;
70a3bd7f05Smrg    for (; num_args2 != 0; num_args2--)
71a3bd7f05Smrg        *args++ = *args2++;
72444c061aSmrg
73444c061aSmrg    return result;
74444c061aSmrg}
75