|
Packit |
5bd3a9 |
|
|
Packit |
5bd3a9 |
/***********************************************************
|
|
Packit |
5bd3a9 |
|
|
Packit |
5bd3a9 |
Copyright 1987, 1998 The Open Group
|
|
Packit |
5bd3a9 |
|
|
Packit |
5bd3a9 |
Permission to use, copy, modify, distribute, and sell this software and its
|
|
Packit |
5bd3a9 |
documentation for any purpose is hereby granted without fee, provided that
|
|
Packit |
5bd3a9 |
the above copyright notice appear in all copies and that both that
|
|
Packit |
5bd3a9 |
copyright notice and this permission notice appear in supporting
|
|
Packit |
5bd3a9 |
documentation.
|
|
Packit |
5bd3a9 |
|
|
Packit |
5bd3a9 |
The above copyright notice and this permission notice shall be included in
|
|
Packit |
5bd3a9 |
all copies or substantial portions of the Software.
|
|
Packit |
5bd3a9 |
|
|
Packit |
5bd3a9 |
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
Packit |
5bd3a9 |
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
Packit |
5bd3a9 |
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
Packit |
5bd3a9 |
OPEN GROUP BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN
|
|
Packit |
5bd3a9 |
AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
|
|
Packit |
5bd3a9 |
CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
Packit |
5bd3a9 |
|
|
Packit |
5bd3a9 |
Except as contained in this notice, the name of The Open Group shall not be
|
|
Packit |
5bd3a9 |
used in advertising or otherwise to promote the sale, use or other dealings
|
|
Packit |
5bd3a9 |
in this Software without prior written authorization from The Open Group.
|
|
Packit |
5bd3a9 |
|
|
Packit |
5bd3a9 |
|
|
Packit |
5bd3a9 |
Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
|
|
Packit |
5bd3a9 |
|
|
Packit |
5bd3a9 |
All Rights Reserved
|
|
Packit |
5bd3a9 |
|
|
Packit |
5bd3a9 |
Permission to use, copy, modify, and distribute this software and its
|
|
Packit |
5bd3a9 |
documentation for any purpose and without fee is hereby granted,
|
|
Packit |
5bd3a9 |
provided that the above copyright notice appear in all copies and that
|
|
Packit |
5bd3a9 |
both that copyright notice and this permission notice appear in
|
|
Packit |
5bd3a9 |
supporting documentation, and that the name of Digital not be
|
|
Packit |
5bd3a9 |
used in advertising or publicity pertaining to distribution of the
|
|
Packit |
5bd3a9 |
software without specific, written prior permission.
|
|
Packit |
5bd3a9 |
|
|
Packit |
5bd3a9 |
DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
|
|
Packit |
5bd3a9 |
ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
|
|
Packit |
5bd3a9 |
DIGITAL BE LIABLE FOR ANY SPECIAL, INDIRECT OR CONSEQUENTIAL DAMAGES OR
|
|
Packit |
5bd3a9 |
ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS,
|
|
Packit |
5bd3a9 |
WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION,
|
|
Packit |
5bd3a9 |
ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS
|
|
Packit |
5bd3a9 |
SOFTWARE.
|
|
Packit |
5bd3a9 |
|
|
Packit |
5bd3a9 |
******************************************************************/
|
|
Packit |
5bd3a9 |
|
|
Packit |
5bd3a9 |
#ifdef HAVE_CONFIG_H
|
|
Packit |
5bd3a9 |
#include <config.h>
|
|
Packit |
5bd3a9 |
#endif
|
|
Packit |
5bd3a9 |
#include <X11/Xlibint.h>
|
|
Packit |
5bd3a9 |
#include <X11/Xos.h>
|
|
Packit |
5bd3a9 |
#include <X11/Xutil.h>
|
|
Packit |
5bd3a9 |
#include "Xatomtype.h"
|
|
Packit |
5bd3a9 |
#include <X11/Xatom.h>
|
|
Packit |
5bd3a9 |
#include <stdio.h>
|
|
Packit |
5bd3a9 |
|
|
Packit |
5bd3a9 |
Status XGetSizeHints (
|
|
Packit |
5bd3a9 |
Display *dpy,
|
|
Packit |
5bd3a9 |
Window w,
|
|
Packit |
5bd3a9 |
XSizeHints *hints,
|
|
Packit |
5bd3a9 |
Atom property)
|
|
Packit |
5bd3a9 |
{
|
|
Packit |
5bd3a9 |
xPropSizeHints *prop = NULL;
|
|
Packit |
5bd3a9 |
Atom actual_type;
|
|
Packit |
5bd3a9 |
int actual_format;
|
|
Packit |
5bd3a9 |
unsigned long leftover;
|
|
Packit |
5bd3a9 |
unsigned long nitems;
|
|
Packit |
5bd3a9 |
if (XGetWindowProperty(dpy, w, property, 0L,
|
|
Packit |
5bd3a9 |
(long) OldNumPropSizeElements,
|
|
Packit |
5bd3a9 |
False, XA_WM_SIZE_HINTS, &actual_type, &actual_format,
|
|
Packit |
5bd3a9 |
&nitems, &leftover, (unsigned char **)&prop)
|
|
Packit |
5bd3a9 |
!= Success) return (0);
|
|
Packit |
5bd3a9 |
|
|
Packit |
5bd3a9 |
if ((actual_type != XA_WM_SIZE_HINTS) ||
|
|
Packit |
5bd3a9 |
(nitems < OldNumPropSizeElements) || (actual_format != 32)) {
|
|
Packit |
5bd3a9 |
Xfree (prop);
|
|
Packit |
5bd3a9 |
return(0);
|
|
Packit |
5bd3a9 |
}
|
|
Packit |
5bd3a9 |
hints->flags = (prop->flags & (USPosition|USSize|PAllHints));
|
|
Packit |
5bd3a9 |
hints->x = cvtINT32toInt (prop->x);
|
|
Packit |
5bd3a9 |
hints->y = cvtINT32toInt (prop->y);
|
|
Packit |
5bd3a9 |
hints->width = cvtINT32toInt (prop->width);
|
|
Packit |
5bd3a9 |
hints->height = cvtINT32toInt (prop->height);
|
|
Packit |
5bd3a9 |
hints->min_width = cvtINT32toInt (prop->minWidth);
|
|
Packit |
5bd3a9 |
hints->min_height = cvtINT32toInt (prop->minHeight);
|
|
Packit |
5bd3a9 |
hints->max_width = cvtINT32toInt (prop->maxWidth);
|
|
Packit |
5bd3a9 |
hints->max_height = cvtINT32toInt (prop->maxHeight);
|
|
Packit |
5bd3a9 |
hints->width_inc = cvtINT32toInt (prop->widthInc);
|
|
Packit |
5bd3a9 |
hints->height_inc = cvtINT32toInt (prop->heightInc);
|
|
Packit |
5bd3a9 |
hints->min_aspect.x = cvtINT32toInt (prop->minAspectX);
|
|
Packit |
5bd3a9 |
hints->min_aspect.y = cvtINT32toInt (prop->minAspectY);
|
|
Packit |
5bd3a9 |
hints->max_aspect.x = cvtINT32toInt (prop->maxAspectX);
|
|
Packit |
5bd3a9 |
hints->max_aspect.y = cvtINT32toInt (prop->maxAspectY);
|
|
Packit |
5bd3a9 |
Xfree(prop);
|
|
Packit |
5bd3a9 |
return(1);
|
|
Packit |
5bd3a9 |
}
|
|
Packit |
5bd3a9 |
|
|
Packit |
5bd3a9 |
/*
|
|
Packit |
5bd3a9 |
* must return a pointer to the hint, in malloc'd memory, or routine is not
|
|
Packit |
5bd3a9 |
* extensible; any use of the caller's memory would cause things to be stepped
|
|
Packit |
5bd3a9 |
* on.
|
|
Packit |
5bd3a9 |
*/
|
|
Packit |
5bd3a9 |
|
|
Packit |
5bd3a9 |
XWMHints *XGetWMHints (
|
|
Packit |
5bd3a9 |
Display *dpy,
|
|
Packit |
5bd3a9 |
Window w)
|
|
Packit |
5bd3a9 |
{
|
|
Packit |
5bd3a9 |
xPropWMHints *prop = NULL;
|
|
Packit |
5bd3a9 |
register XWMHints *hints;
|
|
Packit |
5bd3a9 |
Atom actual_type;
|
|
Packit |
5bd3a9 |
int actual_format;
|
|
Packit |
5bd3a9 |
unsigned long leftover;
|
|
Packit |
5bd3a9 |
unsigned long nitems;
|
|
Packit |
5bd3a9 |
if (XGetWindowProperty(dpy, w, XA_WM_HINTS,
|
|
Packit |
5bd3a9 |
0L, (long)NumPropWMHintsElements,
|
|
Packit |
5bd3a9 |
False, XA_WM_HINTS, &actual_type, &actual_format,
|
|
Packit |
5bd3a9 |
&nitems, &leftover, (unsigned char **)&prop)
|
|
Packit |
5bd3a9 |
!= Success) return (NULL);
|
|
Packit |
5bd3a9 |
|
|
Packit |
5bd3a9 |
/* If the property is undefined on the window, return null pointer. */
|
|
Packit |
5bd3a9 |
/* pre-R3 bogusly truncated window_group, don't fail on them */
|
|
Packit |
5bd3a9 |
|
|
Packit |
5bd3a9 |
if ((actual_type != XA_WM_HINTS) ||
|
|
Packit |
5bd3a9 |
(nitems < (NumPropWMHintsElements - 1)) || (actual_format != 32)) {
|
|
Packit |
5bd3a9 |
Xfree (prop);
|
|
Packit |
5bd3a9 |
return(NULL);
|
|
Packit |
5bd3a9 |
}
|
|
Packit |
5bd3a9 |
/* static copies not allowed in library, due to reentrancy constraint*/
|
|
Packit |
5bd3a9 |
if ((hints = Xcalloc (1, sizeof(XWMHints)))) {
|
|
Packit |
5bd3a9 |
hints->flags = prop->flags;
|
|
Packit |
5bd3a9 |
hints->input = (prop->input ? True : False);
|
|
Packit |
5bd3a9 |
hints->initial_state = cvtINT32toInt (prop->initialState);
|
|
Packit |
5bd3a9 |
hints->icon_pixmap = prop->iconPixmap;
|
|
Packit |
5bd3a9 |
hints->icon_window = prop->iconWindow;
|
|
Packit |
5bd3a9 |
hints->icon_x = cvtINT32toInt (prop->iconX);
|
|
Packit |
5bd3a9 |
hints->icon_y = cvtINT32toInt (prop->iconY);
|
|
Packit |
5bd3a9 |
hints->icon_mask = prop->iconMask;
|
|
Packit |
5bd3a9 |
if (nitems >= NumPropWMHintsElements)
|
|
Packit |
5bd3a9 |
hints->window_group = prop->windowGroup;
|
|
Packit |
5bd3a9 |
else
|
|
Packit |
5bd3a9 |
hints->window_group = 0;
|
|
Packit |
5bd3a9 |
}
|
|
Packit |
5bd3a9 |
Xfree (prop);
|
|
Packit |
5bd3a9 |
return(hints);
|
|
Packit |
5bd3a9 |
}
|
|
Packit |
5bd3a9 |
|
|
Packit |
5bd3a9 |
Status
|
|
Packit |
5bd3a9 |
XGetZoomHints (
|
|
Packit |
5bd3a9 |
Display *dpy,
|
|
Packit |
5bd3a9 |
Window w,
|
|
Packit |
5bd3a9 |
XSizeHints *zhints)
|
|
Packit |
5bd3a9 |
{
|
|
Packit |
5bd3a9 |
return (XGetSizeHints(dpy, w, zhints, XA_WM_ZOOM_HINTS));
|
|
Packit |
5bd3a9 |
}
|
|
Packit |
5bd3a9 |
|
|
Packit |
5bd3a9 |
Status
|
|
Packit |
5bd3a9 |
XGetNormalHints (
|
|
Packit |
5bd3a9 |
Display *dpy,
|
|
Packit |
5bd3a9 |
Window w,
|
|
Packit |
5bd3a9 |
XSizeHints *hints)
|
|
Packit |
5bd3a9 |
{
|
|
Packit |
5bd3a9 |
return (XGetSizeHints(dpy, w, hints, XA_WM_NORMAL_HINTS));
|
|
Packit |
5bd3a9 |
}
|
|
Packit |
5bd3a9 |
|
|
Packit |
5bd3a9 |
|
|
Packit |
5bd3a9 |
/*
|
|
Packit |
5bd3a9 |
* XGetIconSizes reads the property
|
|
Packit |
5bd3a9 |
* ICONSIZE_ATOM type: ICONSIZE_ATOM format: 32
|
|
Packit |
5bd3a9 |
*/
|
|
Packit |
5bd3a9 |
|
|
Packit |
5bd3a9 |
Status XGetIconSizes (
|
|
Packit |
5bd3a9 |
Display *dpy,
|
|
Packit |
5bd3a9 |
Window w, /* typically, root */
|
|
Packit |
5bd3a9 |
XIconSize **size_list, /* RETURN */
|
|
Packit |
5bd3a9 |
int *count) /* RETURN number of items on the list */
|
|
Packit |
5bd3a9 |
{
|
|
Packit |
5bd3a9 |
xPropIconSize *prop = NULL;
|
|
Packit |
5bd3a9 |
register xPropIconSize *pp;
|
|
Packit |
5bd3a9 |
register XIconSize *hp, *hints;
|
|
Packit |
5bd3a9 |
Atom actual_type;
|
|
Packit |
5bd3a9 |
int actual_format;
|
|
Packit |
5bd3a9 |
unsigned long leftover;
|
|
Packit |
5bd3a9 |
unsigned long nitems;
|
|
Packit |
5bd3a9 |
register int i;
|
|
Packit |
5bd3a9 |
|
|
Packit |
5bd3a9 |
if (XGetWindowProperty(dpy, w, XA_WM_ICON_SIZE, 0L, 60L,
|
|
Packit |
5bd3a9 |
False, XA_WM_ICON_SIZE, &actual_type, &actual_format,
|
|
Packit |
5bd3a9 |
&nitems, &leftover, (unsigned char **)&prop)
|
|
Packit |
5bd3a9 |
!= Success) return (0);
|
|
Packit |
5bd3a9 |
|
|
Packit |
5bd3a9 |
pp = prop;
|
|
Packit |
5bd3a9 |
|
|
Packit |
5bd3a9 |
if ((actual_type != XA_WM_ICON_SIZE) ||
|
|
Packit |
5bd3a9 |
(nitems < NumPropIconSizeElements) ||
|
|
Packit |
5bd3a9 |
(nitems % NumPropIconSizeElements != 0) ||
|
|
Packit |
5bd3a9 |
(actual_format != 32)) {
|
|
Packit |
5bd3a9 |
Xfree (prop);
|
|
Packit |
5bd3a9 |
return(0);
|
|
Packit |
5bd3a9 |
}
|
|
Packit |
5bd3a9 |
|
|
Packit |
5bd3a9 |
/* static copies not allowed in library, due to reentrancy constraint*/
|
|
Packit |
5bd3a9 |
|
|
Packit |
5bd3a9 |
nitems /= NumPropIconSizeElements;
|
|
Packit |
5bd3a9 |
if (! (hp = hints = Xcalloc (nitems, sizeof(XIconSize)))) {
|
|
Packit |
5bd3a9 |
Xfree (prop);
|
|
Packit |
5bd3a9 |
return 0;
|
|
Packit |
5bd3a9 |
}
|
|
Packit |
5bd3a9 |
|
|
Packit |
5bd3a9 |
/* march down array putting things into native form */
|
|
Packit |
5bd3a9 |
for (i = 0; i < nitems; i++) {
|
|
Packit |
5bd3a9 |
hp->min_width = cvtINT32toInt (pp->minWidth);
|
|
Packit |
5bd3a9 |
hp->min_height = cvtINT32toInt (pp->minHeight);
|
|
Packit |
5bd3a9 |
hp->max_width = cvtINT32toInt (pp->maxWidth);
|
|
Packit |
5bd3a9 |
hp->max_height = cvtINT32toInt (pp->maxHeight);
|
|
Packit |
5bd3a9 |
hp->width_inc = cvtINT32toInt (pp->widthInc);
|
|
Packit |
5bd3a9 |
hp->height_inc = cvtINT32toInt (pp->heightInc);
|
|
Packit |
5bd3a9 |
hp += 1;
|
|
Packit |
5bd3a9 |
pp += 1;
|
|
Packit |
5bd3a9 |
}
|
|
Packit |
5bd3a9 |
*count = nitems;
|
|
Packit |
5bd3a9 |
*size_list = hints;
|
|
Packit |
5bd3a9 |
Xfree (prop);
|
|
Packit |
5bd3a9 |
return(1);
|
|
Packit |
5bd3a9 |
}
|
|
Packit |
5bd3a9 |
|
|
Packit |
5bd3a9 |
|
|
Packit |
5bd3a9 |
Status XGetCommand (
|
|
Packit |
5bd3a9 |
Display *dpy,
|
|
Packit |
5bd3a9 |
Window w,
|
|
Packit |
5bd3a9 |
char ***argvp,
|
|
Packit |
5bd3a9 |
int *argcp)
|
|
Packit |
5bd3a9 |
{
|
|
Packit |
5bd3a9 |
XTextProperty tp;
|
|
Packit |
5bd3a9 |
int argc;
|
|
Packit |
5bd3a9 |
char **argv;
|
|
Packit |
5bd3a9 |
|
|
Packit |
5bd3a9 |
if (!XGetTextProperty (dpy, w, &tp, XA_WM_COMMAND)) return 0;
|
|
Packit |
5bd3a9 |
|
|
Packit |
5bd3a9 |
if (tp.encoding != XA_STRING || tp.format != 8) {
|
|
Packit |
5bd3a9 |
Xfree (tp.value);
|
|
Packit |
5bd3a9 |
return 0;
|
|
Packit |
5bd3a9 |
}
|
|
Packit |
5bd3a9 |
|
|
Packit |
5bd3a9 |
|
|
Packit |
5bd3a9 |
/*
|
|
Packit |
5bd3a9 |
* ignore final <NUL> if present since UNIX WM_COMMAND is nul-terminated
|
|
Packit |
5bd3a9 |
*/
|
|
Packit |
5bd3a9 |
if (tp.nitems && (tp.value[tp.nitems - 1] == '\0')) tp.nitems--;
|
|
Packit |
5bd3a9 |
|
|
Packit |
5bd3a9 |
|
|
Packit |
5bd3a9 |
/*
|
|
Packit |
5bd3a9 |
* create a string list and return if successful
|
|
Packit |
5bd3a9 |
*/
|
|
Packit |
5bd3a9 |
if (!XTextPropertyToStringList (&tp, &argv, &argc)) {
|
|
Packit |
5bd3a9 |
Xfree (tp.value);
|
|
Packit |
5bd3a9 |
return (0);
|
|
Packit |
5bd3a9 |
}
|
|
Packit |
5bd3a9 |
|
|
Packit |
5bd3a9 |
Xfree (tp.value);
|
|
Packit |
5bd3a9 |
*argvp = argv;
|
|
Packit |
5bd3a9 |
*argcp = argc;
|
|
Packit |
5bd3a9 |
return 1;
|
|
Packit |
5bd3a9 |
}
|
|
Packit |
5bd3a9 |
|
|
Packit |
5bd3a9 |
|
|
Packit |
5bd3a9 |
Status
|
|
Packit |
5bd3a9 |
XGetTransientForHint(
|
|
Packit |
5bd3a9 |
Display *dpy,
|
|
Packit |
5bd3a9 |
Window w,
|
|
Packit |
5bd3a9 |
Window *propWindow)
|
|
Packit |
5bd3a9 |
{
|
|
Packit |
5bd3a9 |
Atom actual_type;
|
|
Packit |
5bd3a9 |
int actual_format;
|
|
Packit |
5bd3a9 |
unsigned long nitems;
|
|
Packit |
5bd3a9 |
unsigned long leftover;
|
|
Packit |
5bd3a9 |
Window *data = NULL;
|
|
Packit |
5bd3a9 |
if (XGetWindowProperty(dpy, w, XA_WM_TRANSIENT_FOR, 0L, 1L, False,
|
|
Packit |
5bd3a9 |
XA_WINDOW,
|
|
Packit |
5bd3a9 |
&actual_type,
|
|
Packit |
5bd3a9 |
&actual_format, &nitems, &leftover, (unsigned char **) &data)
|
|
Packit |
5bd3a9 |
!= Success) {
|
|
Packit |
5bd3a9 |
*propWindow = None;
|
|
Packit |
5bd3a9 |
return (0);
|
|
Packit |
5bd3a9 |
}
|
|
Packit |
5bd3a9 |
if ( (actual_type == XA_WINDOW) && (actual_format == 32) &&
|
|
Packit |
5bd3a9 |
(nitems != 0) ) {
|
|
Packit |
5bd3a9 |
*propWindow = *data;
|
|
Packit |
5bd3a9 |
Xfree( (char *) data);
|
|
Packit |
5bd3a9 |
return (1);
|
|
Packit |
5bd3a9 |
}
|
|
Packit |
5bd3a9 |
*propWindow = None;
|
|
Packit |
5bd3a9 |
Xfree( (char *) data);
|
|
Packit |
5bd3a9 |
return(0);
|
|
Packit |
5bd3a9 |
}
|
|
Packit |
5bd3a9 |
|
|
Packit |
5bd3a9 |
Status
|
|
Packit |
5bd3a9 |
XGetClassHint(
|
|
Packit |
5bd3a9 |
Display *dpy,
|
|
Packit |
5bd3a9 |
Window w,
|
|
Packit |
5bd3a9 |
XClassHint *classhint) /* RETURN */
|
|
Packit |
5bd3a9 |
{
|
|
Packit |
5bd3a9 |
int len_name, len_class;
|
|
Packit |
5bd3a9 |
|
|
Packit |
5bd3a9 |
Atom actual_type;
|
|
Packit |
5bd3a9 |
int actual_format;
|
|
Packit |
5bd3a9 |
unsigned long nitems;
|
|
Packit |
5bd3a9 |
unsigned long leftover;
|
|
Packit |
5bd3a9 |
unsigned char *data = NULL;
|
|
Packit |
5bd3a9 |
if (XGetWindowProperty(dpy, w, XA_WM_CLASS, 0L, (long)BUFSIZ, False,
|
|
Packit |
5bd3a9 |
XA_STRING,
|
|
Packit |
5bd3a9 |
&actual_type,
|
|
Packit |
5bd3a9 |
&actual_format, &nitems, &leftover, &data) != Success)
|
|
Packit |
5bd3a9 |
return (0);
|
|
Packit |
5bd3a9 |
|
|
Packit |
5bd3a9 |
if ( (actual_type == XA_STRING) && (actual_format == 8) ) {
|
|
Packit |
5bd3a9 |
len_name = strlen((char *) data);
|
|
Packit |
5bd3a9 |
if (! (classhint->res_name = Xmalloc(len_name + 1))) {
|
|
Packit |
5bd3a9 |
Xfree(data);
|
|
Packit |
5bd3a9 |
return (0);
|
|
Packit |
5bd3a9 |
}
|
|
Packit |
5bd3a9 |
strcpy(classhint->res_name, (char *) data);
|
|
Packit |
5bd3a9 |
if (len_name == nitems) len_name--;
|
|
Packit |
5bd3a9 |
len_class = strlen((char *) (data+len_name+1));
|
|
Packit |
5bd3a9 |
if (! (classhint->res_class = Xmalloc(len_class + 1))) {
|
|
Packit |
5bd3a9 |
Xfree(classhint->res_name);
|
|
Packit |
5bd3a9 |
classhint->res_name = (char *) NULL;
|
|
Packit |
5bd3a9 |
Xfree(data);
|
|
Packit |
5bd3a9 |
return (0);
|
|
Packit |
5bd3a9 |
}
|
|
Packit |
5bd3a9 |
strcpy(classhint->res_class, (char *) (data+len_name+1));
|
|
Packit |
5bd3a9 |
Xfree( (char *) data);
|
|
Packit |
5bd3a9 |
return(1);
|
|
Packit |
5bd3a9 |
}
|
|
Packit |
5bd3a9 |
Xfree( (char *) data);
|
|
Packit |
5bd3a9 |
return(0);
|
|
Packit |
5bd3a9 |
}
|