home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The World of Computer Software
/
World_Of_Computer_Software-02-385-Vol-1of3.iso
/
x
/
xcolored.zip
/
xcoloredit
/
utilities.c
< prev
next >
Wrap
C/C++ Source or Header
|
1992-01-25
|
3KB
|
100 lines
#ifndef lint
static char sccsid[] = "@(#)utilities.c 1.2 (UKC) 25/1/92";
#endif /* !lint */
/*
* Copyright 1990,1992 Richard Hesketh / rlh2@ukc.ac.uk
* Computing Lab. University of Kent at Canterbury, UK
*
* Permission to use, copy, modify and distribute this software and its
* documentation for any purpose is hereby granted without fee, provided that
* the above copyright notice appear in all copies and that both that
* copyright notice and this permission notice appear in supporting
* documentation, and that the names of Richard Hesketh and The University of
* Kent at Canterbury not be used in advertising or publicity pertaining to
* distribution of the software without specific, written prior permission.
* Richard Hesketh and The University of Kent at Canterbury make no
* representations about the suitability of this software for any purpose.
* It is provided "as is" without express or implied warranty.
*
* Richard Hesketh AND THE UNIVERSITY OF KENT AT CANTERBURY DISCLAIMS ALL
* WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING ALL IMPLIED WARRANTIES
* OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL Richard Hesketh OR THE
* UNIVERSITY OF KENT AT CANTERBURY BE LIABLE FOR ANY SPECIAL, INDIRECT OR
* CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE,
* DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
* TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE
* OF THIS SOFTWARE.
*
* Author: Richard Hesketh / rlh2@ukc.ac.uk,
* Computing Lab. University of Kent at Canterbury, UK
*/
/*
* This file was generated by the DIRT interface editor
* Author: Richard Hesketh / rlh2@ukc.ac.uk
* Version: 1.0 of June 3rd 1989
*
* Generated for rlh2 on Mon Aug 21 09:35:53 1989
*/
#include <X11/Intrinsic.h>
#include <X11/Shell.h>
Display *
XukcToolkitInitialize(dpy_str, app_name, app_class,
argc, argv, options, num_options)
String dpy_str;
String app_name;
String app_class;
Cardinal *argc;
String argv[];
XrmOptionDescRec options[];
Cardinal num_options;
{
Cardinal i;
static Boolean inited = FALSE;
XtAppContext new_context;
Display *dpy;
if (!inited) {
XtToolkitInitialize();
inited = TRUE;
}
new_context = XtCreateApplicationContext();
dpy = XtOpenDisplay(new_context, dpy_str, app_name,
app_class, options, num_options,
argc, argv);
if (dpy == NULL)
XtError("Could not open Display");
return (dpy);
}
void
XukcRegisterApplicationDefaults(screen, defs, n_defs)
Screen *screen;
String defs[];
Cardinal n_defs;
{
XrmDatabase rdb = NULL;
Cardinal i;
for (i = 0; i < n_defs; i++)
XrmPutLineResource(&rdb, defs[i]);
if (rdb != NULL) {
#if defined(XlibSpecificationRelease) && XlibSpecificationRelease > 4
XrmDatabase sdb = XtScreenDatabase(screen);
XrmCombineDatabase(rdb, &sdb, False);
#else
XrmMergeDatabases(DisplayOfScreen(screen)->db, &rdb);
DisplayOfScreen(screen)->db = rdb;
/* original dpy->db has been destroyed */
#endif
}
}