sync
This commit is contained in:
parent
50c8bafd9f
commit
ac06c97e30
820 changed files with 467502 additions and 386453 deletions
8
3RDPARTY
8
3RDPARTY
|
@ -1,5 +1,5 @@
|
|||
|
||||
# $OpenBSD: 3RDPARTY,v 1.432 2024/08/04 18:22:48 matthieu Exp $
|
||||
# $OpenBSD: 3RDPARTY,v 1.433 2024/10/06 08:44:04 matthieu Exp $
|
||||
#
|
||||
Package: Freetype
|
||||
Version: 2.13.2
|
||||
|
@ -9,19 +9,19 @@ Archive Site: http://download.savannah.gnu.org/releases/freetype/
|
|||
|
||||
Package: xterm
|
||||
Version: 393
|
||||
Current Vers: 393
|
||||
Current Vers: 394
|
||||
Maintainer: Thomas E. Dickey
|
||||
Archive Site: http://invisible-island.net/xterm/xterm.html
|
||||
|
||||
Package: Mesa
|
||||
Version 23.3.6
|
||||
Current Vers: 24.1.5
|
||||
Current Vers: 24.2.3
|
||||
Maintainer: Brian Paul
|
||||
Archive Site: https://archive.mesa3d.org/
|
||||
|
||||
Package: libdrm
|
||||
Version: 2.4.120
|
||||
Current Vers: 2.4.122
|
||||
Current Vers: 2.4.123
|
||||
Maintainer: Freedesktop.org
|
||||
Archive Site: https://dri.freedesktop.org/libdrm/
|
||||
|
||||
|
|
6
MODULES
6
MODULES
|
@ -1,4 +1,4 @@
|
|||
# $OpenBSD: MODULES,v 1.528 2024/08/12 05:59:08 matthieu Exp $
|
||||
# $OpenBSD: MODULES,v 1.529 2024/10/06 08:44:04 matthieu Exp $
|
||||
#
|
||||
# X.Org maintained modules
|
||||
#
|
||||
|
@ -111,7 +111,7 @@ driver/xf86-video-wsfb 0.4.1
|
|||
|
||||
font/encodings 1.1.0
|
||||
font/adobe-100dpi 1.0.4
|
||||
font/adobe-75dpi 1.0.4
|
||||
font/adobe-75dpi 1.0.4
|
||||
font/adobe-utopia-100dpi 1.0.5
|
||||
font/adobe-utopia-75dpi 1.0.5
|
||||
font/adobe-utopia-type1 1.0.5
|
||||
|
@ -161,7 +161,7 @@ lib/libXext 1.3.6
|
|||
lib/libXfixes 6.0.1
|
||||
lib/libXfont2 2.0.7 needs-update
|
||||
lib/libXft 2.3.8
|
||||
lib/libXi 1.8.1
|
||||
lib/libXi 1.8.2 needs-update
|
||||
lib/libXinerama 1.1.5
|
||||
lib/libXmu 1.2.1
|
||||
lib/libXpm 3.5.17
|
||||
|
|
2
Makefile
2
Makefile
|
@ -25,7 +25,7 @@ build:
|
|||
build:
|
||||
umask ${WOBJUMASK}; exec ${MAKE} do-build
|
||||
|
||||
do-build:
|
||||
do-build:
|
||||
@if [[ `id -u` -ne 0 ]]; then \
|
||||
echo $@ must be called by root >&2; \
|
||||
false; \
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#
|
||||
#
|
||||
# Copyright 2005 Red Hat, Inc.
|
||||
#
|
||||
#
|
||||
# Permission to use, copy, modify, distribute, and sell 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
|
||||
|
@ -10,7 +10,7 @@
|
|||
# specific, written prior permission. Red Hat makes no
|
||||
# representations about the suitability of this software for any purpose. It
|
||||
# is provided "as is" without express or implied warranty.
|
||||
#
|
||||
#
|
||||
# RED HAT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
|
||||
# INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
|
||||
# EVENT SHALL RED HAT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
*
|
||||
*
|
||||
Copyright 1989, 1998 The Open Group
|
||||
|
||||
Permission to use, copy, modify, distribute, and sell this software and its
|
||||
|
@ -54,8 +54,8 @@ usage (int exitval)
|
|||
}
|
||||
|
||||
/* stolen from Xlib Xrm.c */
|
||||
static void
|
||||
PrintBindingQuarkList(XrmBindingList bindings,
|
||||
static void
|
||||
PrintBindingQuarkList(XrmBindingList bindings,
|
||||
XrmQuarkList quarks,
|
||||
FILE* stream)
|
||||
{
|
||||
|
@ -75,12 +75,12 @@ PrintBindingQuarkList(XrmBindingList bindings,
|
|||
/* stolen from Xlib Xrm.c */
|
||||
/* output out the entry in correct file syntax */
|
||||
/*ARGSUSED*/
|
||||
static Bool
|
||||
DumpEntry(XrmDatabase *db,
|
||||
XrmBindingList bindings,
|
||||
XrmQuarkList quarks,
|
||||
XrmRepresentation *type,
|
||||
XrmValuePtr value,
|
||||
static Bool
|
||||
DumpEntry(XrmDatabase *db,
|
||||
XrmBindingList bindings,
|
||||
XrmQuarkList quarks,
|
||||
XrmRepresentation *type,
|
||||
XrmValuePtr value,
|
||||
XPointer data)
|
||||
{
|
||||
FILE *stream = (FILE *)data;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
|
||||
dnl Copyright 2005 Red Hat, Inc.
|
||||
dnl
|
||||
dnl
|
||||
dnl Permission to use, copy, modify, distribute, and sell this software and its
|
||||
dnl documentation for any purpose is hereby granted without fee, provided that
|
||||
dnl the above copyright notice appear in all copies and that both that
|
||||
|
@ -10,7 +10,7 @@ dnl advertising or publicity pertaining to distribution of the software without
|
|||
dnl specific, written prior permission. Red Hat makes no
|
||||
dnl representations about the suitability of this software for any purpose. It
|
||||
dnl is provided "as is" without express or implied warranty.
|
||||
dnl
|
||||
dnl
|
||||
dnl RED HAT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
|
||||
dnl INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
|
||||
dnl EVENT SHALL RED HAT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#
|
||||
#
|
||||
# Copyright 2005 Red Hat, Inc.
|
||||
#
|
||||
#
|
||||
# Permission to use, copy, modify, distribute, and sell 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
|
||||
|
@ -10,7 +10,7 @@
|
|||
# without specific, written prior permission. Red Hat makes no
|
||||
# representations about the suitability of this software for any
|
||||
# purpose. It is provided "as is" without express or implied warranty.
|
||||
#
|
||||
#
|
||||
# RED HAT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
|
||||
# INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN
|
||||
# NO EVENT SHALL RED HAT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
|
||||
|
|
4
app/bdftopcf/config.guess
vendored
4
app/bdftopcf/config.guess
vendored
|
@ -208,10 +208,6 @@ case "${UNAME_MACHINE}:${UNAME_SYSTEM}:${UNAME_RELEASE}:${UNAME_VERSION}" in
|
|||
UNAME_MACHINE_ARCH=`arch | sed 's/OpenBSD.//'`
|
||||
echo ${UNAME_MACHINE_ARCH}-unknown-openbsd${UNAME_RELEASE}
|
||||
exit ;;
|
||||
*:SecBSD:*:*)
|
||||
UNAME_MACHINE_ARCH=`arch | sed 's/SecBSD.//'`
|
||||
echo ${UNAME_MACHINE_ARCH}-unknown-secbsd${UNAME_RELEASE}
|
||||
exit ;;
|
||||
*:ekkoBSD:*:*)
|
||||
echo ${UNAME_MACHINE}-unknown-ekkobsd${UNAME_RELEASE}
|
||||
exit ;;
|
||||
|
|
2
app/bdftopcf/config.sub
vendored
2
app/bdftopcf/config.sub
vendored
|
@ -1363,7 +1363,7 @@ case $os in
|
|||
| -nindy* | -vxsim* | -vxworks* | -ebmon* | -hms* | -mvs* \
|
||||
| -clix* | -riscos* | -uniplus* | -iris* | -rtu* | -xenix* \
|
||||
| -hiux* | -386bsd* | -knetbsd* | -mirbsd* | -netbsd* \
|
||||
| -bitrig* | -openbsd* | -secbsd* | -solidbsd* \
|
||||
| -bitrig* | -openbsd* | -solidbsd* \
|
||||
| -ekkobsd* | -kfreebsd* | -freebsd* | -riscix* | -lynxos* \
|
||||
| -bosx* | -nextstep* | -cxux* | -aout* | -elf* | -oabi* \
|
||||
| -ptx* | -coff* | -ecoff* | -winnt* | -domain* | -vsta* \
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
dnl Copyright 2005 Red Hat, Inc.
|
||||
dnl
|
||||
dnl
|
||||
dnl Permission to use, copy, modify, distribute, and sell this software
|
||||
dnl and its documentation for any purpose is hereby granted without fee,
|
||||
dnl provided that the above copyright notice appear in all copies and
|
||||
|
@ -9,7 +9,7 @@ dnl advertising or publicity pertaining to distribution of the software
|
|||
dnl without specific, written prior permission. Red Hat makes no
|
||||
dnl representations about the suitability of this software for any
|
||||
dnl purpose. It is provided "as is" without express or implied warranty.
|
||||
dnl
|
||||
dnl
|
||||
dnl RED HAT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
|
||||
dnl INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN
|
||||
dnl NO EVENT SHALL RED HAT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
# $Id: Makefile.am,v 1.7 2023/04/10 15:20:48 matthieu Exp $
|
||||
#
|
||||
#
|
||||
# Copyright 2005 Red Hat, Inc.
|
||||
#
|
||||
#
|
||||
# Permission to use, copy, modify, distribute, and sell 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
|
||||
|
@ -11,7 +11,7 @@
|
|||
# specific, written prior permission. Red Hat makes no
|
||||
# representations about the suitability of this software for any purpose. It
|
||||
# is provided "as is" without express or implied warranty.
|
||||
#
|
||||
#
|
||||
# RED HAT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
|
||||
# INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
|
||||
# EVENT SHALL RED HAT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
|
||||
|
|
|
@ -141,7 +141,7 @@ Draw (Moving *mp, int n)
|
|||
{
|
||||
XPoint xp[MAX_POINTS];
|
||||
int i;
|
||||
for (i = 0; i < n; i++)
|
||||
for (i = 0; i < n; i++)
|
||||
{
|
||||
xp[i].x = mp[i].x; xp[i].y = mp[i].y;
|
||||
}
|
||||
|
@ -242,7 +242,7 @@ Timeout (XtPointer closure, XtIntervalId *id)
|
|||
}
|
||||
}
|
||||
|
||||
static void
|
||||
static void
|
||||
StartSaver (void)
|
||||
{
|
||||
if (screen_saved)
|
||||
|
@ -261,13 +261,13 @@ StopSaver (void)
|
|||
screen_saved = False;
|
||||
}
|
||||
|
||||
static int
|
||||
static int
|
||||
ignoreError (Display *dpy, XErrorEvent *error)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
int
|
||||
int
|
||||
main(int argc, char *argv[])
|
||||
{
|
||||
Widget toplevel;
|
||||
|
@ -348,14 +348,14 @@ main(int argc, char *argv[])
|
|||
saver = info->window;
|
||||
if (info->state == ScreenSaverOn)
|
||||
{
|
||||
if (info->kind != ScreenSaverExternal)
|
||||
if (info->kind != ScreenSaverExternal)
|
||||
{
|
||||
XResetScreenSaver (display);
|
||||
XActivateScreenSaver (display);
|
||||
}
|
||||
StartSaver ();
|
||||
}
|
||||
for (;;)
|
||||
for (;;)
|
||||
{
|
||||
XtAppNextEvent (app_con, &event);
|
||||
if (event.type == ss_event) {
|
||||
|
|
1783
app/beforelight/config.guess
vendored
1783
app/beforelight/config.guess
vendored
File diff suppressed because it is too large
Load diff
2954
app/beforelight/config.sub
vendored
2954
app/beforelight/config.sub
vendored
File diff suppressed because it is too large
Load diff
|
@ -1,6 +1,6 @@
|
|||
|
||||
dnl Copyright 2005 Red Hat, Inc.
|
||||
dnl
|
||||
dnl
|
||||
dnl Permission to use, copy, modify, distribute, and sell this software and its
|
||||
dnl documentation for any purpose is hereby granted without fee, provided that
|
||||
dnl the above copyright notice appear in all copies and that both that
|
||||
|
@ -10,7 +10,7 @@ dnl advertising or publicity pertaining to distribution of the software without
|
|||
dnl specific, written prior permission. Red Hat makes no
|
||||
dnl representations about the suitability of this software for any purpose. It
|
||||
dnl is provided "as is" without express or implied warranty.
|
||||
dnl
|
||||
dnl
|
||||
dnl RED HAT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
|
||||
dnl INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
|
||||
dnl EVENT SHALL RED HAT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
|
||||
|
|
1783
app/bitmap/config.guess
vendored
1783
app/bitmap/config.guess
vendored
File diff suppressed because it is too large
Load diff
2954
app/bitmap/config.sub
vendored
2954
app/bitmap/config.sub
vendored
File diff suppressed because it is too large
Load diff
|
@ -735,7 +735,7 @@ kbfunc_menu_ssh(void *ctx, struct cargs *cargs)
|
|||
buf = lbuf;
|
||||
if (buf[slen - 1] == '\n')
|
||||
buf[slen - 1] = '\0';
|
||||
|
||||
|
||||
/* skip hashed hosts */
|
||||
if (strncmp(buf, HASH_MARKER, strlen(HASH_MARKER)) == 0)
|
||||
continue;
|
||||
|
|
|
@ -210,7 +210,7 @@ menu_complete_path(struct menu_ctx *mc)
|
|||
else if (!mr->abort)
|
||||
strlcpy(mr->text, mc->searchstr, sizeof(mr->text));
|
||||
}
|
||||
|
||||
|
||||
menuq_clear(&menuq);
|
||||
|
||||
return mr;
|
||||
|
|
|
@ -71,7 +71,7 @@ static Event * BuildEvent ( ProtocolStream * stream );
|
|||
static void FreeEvent ( Event * event );
|
||||
static char * DispatchEvent ( Event * event );
|
||||
|
||||
|
||||
|
||||
|
||||
/* Function Name: ClientTimedOut
|
||||
* Description: Called if the client takes too long to take our selection.
|
||||
|
@ -96,7 +96,7 @@ ClientTimedOut(XtPointer data, XtIntervalId *id)
|
|||
SetMessage(global_screen_data.info_label, msg);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/* Function Name: GetClientWindow
|
||||
* Description: Gets the Client's window by asking the user.
|
||||
|
@ -169,7 +169,7 @@ GetClientWindow(Widget w, int *x, int *y)
|
|||
return(XmuClientWindow(dpy, target_win));
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/* Function Name: SetCommand
|
||||
* Description: Causes this widget to own the resource editor's
|
||||
|
@ -244,7 +244,7 @@ SetCommand(Widget w, ResCommand command, String msg)
|
|||
ClientTimedOut, (XtPointer) w);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/* Function Name: TellUserAboutMessage
|
||||
* Description: Informs the user that we have sent a message to the client
|
||||
|
@ -285,7 +285,7 @@ TellUserAboutMessage(Widget label, ResCommand command)
|
|||
SetMessage(label, msg);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/* Function Name: ConvertCommand
|
||||
* Description: Converts the command string into a selection that can
|
||||
|
@ -310,7 +310,7 @@ ConvertCommand(Widget w, Atom *selection, Atom *target, Atom *type_ret,
|
|||
return(TRUE);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/* Function Name: SelectionDone
|
||||
* Description: done with the selection.
|
||||
|
@ -325,7 +325,7 @@ SelectionDone(Widget w, Atom *sel, Atom *targ)
|
|||
/* Keep the toolkit from automatically freeing the selection value */
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/* Function Name: LoseSelection
|
||||
* Description: Called when we have lost the selection, asks client
|
||||
|
@ -347,7 +347,7 @@ LoseSelection(Widget w, Atom *sel)
|
|||
NULL, XtLastTimestampProcessed(XtDisplay(w)));
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/* Function Name: GetClientValue
|
||||
* Description: Gets the value out of the client, and does good things
|
||||
|
@ -459,7 +459,7 @@ GetClientValue(Widget w, XtPointer data, Atom *selection, Atom *type,
|
|||
XtFree(error_str);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/* Function Name: BuildHeader
|
||||
* Description: Puts the header into the message.
|
||||
|
@ -529,7 +529,7 @@ BuildHeader(CurrentClient *client_data)
|
|||
stream->size = old_size;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/* Function Name: BuildEvent
|
||||
* Description: Builds the event structure from the
|
||||
|
@ -758,7 +758,7 @@ BuildEvent(ProtocolStream *stream)
|
|||
return(NULL);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/* Function Name: FreeEvent
|
||||
* Description: Frees all memory associated with the event.
|
||||
|
@ -860,7 +860,7 @@ FreeEvent(Event *event)
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/* Function Name: DispatchEvent
|
||||
* Description: Handles the event, calling the proper function.
|
||||
|
@ -903,7 +903,7 @@ DispatchEvent(Event *event)
|
|||
return(error);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/* Function Name: InternAtoms
|
||||
* Description: interns all static atoms.
|
||||
|
|
1783
app/editres/config.guess
vendored
1783
app/editres/config.guess
vendored
File diff suppressed because it is too large
Load diff
2954
app/editres/config.sub
vendored
2954
app/editres/config.sub
vendored
File diff suppressed because it is too large
Load diff
|
@ -53,7 +53,7 @@ in this Software without prior written authorization from The Open Group.
|
|||
|
||||
#include "editresP.h"
|
||||
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* functions.
|
||||
|
@ -74,7 +74,7 @@ static void PopupOnNode ( WNode * node, Widget shell );
|
|||
static void FreeClientData ( Widget w, XtPointer ptr, XtPointer junk );
|
||||
static void FreeResBox ( Widget w, XtPointer ptr, XtPointer junk );
|
||||
|
||||
|
||||
|
||||
|
||||
/* Function Name: RebuildMenusAndLabel
|
||||
* Description: Determines if the user has selected an application
|
||||
|
@ -156,7 +156,7 @@ RebuildMenusAndLabel(const char *toolkit)
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/* Function Name: BuildWidgetTree
|
||||
* Description: Creates all widgets for Editres.
|
||||
|
@ -189,7 +189,7 @@ BuildWidgetTree(Widget parent)
|
|||
global_tree_parent = porthole;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
/* Function Name: CreateTopArea
|
||||
|
@ -229,7 +229,7 @@ CreateTopArea(Widget parent)
|
|||
return(panner);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/* Function Name: SetEntriesInsensitive
|
||||
* Description: Make menu entries unusable.
|
||||
|
@ -244,7 +244,7 @@ SetEntriesSensitive(Widget *entries, int num, Boolean sensitive)
|
|||
int i; for (i=0; i<num; i++) XtSetSensitive(entries[i], sensitive);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/* Function Name: CreateCommandMenu
|
||||
* Description: Creates the command menu.
|
||||
|
@ -311,7 +311,7 @@ CreateCommandMenu(Widget parent, const char *toolkit)
|
|||
SetEntriesSensitive(&CM_entries[CM_OFFSET], CM_NUM, False);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/* Function Name: CreateTreeCommandMenu
|
||||
* Description: Creates the command menu.
|
||||
|
@ -406,7 +406,7 @@ CreateTreeCommandMenu(Widget parent, const char *toolkit)
|
|||
TM_NUM, False);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
static Pixmap old_pixmap;
|
||||
|
||||
|
@ -430,7 +430,7 @@ PrepareToLayoutTree(Widget tree)
|
|||
XtUnmapWidget(tree);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/* Function Name: LayoutTree
|
||||
* Description: Laysout the tree widget.
|
||||
|
@ -450,7 +450,7 @@ LayoutTree(Widget tree)
|
|||
XtSetValues(XtParent(tree), args, ONE);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/************************************************************
|
||||
*
|
||||
|
@ -533,7 +533,7 @@ CreateResourceBoxWidgets(WNode *node, char **names, char **cons_names)
|
|||
PopupOnNode(node, res_box->shell);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/* Function Name: CreateResourceNameForm
|
||||
* Description: Creates the Form widget with children that represent
|
||||
|
@ -672,7 +672,7 @@ CreateResourceNameForm(Widget parent, WNode *node)
|
|||
XtFree((char *)classes);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/* Function Name: SetToggleGroupLeaders
|
||||
* Description: Sets the leaders of each toggle group.
|
||||
|
@ -697,7 +697,7 @@ SetToggleGroupLeaders(WNode *node)
|
|||
SetResourceString(NULL, (XtPointer) node, NULL);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/* Function Name: MakeBoxLookNice
|
||||
* Description: Resizes the box that contains the resource names
|
||||
|
@ -807,7 +807,7 @@ MakeBoxLookNice(Widget dot, Widget star, Widget any, Widget single,
|
|||
XtSetValues(single, args, num_args);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/* Function Name: CreateLists
|
||||
* Description: Creates the list widgets for the normal and constraint
|
||||
|
@ -911,7 +911,7 @@ CreateValueWidget(Widget parent, WNode *node)
|
|||
#endif
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/* Function Name: PopupOnNode
|
||||
* Description: Pops a shell widget up centered on the node specified.
|
||||
|
@ -969,7 +969,7 @@ PopupOnNode(WNode *node, Widget shell)
|
|||
XtPopup(shell, XtGrabNone);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/* Function Name: FreeClientData
|
||||
* Description: Frees the client data passed to this function.
|
||||
|
@ -986,7 +986,7 @@ FreeClientData(Widget w, XtPointer ptr, XtPointer junk)
|
|||
XtFree(ptr);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
/* Function Name: FreeResBox.
|
||||
* Description: Frees resource box allocated memory.
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#
|
||||
#
|
||||
# Copyright 2005 Red Hat, Inc.
|
||||
#
|
||||
#
|
||||
# Permission to use, copy, modify, distribute, and sell 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
|
||||
|
@ -10,7 +10,7 @@
|
|||
# specific, written prior permission. Red Hat makes no
|
||||
# representations about the suitability of this software for any purpose. It
|
||||
# is provided "as is" without express or implied warranty.
|
||||
#
|
||||
#
|
||||
# RED HAT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
|
||||
# INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
|
||||
# EVENT SHALL RED HAT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
|
||||
|
|
1783
app/fonttosfnt/config.guess
vendored
1783
app/fonttosfnt/config.guess
vendored
File diff suppressed because it is too large
Load diff
2954
app/fonttosfnt/config.sub
vendored
2954
app/fonttosfnt/config.sub
vendored
File diff suppressed because it is too large
Load diff
|
@ -38,7 +38,7 @@ static void
|
|||
usage(void)
|
||||
{
|
||||
fprintf(stderr, "Usage:\n");
|
||||
fprintf(stderr,
|
||||
fprintf(stderr,
|
||||
"fonttosfnt [ -v ] [ -c ] [ -b ] [ -r ] [ -g n ] [ -m n ] -o font.otb "
|
||||
"[ -- ] [ font ] ...\n");
|
||||
}
|
||||
|
|
|
@ -106,7 +106,7 @@ readFile(char *filename, FontPtr font)
|
|||
const char *family_name, *encoding_name, *file_format;
|
||||
FontMapPtr mapping = NULL;
|
||||
FontMapReversePtr reverse = NULL;
|
||||
|
||||
|
||||
|
||||
rc = FT_Ensure_Inited();
|
||||
if(rc != 0)
|
||||
|
@ -189,7 +189,7 @@ readFile(char *filename, FontPtr font)
|
|||
if(strcmp(face->style_name, "Regular") == 0)
|
||||
full_name = sprintf_alloc("%s", family_name);
|
||||
else
|
||||
full_name = sprintf_alloc("%s %s",
|
||||
full_name = sprintf_alloc("%s %s",
|
||||
family_name, face->style_name);
|
||||
|
||||
/* The unique name doesn't actually need to be globally
|
||||
|
@ -198,16 +198,16 @@ readFile(char *filename, FontPtr font)
|
|||
if(face->num_fixed_sizes <= 0)
|
||||
unique_name = sprintf_alloc("%s "XVENDORNAMESHORT" bitmap",
|
||||
full_name);
|
||||
else if(face->available_sizes[0].width ==
|
||||
else if(face->available_sizes[0].width ==
|
||||
face->available_sizes[0].height)
|
||||
unique_name = sprintf_alloc("%s "XVENDORNAMESHORT
|
||||
" bitmap size %d",
|
||||
full_name,
|
||||
full_name,
|
||||
face->available_sizes[0].height);
|
||||
else
|
||||
unique_name = sprintf_alloc("%s "XVENDORNAMESHORT
|
||||
" bitmap size %dx%d",
|
||||
full_name,
|
||||
full_name,
|
||||
face->available_sizes[0].width,
|
||||
face->available_sizes[0].height);
|
||||
|
||||
|
@ -313,7 +313,7 @@ readFile(char *filename, FontPtr font)
|
|||
for(int i = 0; i < face->num_fixed_sizes; i++) {
|
||||
if(verbose_flag)
|
||||
fprintf(stderr, "size %d: %dx%d\n",
|
||||
i,
|
||||
i,
|
||||
(int)((face->available_sizes[i].x_ppem + 32) >> 6),
|
||||
(int)((face->available_sizes[i].y_ppem + 32) >> 6));
|
||||
|
||||
|
@ -325,7 +325,7 @@ readFile(char *filename, FontPtr font)
|
|||
return -1;
|
||||
}
|
||||
|
||||
strike = makeStrike(font,
|
||||
strike = makeStrike(font,
|
||||
(face->available_sizes[i].x_ppem + 32) >> 6,
|
||||
(face->available_sizes[i].y_ppem + 32) >> 6);
|
||||
if(strike == NULL) {
|
||||
|
@ -356,7 +356,7 @@ readFile(char *filename, FontPtr font)
|
|||
FT_Pos_DOWN(face->glyph->metrics.horiBearingY),
|
||||
face->glyph->bitmap.width,
|
||||
face->glyph->bitmap.rows,
|
||||
face->glyph->bitmap.pitch,
|
||||
face->glyph->bitmap.pitch,
|
||||
face->glyph->bitmap.buffer,
|
||||
crop_flag);
|
||||
|
||||
|
@ -381,7 +381,7 @@ readFile(char *filename, FontPtr font)
|
|||
found = 1;
|
||||
} else {
|
||||
if(i == 0) {
|
||||
fprintf(stderr,
|
||||
fprintf(stderr,
|
||||
"Warning: no bitmap for the undefined glyph.\n");
|
||||
found = 1;
|
||||
}
|
||||
|
|
|
@ -127,7 +127,7 @@ makeBitmap(StrikePtr strike, int code,
|
|||
int dx, dy, new_width, new_height;
|
||||
|
||||
bitmap = malloc(sizeof(BitmapRec));
|
||||
if(bitmap == NULL)
|
||||
if(bitmap == NULL)
|
||||
return NULL;
|
||||
|
||||
*bitmap = (BitmapRec) {
|
||||
|
@ -260,7 +260,7 @@ makeIndexSubTables(StrikePtr strike, CmapPtr cmap)
|
|||
last = NULL;
|
||||
|
||||
/* Assuming that we're writing bit-aligned data, small metrics
|
||||
and short offsets, a constant metrics segment saves 5 bytes
|
||||
and short offsets, a constant metrics segment saves 5 bytes
|
||||
per glyph in the EBDT table, and 2 bytes per glyph in the EBLC
|
||||
table. On the other hand, the overhead for a supplementary
|
||||
type 2 indexSubTable is 8 bytes for the indexSubTableArray
|
||||
|
@ -295,9 +295,9 @@ makeIndexSubTables(StrikePtr strike, CmapPtr cmap)
|
|||
BitmapPtr b3 = strikeBitmapIndex(strike, cmap, index + n + 3);
|
||||
BitmapPtr b4 = strikeBitmapIndex(strike, cmap, index + n + 4);
|
||||
if(b1 && b2 && b3 && b4 &&
|
||||
SAME_METRICS(bitmap, b1) &&
|
||||
SAME_METRICS(bitmap, b2) &&
|
||||
SAME_METRICS(bitmap, b3) &&
|
||||
SAME_METRICS(bitmap, b1) &&
|
||||
SAME_METRICS(bitmap, b2) &&
|
||||
SAME_METRICS(bitmap, b3) &&
|
||||
SAME_METRICS(bitmap, b4)) {
|
||||
break;
|
||||
}
|
||||
|
@ -363,7 +363,7 @@ makeCmap(FontPtr font)
|
|||
continue;
|
||||
}
|
||||
i = 1;
|
||||
while(code + i < FONT_CODES &&
|
||||
while(code + i < FONT_CODES &&
|
||||
fontIndex(font, code + i) == index + i) {
|
||||
i++;
|
||||
}
|
||||
|
@ -456,16 +456,16 @@ glyphMetrics(FontPtr font, int code,
|
|||
BitmapPtr bitmap = STRIKE_BITMAP(strike, code);
|
||||
if(bitmap) {
|
||||
if(width_return)
|
||||
*width_return =
|
||||
*width_return =
|
||||
(((float)bitmap->advanceWidth) / strike->sizeX) *
|
||||
TWO_SIXTEENTH;
|
||||
if(x_min_return)
|
||||
*x_min_return =
|
||||
((float)bitmap->horiBearingX / strike->sizeX) *
|
||||
((float)bitmap->horiBearingX / strike->sizeX) *
|
||||
TWO_SIXTEENTH;
|
||||
if(y_min_return)
|
||||
*y_min_return =
|
||||
(((float)bitmap->horiBearingY - bitmap->height)
|
||||
(((float)bitmap->horiBearingY - bitmap->height)
|
||||
/ strike->sizeY) * TWO_SIXTEENTH;
|
||||
if(x_max_return)
|
||||
*x_max_return =
|
||||
|
|
|
@ -67,7 +67,7 @@ static int write_error_occurred, read_error_occurred;
|
|||
|
||||
/* floor(log2(x)) */
|
||||
static int
|
||||
log2_floor(int x)
|
||||
log2_floor(int x)
|
||||
{
|
||||
int i, j;
|
||||
|
||||
|
@ -88,7 +88,7 @@ static int
|
|||
two_log2_floor(int x)
|
||||
{
|
||||
int j;
|
||||
|
||||
|
||||
if(x <= 0)
|
||||
abort();
|
||||
|
||||
|
@ -312,7 +312,7 @@ fontMetrics(FontPtr font)
|
|||
* font->metrics.size / font->pxMetrics.size;
|
||||
}
|
||||
|
||||
int
|
||||
int
|
||||
writeFile(char *filename, FontPtr font)
|
||||
{
|
||||
int rc;
|
||||
|
@ -380,11 +380,11 @@ writeFile(char *filename, FontPtr font)
|
|||
tables[i] = makeName("head"); table_writers[i] = writehead; i++;
|
||||
tables[i] = makeName("hhea"); table_writers[i] = writehhea; i++;
|
||||
if(nummetrics >= 1) {
|
||||
tables[i] = makeName("hmtx");
|
||||
tables[i] = makeName("hmtx");
|
||||
table_writers[i] = writehmtx; i++;
|
||||
}
|
||||
if(numglyphs >= 1) {
|
||||
tables[i] = makeName("loca");
|
||||
tables[i] = makeName("loca");
|
||||
table_writers[i] = writeloca; i++;
|
||||
}
|
||||
tables[i] = makeName("maxp"); table_writers[i] = writemaxp; i++;
|
||||
|
@ -533,8 +533,8 @@ fixupChecksum(FILE *out, int full_length, int head_position)
|
|||
return 0;
|
||||
}
|
||||
|
||||
|
||||
static int
|
||||
|
||||
static int
|
||||
writehead(FILE* out, FontPtr font)
|
||||
{
|
||||
int time_hi = 0;
|
||||
|
@ -603,7 +603,7 @@ outputRaster(FILE *out, char *raster, int width, int height, int stride,
|
|||
return len;
|
||||
}
|
||||
|
||||
static int
|
||||
static int
|
||||
writeEBDT(FILE* out, FontPtr font)
|
||||
{
|
||||
StrikePtr strike;
|
||||
|
@ -634,8 +634,8 @@ writeEBDT(FILE* out, FontPtr font)
|
|||
writeBYTE(out, bitmap->advanceWidth);
|
||||
offset += 5;
|
||||
}
|
||||
offset += outputRaster(out,
|
||||
bitmap->raster,
|
||||
offset += outputRaster(out,
|
||||
bitmap->raster,
|
||||
bitmap->width, bitmap->height,
|
||||
bitmap->stride,
|
||||
bit_aligned_flag);
|
||||
|
@ -650,7 +650,7 @@ writeEBDT(FILE* out, FontPtr font)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
static int
|
||||
writeEBLC(FILE* out, FontPtr font)
|
||||
{
|
||||
int numstrikes, eblc_start, num, den;
|
||||
|
@ -666,7 +666,7 @@ writeEBLC(FILE* out, FontPtr font)
|
|||
}
|
||||
|
||||
eblc_start = ftell(out);
|
||||
|
||||
|
||||
writeULONG(out, 0x00020000); /* version */
|
||||
writeULONG(out, numstrikes); /* numSizes */
|
||||
|
||||
|
@ -724,7 +724,7 @@ writeEBLC(FILE* out, FontPtr font)
|
|||
perror("Couldn't seek");
|
||||
return -1;
|
||||
}
|
||||
writeULONG(out, strike->indexSubTableLocation - eblc_start);
|
||||
writeULONG(out, strike->indexSubTableLocation - eblc_start);
|
||||
/* indexSubTableArrayOffset */
|
||||
writeULONG(out, endoffset - strike->indexSubTableLocation);
|
||||
/* indexTablesSize */
|
||||
|
@ -793,12 +793,12 @@ writeEBLC(FILE* out, FontPtr font)
|
|||
writeULONG(out, data_location);
|
||||
if(table->constantMetrics) {
|
||||
int size;
|
||||
BitmapPtr bitmap =
|
||||
strikeBitmapIndex(strike, current_cmap,
|
||||
BitmapPtr bitmap =
|
||||
strikeBitmapIndex(strike, current_cmap,
|
||||
table->firstGlyphIndex);
|
||||
|
||||
size =
|
||||
strikeBitmapIndex(strike, current_cmap,
|
||||
size =
|
||||
strikeBitmapIndex(strike, current_cmap,
|
||||
table->firstGlyphIndex + 1)->location -
|
||||
bitmap->location;
|
||||
writeULONG(out, size); /* imageSize */
|
||||
|
@ -814,7 +814,7 @@ writeEBLC(FILE* out, FontPtr font)
|
|||
} else {
|
||||
for(int i = table->firstGlyphIndex;
|
||||
i <= table->lastGlyphIndex; i++) {
|
||||
int offset =
|
||||
int offset =
|
||||
strikeBitmapIndex(strike, current_cmap, i)->location -
|
||||
data_location;
|
||||
if(short_offsets)
|
||||
|
@ -843,7 +843,7 @@ writeEBLC(FILE* out, FontPtr font)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
static int
|
||||
writecmap(FILE* out, FontPtr font)
|
||||
{
|
||||
int rc, cmap_start, cmap_end;
|
||||
|
@ -876,7 +876,7 @@ writecmap(FILE* out, FontPtr font)
|
|||
writeUSHORT(out, segcount * 2); /* segCountX2 */
|
||||
writeUSHORT(out, 2 * two_log2_floor(segcount)); /* searchRange */
|
||||
writeUSHORT(out, 1 + log2_floor(segcount)); /* entrySelector */
|
||||
writeUSHORT(out, 2 * (segcount - two_log2_floor(segcount)));
|
||||
writeUSHORT(out, 2 * (segcount - two_log2_floor(segcount)));
|
||||
/* rangeShift */
|
||||
|
||||
cmap = current_cmap;
|
||||
|
@ -928,7 +928,7 @@ writecmap(FILE* out, FontPtr font)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
static int
|
||||
writeglyf(FILE* out, FontPtr font)
|
||||
{
|
||||
return 0;
|
||||
|
@ -962,7 +962,7 @@ writehhea(FILE* out, FontPtr font)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
static int
|
||||
writehmtx(FILE* out, FontPtr font)
|
||||
{
|
||||
for(int i = 0; i <= numglyphs; i++) {
|
||||
|
@ -986,7 +986,7 @@ writehmtx(FILE* out, FontPtr font)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
static int
|
||||
writeloca(FILE* out, FontPtr font)
|
||||
{
|
||||
/* All glyphs undefined -- loca table is empty, so offset 0 */
|
||||
|
@ -997,7 +997,7 @@ writeloca(FILE* out, FontPtr font)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
static int
|
||||
writemaxp(FILE* out, FontPtr font)
|
||||
{
|
||||
writeLONG(out, 0x00010000); /* version */
|
||||
|
@ -1018,7 +1018,7 @@ writemaxp(FILE* out, FontPtr font)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
static int
|
||||
writename(FILE* out, FontPtr font)
|
||||
{
|
||||
int offset;
|
||||
|
@ -1041,7 +1041,7 @@ writename(FILE* out, FontPtr font)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
static int
|
||||
writepost(FILE* out, FontPtr font)
|
||||
{
|
||||
int previous_width, fixed_pitch;
|
||||
|
@ -1061,7 +1061,7 @@ writepost(FILE* out, FontPtr font)
|
|||
}
|
||||
previous_width = width;
|
||||
}
|
||||
|
||||
|
||||
writeULONG(out, 0x00030000); /* FormatType */
|
||||
writeULONG(out, font->italicAngle); /* italicAngle */
|
||||
writeSHORT(out, FONT_UNITS(font->metrics.underlinePosition));
|
||||
|
@ -1074,7 +1074,7 @@ writepost(FILE* out, FontPtr font)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
static int
|
||||
writeOS2(FILE* out, FontPtr font)
|
||||
{
|
||||
int i;
|
||||
|
@ -1138,12 +1138,12 @@ writeOS2(FILE* out, FontPtr font)
|
|||
return 0;
|
||||
}
|
||||
|
||||
static int
|
||||
static int
|
||||
writePCLT(FILE* out, FontPtr font)
|
||||
{
|
||||
char name[16] = "X11 font ";
|
||||
char filename[6] = "X11R00";
|
||||
unsigned char charComplement[8] =
|
||||
unsigned char charComplement[8] =
|
||||
{0xFF, 0xFF, 0xFF, 0xFF, 0x0B, 0xFF, 0xFF, 0xFE};
|
||||
int style, w, strokeWeight, widthType;
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# -*- makefile -*-
|
||||
# -*- makefile -*-
|
||||
# $OpenBSD: Makefile.inc,v 1.9 2012/09/30 10:12:51 espie Exp $
|
||||
|
||||
.ifndef FVWM_MAKEFILE_INC
|
||||
|
|
|
@ -221,9 +221,9 @@ char *expand(char *input, char *arguments[],FvwmWindow *tmp_win)
|
|||
l2 = l;
|
||||
|
||||
if(strncasecmp(input, "AddToFunc", 9) == 0 || input[0] == '+')
|
||||
{
|
||||
{
|
||||
addto = 1;
|
||||
}
|
||||
}
|
||||
i=0;
|
||||
while(i<l)
|
||||
{
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/****************************************************************************
|
||||
* This module is all original code
|
||||
* by Rob Nation
|
||||
* This module is all original code
|
||||
* by Rob Nation
|
||||
* Copyright 1993, Robert Nation
|
||||
* You may use this code for any purpose, as long as the original
|
||||
* copyright remains in the source code and all documentation
|
||||
|
@ -47,7 +47,7 @@ void SetFocus(Window w, FvwmWindow *Fw, Bool FocusByMouse)
|
|||
/* remove Fw from list */
|
||||
if (Fw->prev) Fw->prev->next = Fw->next;
|
||||
if (Fw->next) Fw->next->prev = Fw->prev;
|
||||
|
||||
|
||||
/* insert Fw at start */
|
||||
Fw->next = Scr.FvwmRoot.next;
|
||||
if (Scr.FvwmRoot.next) Scr.FvwmRoot.next->prev = Fw;
|
||||
|
@ -57,14 +57,14 @@ void SetFocus(Window w, FvwmWindow *Fw, Bool FocusByMouse)
|
|||
else
|
||||
{
|
||||
/* move the windowlist around so that Fw is at the top */
|
||||
|
||||
|
||||
FvwmWindow *tmp_win;
|
||||
|
||||
|
||||
/* find the window on the windowlist */
|
||||
tmp_win = &Scr.FvwmRoot;
|
||||
tmp_win = &Scr.FvwmRoot;
|
||||
while (tmp_win && tmp_win != Fw)
|
||||
tmp_win = tmp_win->next;
|
||||
|
||||
|
||||
if (tmp_win) /* the window is on the (non-zero length) windowlist */
|
||||
{
|
||||
/* make tmp_win point to the last window on the list */
|
||||
|
@ -83,7 +83,7 @@ void SetFocus(Window w, FvwmWindow *Fw, Bool FocusByMouse)
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if(Scr.NumberOfScreens > 1)
|
||||
{
|
||||
XQueryPointer(dpy, Scr.Root, &JunkRoot, &JunkChild,
|
||||
|
@ -114,15 +114,15 @@ void SetFocus(Window w, FvwmWindow *Fw, Bool FocusByMouse)
|
|||
|
||||
if (Fw != NULL)
|
||||
{
|
||||
/*
|
||||
Make sure at least part of window is on this page
|
||||
/*
|
||||
Make sure at least part of window is on this page
|
||||
before giving it focus...
|
||||
*/
|
||||
if ( (Fw->Desk == Scr.CurrentDesk) &&
|
||||
( ((Fw->frame_x + Fw->frame_width) >= 0 &&
|
||||
( ((Fw->frame_x + Fw->frame_width) >= 0 &&
|
||||
Fw->frame_x < Scr.MyDisplayWidth) &&
|
||||
((Fw->frame_y + Fw->frame_height) >= 0 &&
|
||||
Fw->frame_y < Scr.MyDisplayHeight)
|
||||
((Fw->frame_y + Fw->frame_height) >= 0 &&
|
||||
Fw->frame_y < Scr.MyDisplayHeight)
|
||||
)
|
||||
)
|
||||
{
|
||||
|
@ -178,7 +178,7 @@ void SetFocus(Window w, FvwmWindow *Fw, Bool FocusByMouse)
|
|||
w = Fw->icon_pixmap_w;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if((Fw)&&(Fw->flags & Lenience))
|
||||
{
|
||||
XSetInputFocus (dpy, w, RevertToParent, lastTimestamp);
|
||||
|
|
|
@ -364,7 +364,7 @@ int main(int argc, char **argv)
|
|||
gethostname(client,MAXHOSTNAME);
|
||||
buflen = len+14 + strlen(client);
|
||||
rdisplay_string = safemalloc(buflen);
|
||||
snprintf(rdisplay_string, buflen,
|
||||
snprintf(rdisplay_string, buflen,
|
||||
"HOSTDISPLAY=%s:%s",client,&display_string[9]);
|
||||
putenv(rdisplay_string);
|
||||
}
|
||||
|
|
|
@ -995,8 +995,8 @@ void RaiseWindow(FvwmWindow *t)
|
|||
Motif menus. Instead raise wins[0] only above the topmost window
|
||||
which is managed by us.
|
||||
*/
|
||||
if (wins[0] != Scr.FvwmRoot.stack_next->frame && wins[0] != Scr.FvwmRoot.stack_next->icon_w && wins[0] != Scr.FvwmRoot.stack_next->icon_pixmap_w)
|
||||
{
|
||||
if (wins[0] != Scr.FvwmRoot.stack_next->frame && wins[0] != Scr.FvwmRoot.stack_next->icon_w && wins[0] != Scr.FvwmRoot.stack_next->icon_pixmap_w)
|
||||
{
|
||||
if (Scr.FvwmRoot.stack_next->flags & ICONIFIED)
|
||||
{
|
||||
/*
|
||||
|
|
|
@ -35,7 +35,7 @@ extern struct queue_buff_struct **pipeQueue;
|
|||
#define M_MAP (1<<16)
|
||||
|
||||
/* It turns out this is defined by <sys/stream.h> on Solaris 2.6.
|
||||
I suspect that simply redefining this will lead to trouble;
|
||||
I suspect that simply redefining this will lead to trouble;
|
||||
at some point, these should probably be renamed (FVWM_MSG_ERROR?). */
|
||||
#ifdef M_ERROR
|
||||
# undef M_ERROR
|
||||
|
|
|
@ -597,7 +597,7 @@ Bool PlaceWindow(FvwmWindow *tmp_win, unsigned long tflag,int Desk, int PageX, i
|
|||
/* RBW - allow StartsOnPage to go through, even if iconic. */
|
||||
( ((!((tmp_win->wmhints)&&
|
||||
(tmp_win->wmhints->flags & StateHint)&&
|
||||
(tmp_win->wmhints->initial_state == IconicState)))
|
||||
(tmp_win->wmhints->initial_state == IconicState)))
|
||||
|| (HonorStartsOnPage)) ) )
|
||||
{
|
||||
/* Get user's window placement, unless RandomPlacement is specified */
|
||||
|
|
|
@ -273,7 +273,7 @@ void checkPanFrames(void)
|
|||
}
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
/* check they are the right size */
|
||||
if (edge_thickness != last_edge_thickness) {
|
||||
XResizeWindow (dpy, Scr.PanFrameTop.win, Scr.MyDisplayWidth, edge_thickness);
|
||||
|
@ -425,7 +425,7 @@ void initPanFrames()
|
|||
valuemask, &attributes);
|
||||
Scr.PanFrameTop.isMapped=Scr.PanFrameLeft.isMapped=
|
||||
Scr.PanFrameRight.isMapped= Scr.PanFrameBottom.isMapped=False;
|
||||
|
||||
|
||||
edge_thickness = saved_thickness;
|
||||
}
|
||||
|
||||
|
|
|
@ -56,13 +56,13 @@ install:
|
|||
${DESTDIR}${INCSDIR}/X11/bitmaps" ; \
|
||||
${INSTALL_DATA} ${.CURDIR}/$$f \
|
||||
${DESTDIR}${INCSDIR}/X11/bitmaps ; \
|
||||
done
|
||||
done
|
||||
@for f in ${PIXMAPS}; do \
|
||||
echo "${INSTALL_DATA} $$f \
|
||||
${DESTDIR}${INCSDIR}/X11/pixmaps" ; \
|
||||
${INSTALL_DATA} ${.CURDIR}/$$f \
|
||||
${DESTDIR}${INCSDIR}/X11/pixmaps ; \
|
||||
done
|
||||
done
|
||||
|
||||
clean:
|
||||
|
||||
|
|
|
@ -38,12 +38,12 @@
|
|||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation; either version 2, or (at your option)
|
||||
* any later version.
|
||||
*
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this software; see the file COPYING.GPL. If not, write to
|
||||
* the Free Software Foundation, Inc., 59 Temple Place, Suite 330,
|
||||
|
@ -60,9 +60,9 @@
|
|||
#define SCALE 65535.0
|
||||
#define HALF_SCALE (SCALE / 2)
|
||||
typedef enum {
|
||||
R_MAX_G_MIN, R_MAX_B_MIN,
|
||||
G_MAX_B_MIN, G_MAX_R_MIN,
|
||||
B_MAX_R_MIN, B_MAX_G_MIN
|
||||
R_MAX_G_MIN, R_MAX_B_MIN,
|
||||
G_MAX_B_MIN, G_MAX_R_MIN,
|
||||
B_MAX_R_MIN, B_MAX_G_MIN
|
||||
} MinMaxState;
|
||||
|
||||
|
||||
|
@ -73,9 +73,9 @@ typedef enum {
|
|||
|
||||
/* FIXMS: This can probably be optimized more, examine later. */
|
||||
|
||||
static void
|
||||
color_mult (unsigned short *red,
|
||||
unsigned short *green,
|
||||
static void
|
||||
color_mult (unsigned short *red,
|
||||
unsigned short *green,
|
||||
unsigned short *blue, double k)
|
||||
{
|
||||
if (*red == *green && *red == *blue) {
|
||||
|
@ -129,7 +129,7 @@ color_mult (unsigned short *red,
|
|||
} else {
|
||||
min = r;
|
||||
min_max_state = G_MAX_R_MIN;
|
||||
a = b - r;
|
||||
a = b - r;
|
||||
}
|
||||
} else {
|
||||
max = b;
|
||||
|
@ -138,7 +138,7 @@ color_mult (unsigned short *red,
|
|||
a = g - r;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
delta = max - min;
|
||||
a = a / delta;
|
||||
|
||||
|
@ -149,7 +149,7 @@ color_mult (unsigned short *red,
|
|||
s = 2.0 * SCALE - (max + min);
|
||||
}
|
||||
s = delta/s;
|
||||
|
||||
|
||||
l *= k;
|
||||
if (l > SCALE) {
|
||||
l = SCALE;
|
||||
|
@ -162,7 +162,7 @@ color_mult (unsigned short *red,
|
|||
if (l <= HALF_SCALE) {
|
||||
max = l * (1 + s);
|
||||
} else {
|
||||
max = s * SCALE + l - s * l;
|
||||
max = s * SCALE + l - s * l;
|
||||
}
|
||||
|
||||
min = 2 * l - max;
|
||||
|
@ -204,7 +204,7 @@ color_mult (unsigned short *red,
|
|||
|
||||
*red = (unsigned short) r;
|
||||
*green = (unsigned short) g;
|
||||
*blue = (unsigned short) b;
|
||||
*blue = (unsigned short) b;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@ XFontStruct *GetFontOrFixed(Display *disp, char *fontname)
|
|||
"[GetFontOrFixed]: WARNING -- can't get font %s, trying 'fixed'",
|
||||
fontname);
|
||||
/* fixed should always be avail, so try that */
|
||||
if ((fnt = XLoadQueryFont(disp,"fixed"))==NULL)
|
||||
if ((fnt = XLoadQueryFont(disp,"fixed"))==NULL)
|
||||
{
|
||||
fprintf(stderr,"[GetFontOrFixed]: ERROR -- can't get font 'fixed'");
|
||||
}
|
||||
|
|
|
@ -108,7 +108,7 @@ char *GetArgument(char **pstr)
|
|||
/* skip tok and following whitespace/separators in pstr & DON'T realloc */
|
||||
EatWS(*pstr);
|
||||
|
||||
if (!**pstr)
|
||||
if (!**pstr)
|
||||
*pstr=NULL; /* change \0 to NULL */
|
||||
|
||||
return tok;
|
||||
|
@ -171,11 +171,11 @@ char *GetNextArgument(char *indata,char **token)
|
|||
* Return value is ptr to indata,updated to point to text after the word
|
||||
* which is extracted.
|
||||
* token is the extracted word, which is copied into a malloced
|
||||
* space, and must be freed after use.
|
||||
* space, and must be freed after use.
|
||||
*
|
||||
**************************************************************************/
|
||||
char *GetNextArgument(char *indata,char **token)
|
||||
{
|
||||
{
|
||||
char *t,*start, *end, *text;
|
||||
|
||||
t = indata;
|
||||
|
@ -219,7 +219,7 @@ char *GetNextArgument(char *indata,char **token)
|
|||
{
|
||||
/* Check for qouted text */
|
||||
if(*start == '"')
|
||||
{
|
||||
{
|
||||
start++;
|
||||
while((*start != '"')&&(*start != 0))
|
||||
{
|
||||
|
@ -274,7 +274,7 @@ const char *MatchToken(register const char *s, register const char *w)
|
|||
if (*w=='\0' && /* end of word and */
|
||||
(*s=='\0' || ispunct(*s) || isspace(*s))) /* same in string */
|
||||
return s; /* return endptr */
|
||||
else
|
||||
else
|
||||
return NULL; /* no match */
|
||||
}
|
||||
#endif
|
||||
|
@ -286,7 +286,7 @@ const char *MatchToken(register const char *s, register const char *w)
|
|||
= 0 if s = t
|
||||
> 0 if s > t
|
||||
|
||||
Note arguments are not declares register, so the function can be
|
||||
Note arguments are not declares register, so the function can be
|
||||
used with the bsearch() <search.h> function of the c library.
|
||||
|
||||
*/
|
||||
|
@ -310,7 +310,7 @@ int XCmpToken(char *s, char **t)
|
|||
if ((*s=='\0' && (ispunct(*w) || isspace(*w)))||
|
||||
(*w=='\0' && (ispunct(*s) || isspace(*s))) )
|
||||
return 0; /* 1st word equal */
|
||||
else
|
||||
else
|
||||
return toupper(*s)-toupper(*w); /* smaller/greater */
|
||||
}
|
||||
|
||||
|
|
|
@ -43,13 +43,13 @@ char *CatString3(char *a, char *b, char *c)
|
|||
|
||||
/***************************************************************************
|
||||
* A simple routine to copy a string, stripping spaces and mallocing
|
||||
* space for the new string
|
||||
* space for the new string
|
||||
***************************************************************************/
|
||||
void CopyString(char **dest, char *source)
|
||||
{
|
||||
int len;
|
||||
char *start;
|
||||
|
||||
|
||||
if (source == NULL)
|
||||
{
|
||||
*dest = NULL;
|
||||
|
@ -66,7 +66,7 @@ void CopyString(char **dest, char *source)
|
|||
len++;
|
||||
source++;
|
||||
}
|
||||
|
||||
|
||||
source--;
|
||||
while((isspace(*source))&&(*source != 0)&&(len >0))
|
||||
{
|
||||
|
@ -75,15 +75,15 @@ void CopyString(char **dest, char *source)
|
|||
}
|
||||
*dest = safemalloc(len+1);
|
||||
strncpy(*dest,start,len);
|
||||
(*dest)[len]=0;
|
||||
(*dest)[len]=0;
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
*
|
||||
*
|
||||
* Copies a string into a new, malloc'ed string
|
||||
* Strips leading spaces and trailing spaces and new lines
|
||||
*
|
||||
****************************************************************************/
|
||||
****************************************************************************/
|
||||
char *stripcpy(char *source)
|
||||
{
|
||||
char *tmp,*ptr;
|
||||
|
@ -106,7 +106,7 @@ char *stripcpy(char *source)
|
|||
ptr[len]=0;
|
||||
return ptr;
|
||||
}
|
||||
|
||||
|
||||
int StrEquals(char *s1,char *s2)
|
||||
{
|
||||
if (!s1 && !s2)
|
||||
|
|
|
@ -38,7 +38,7 @@
|
|||
int opt_argc = argc - 6; /* options start at 6th argument for modules */
|
||||
char **opt_argv = argv + 6;
|
||||
|
||||
/* ... (open config file, etc.) */
|
||||
/* ... (open config file, etc.) */
|
||||
|
||||
/* Get global X resources */
|
||||
MergeXResources(NULL, &db, False);
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
/***************************************************************************
|
||||
* Please translate the strings into the language which you use for
|
||||
* Please translate the strings into the language which you use for
|
||||
* your pop-up menus.
|
||||
*
|
||||
* Some decisions about where a function is prohibited (based on
|
||||
* mwm-function-hints) is based on a string comparison between the
|
||||
* Some decisions about where a function is prohibited (based on
|
||||
* mwm-function-hints) is based on a string comparison between the
|
||||
* menu item and the strings below.
|
||||
***************************************************************************/
|
||||
#define MOVE_STRING "move"
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
/***********************************************************************
|
||||
*
|
||||
* Procedure:
|
||||
* safemalloc - mallocs specified space or exits if there's a
|
||||
* safemalloc - mallocs specified space or exits if there's a
|
||||
* problem
|
||||
*
|
||||
***********************************************************************/
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
#include <stdio.h>
|
||||
#include <string.h>
|
||||
|
||||
#ifndef TRUE
|
||||
#ifndef TRUE
|
||||
#define TRUE 1
|
||||
#define FALSE 0
|
||||
#endif
|
||||
|
@ -11,7 +11,7 @@
|
|||
* (including the null string) '?' matches any single char. For use
|
||||
* by filenameforall. Note that '*' matches across directory boundaries
|
||||
*
|
||||
* This code donated by Paul Hudson <paulh@harlequin.co.uk>
|
||||
* This code donated by Paul Hudson <paulh@harlequin.co.uk>
|
||||
* It is public domain, no strings attached. No guarantees either.
|
||||
*
|
||||
*****************************************************************************/
|
||||
|
@ -61,7 +61,7 @@ int matchWildcards(char *pattern, char *string)
|
|||
if (*pattern == '\\')
|
||||
pattern ++; /* has strange, but harmless effects if the last
|
||||
character is a '\\' */
|
||||
if (*pattern++ != *string++)
|
||||
if (*pattern++ != *string++)
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* FvwmBacker Module for Fvwm.
|
||||
/* FvwmBacker Module for Fvwm.
|
||||
*
|
||||
* Copyright 1994, Mike Finger (mfinger@mermaid.micro.umn.edu or
|
||||
* Mike_Finger@atk.com)
|
||||
|
@ -18,7 +18,7 @@
|
|||
* own risk. Permission to use this program for any purpose is given,
|
||||
* as long as the copyright is kept intact. */
|
||||
|
||||
#include "../../libs/fvwmlib.h"
|
||||
#include "../../libs/fvwmlib.h"
|
||||
|
||||
/* Function Prototypes */
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* FvwmWinList Module for Fvwm.
|
||||
/* FvwmWinList Module for Fvwm.
|
||||
*
|
||||
* Copyright 1994, Mike Finger (mfinger@mermaid.micro.umn.edu or
|
||||
* Mike_Finger@atk.com)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* FvwmBacker Module for Fvwm.
|
||||
/* FvwmBacker Module for Fvwm.
|
||||
*
|
||||
* Copyright 1994, Mike Finger (mfinger@mermaid.micro.umn.edu or
|
||||
* Mike_Finger@atk.com)
|
||||
|
|
|
@ -37,5 +37,5 @@ Tells the module to display for \fIsec\fP seconds instead of default of 3.
|
|||
|
||||
|
||||
.SH AUTHOR
|
||||
Robert Nation
|
||||
Robert Nation
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@
|
|||
* Copyright 1993, Robert Nation. No guarantees or warantees or anything
|
||||
* are provided or implied in any way whatsoever. Use this program at your
|
||||
* own risk. Permission to use this program for any purpose is given,
|
||||
* as long as the copyright is kept intact.
|
||||
* as long as the copyright is kept intact.
|
||||
|
||||
*/
|
||||
/***********************************************************************
|
||||
|
@ -93,22 +93,22 @@ void CreateIconWindow(button_info *b)
|
|||
XGCValues gcv;
|
||||
unsigned long gcm=0;
|
||||
Pixmap temp;
|
||||
|
||||
|
||||
gcm = GCForeground | GCBackground;
|
||||
gcv.background=buttonBack(b);
|
||||
gcv.foreground=buttonFore(b);
|
||||
XChangeGC(Dpy,NormalGC,gcm,&gcv);
|
||||
|
||||
|
||||
#ifdef SHAPE
|
||||
XShapeCombineMask(Dpy,b->IconWin,ShapeBounding,0,0,
|
||||
b->icon->picture,ShapeSet);
|
||||
#endif
|
||||
|
||||
|
||||
temp = XCreatePixmap(Dpy,Root,b->icon->width,
|
||||
b->icon->height,d_depth);
|
||||
XCopyPlane(Dpy,b->icon->picture,temp,NormalGC,
|
||||
0,0,b->icon->width,b->icon->height,0,0,1);
|
||||
|
||||
|
||||
XSetWindowBackgroundPixmap(Dpy,b->IconWin,temp);
|
||||
XFreePixmap(Dpy,temp);
|
||||
/* We won't use the icon pixmap anymore... but we still need it for
|
||||
|
@ -177,7 +177,7 @@ void ConfigureIconWindow(button_info *b)
|
|||
yoff=(BH-(h+font->ascent+font->descent))>>1;
|
||||
else
|
||||
yoff=(BH-h)>>1;
|
||||
|
||||
|
||||
if(xoff < framew+xpad)
|
||||
xoff = framew+xpad;
|
||||
if(yoff < framew+ypad)
|
||||
|
@ -188,7 +188,7 @@ void ConfigureIconWindow(button_info *b)
|
|||
|
||||
XMoveResizeWindow(Dpy, b->IconWin, x,y,w,h);
|
||||
|
||||
/* Doesn't this belong above?
|
||||
/* Doesn't this belong above?
|
||||
#ifdef XPM
|
||||
#ifdef SHAPE
|
||||
if (b->icon->mask!=None)
|
||||
|
@ -205,5 +205,5 @@ void ConfigureIconWindow(button_info *b)
|
|||
XSetWindowBackgroundPixmap(Dpy,b->IconWin,b->icon->picture);
|
||||
*/
|
||||
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
|
|
@ -58,7 +58,7 @@ void ConstrainSize (XSizeHints *hints, int *widthp, int *heightp)
|
|||
baseWidth = 1;
|
||||
baseHeight = 1;
|
||||
}
|
||||
|
||||
|
||||
if(hints->flags & PMaxSize)
|
||||
{
|
||||
maxWidth = hints->max_width;
|
||||
|
@ -79,24 +79,24 @@ void ConstrainSize (XSizeHints *hints, int *widthp, int *heightp)
|
|||
xinc = 1;
|
||||
yinc = 1;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* First, clamp to min and max values
|
||||
*/
|
||||
if (dwidth < minWidth) dwidth = minWidth;
|
||||
if (dheight < minHeight) dheight = minHeight;
|
||||
|
||||
|
||||
if (dwidth > maxWidth) dwidth = maxWidth;
|
||||
if (dheight > maxHeight) dheight = maxHeight;
|
||||
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* Second, fit to base + N * inc
|
||||
*/
|
||||
dwidth = ((dwidth - baseWidth) / xinc * xinc) + baseWidth;
|
||||
dheight = ((dheight - baseHeight) / yinc * yinc) + baseHeight;
|
||||
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* Third, adjust for aspect ratio
|
||||
*/
|
||||
|
@ -116,16 +116,16 @@ void ConstrainSize (XSizeHints *hints, int *widthp, int *heightp)
|
|||
*
|
||||
* minAspectX * dheight > minAspectY * dwidth
|
||||
* maxAspectX * dheight < maxAspectY * dwidth
|
||||
*
|
||||
*
|
||||
*/
|
||||
|
||||
|
||||
if (hints->flags & PAspect)
|
||||
{
|
||||
if (minAspectX * dheight > minAspectY * dwidth)
|
||||
{
|
||||
delta = makemult(minAspectX * dheight / minAspectY - dwidth,
|
||||
xinc);
|
||||
if (dwidth + delta <= maxWidth)
|
||||
if (dwidth + delta <= maxWidth)
|
||||
dwidth += delta;
|
||||
else
|
||||
{
|
||||
|
@ -134,7 +134,7 @@ void ConstrainSize (XSizeHints *hints, int *widthp, int *heightp)
|
|||
if (dheight - delta >= minHeight) dheight -= delta;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (maxAspectX * dheight < maxAspectY * dwidth)
|
||||
{
|
||||
delta = makemult(dwidth * maxAspectY / maxAspectX - dheight,
|
||||
|
@ -149,7 +149,7 @@ void ConstrainSize (XSizeHints *hints, int *widthp, int *heightp)
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
*widthp = dwidth;
|
||||
*heightp = dheight;
|
||||
return;
|
||||
|
|
|
@ -40,7 +40,7 @@ void DumpButtons(button_info *b)
|
|||
else
|
||||
fprintf(stderr,"0x%lx(%ix%i@,0x%04lx): ",(unsigned long)b,
|
||||
b->BWidth,b->BHeight,b->flags);
|
||||
|
||||
|
||||
if(b->flags&b_Font)
|
||||
fprintf(stderr,"Font(%s,0x%lx) ",b->font_string,(unsigned long)b->font);
|
||||
if(b->flags&b_Padding)
|
||||
|
@ -267,7 +267,7 @@ void SaveButtons(button_info *b)
|
|||
fprintf(stderr,")");
|
||||
}
|
||||
fprintf(stderr,"\n");
|
||||
|
||||
|
||||
if(b->flags&b_Container)
|
||||
{
|
||||
i=0;
|
||||
|
|
|
@ -1,9 +1,9 @@
|
|||
#include "../../libs/fvwmlib.h"
|
||||
#include "../../libs/fvwmlib.h"
|
||||
|
||||
/*************************************************************************
|
||||
*
|
||||
* Subroutine Prototypes
|
||||
*
|
||||
*
|
||||
*************************************************************************/
|
||||
|
||||
void DeadPipe(int nonsense);
|
||||
|
|
|
@ -3,14 +3,14 @@
|
|||
.SH NAME
|
||||
FvwmForm - input form module for Fvwm
|
||||
.SH SYNOPSIS
|
||||
FvwmForm must be spawned by Fvwm.
|
||||
FvwmForm must be spawned by Fvwm.
|
||||
It will not work from the command line.
|
||||
.SH DESCRIPTION
|
||||
FvwmForm provides a mechanism to get user input and act accordingly.
|
||||
This is achieved by means of a form that the user can fill out,
|
||||
and from which the user can select actions he wants Fvwm to take.
|
||||
A form consists of five types of items:
|
||||
text labels,
|
||||
text labels,
|
||||
single-line text inputs,
|
||||
mutually-exclusive selections,
|
||||
multiple-choice selections,
|
||||
|
@ -162,7 +162,7 @@ FvwmForm will assure only one is selected.
|
|||
.TP 4
|
||||
.B *FvwmFormButton \fItype\fP "\fIstring\fP" [\fIkey\fP]
|
||||
This option specifies an action button.
|
||||
The button has \fIstring\fP as a label,
|
||||
The button has \fIstring\fP as a label,
|
||||
and excutes a set of Fvwm \fIcommand\fP when it is activated.
|
||||
The commands should be specified using the *FvwmFormCommand option.
|
||||
|
||||
|
@ -180,7 +180,7 @@ continue
|
|||
FvwmForm will resume execution after sending the commands.
|
||||
.TP 16
|
||||
restart
|
||||
After sending the commands,
|
||||
After sending the commands,
|
||||
FvwmForm will reset all the values to the initial ones,
|
||||
and then resume execution.
|
||||
.TP 16
|
||||
|
@ -263,7 +263,7 @@ This example simulates the mwm way of confirming logout.
|
|||
Style "QuitVerify" NoTitle, NoHandles, BorderWidth 3
|
||||
|
||||
.SH EXAMPLE 2 - Remote Login
|
||||
This example lets the user type in a hostname,
|
||||
This example lets the user type in a hostname,
|
||||
and optionally a user name on the remote machine,
|
||||
and opens an xterm window from the remote host.
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@ FvwmIconBox is spawned by fvwm, so no command line invocation will work.
|
|||
.SH DESCRIPTION
|
||||
The FvwmIconBox module provides an icon manager. The user can do
|
||||
operations, like iconify and deiconify, for each icon shown in the
|
||||
module via mouse and keyboard.
|
||||
module via mouse and keyboard.
|
||||
|
||||
FvwmIconBox reads the same .fvwmrc file as fvwm reads when it starts up,
|
||||
and looks for lines similar to "*FvwmIconBoxFore green".
|
||||
|
|
|
@ -67,22 +67,22 @@ void CreateIconWindow(struct icon_info *item)
|
|||
|
||||
/* pixmap */
|
||||
if (max_icon_height != 0){
|
||||
item->icon_pixmap_w =
|
||||
XCreateWindow(dpy, icon_win, 0, 0,
|
||||
item->icon_pixmap_w =
|
||||
XCreateWindow(dpy, icon_win, 0, 0,
|
||||
max(max_icon_width,item->icon_w),
|
||||
max(max_icon_height,item->icon_h),
|
||||
max(max_icon_height,item->icon_h),
|
||||
0,CopyFromParent,CopyFromParent,
|
||||
CopyFromParent,valuemask,&attributes);
|
||||
CopyFromParent,valuemask,&attributes);
|
||||
XSelectInput(dpy, item->icon_pixmap_w, ICON_EVENTS);
|
||||
}
|
||||
|
||||
|
||||
/* label */
|
||||
item->IconWin =
|
||||
XCreateWindow(dpy, icon_win, 0, 0,
|
||||
XCreateWindow(dpy, icon_win, 0, 0,
|
||||
max_icon_width,
|
||||
max_icon_height + 10,
|
||||
max_icon_height + 10,
|
||||
0,CopyFromParent,CopyFromParent,
|
||||
CopyFromParent,valuemask,&attributes);
|
||||
CopyFromParent,valuemask,&attributes);
|
||||
XSelectInput(dpy, item->IconWin, ICON_EVENTS);
|
||||
}
|
||||
|
||||
|
@ -104,10 +104,10 @@ void ConfigureIconWindow(struct icon_info *item)
|
|||
|
||||
if (item->icon_file != NULL && (!(item->extra_flags & DEFAULTICON) || !(item->wmhints &&
|
||||
item->wmhints->flags &
|
||||
(IconPixmapHint|IconWindowHint)))){
|
||||
(IconPixmapHint|IconWindowHint)))){
|
||||
/* monochrome bitmap */
|
||||
GetBitmapFile(item);
|
||||
|
||||
|
||||
/* color pixmap */
|
||||
if((item->icon_w == 0)&&(item->icon_h == 0))
|
||||
GetXPMFile(item);
|
||||
|
@ -117,7 +117,7 @@ void ConfigureIconWindow(struct icon_info *item)
|
|||
for his patch to handle icon windows */
|
||||
if((item->icon_h == 0)&&(item->icon_w == 0)&&
|
||||
(item->wmhints) && (item->wmhints->flags & IconWindowHint))
|
||||
GetIconWindow(item);
|
||||
GetIconWindow(item);
|
||||
|
||||
/* icon bitmap from the application */
|
||||
if((item->icon_h == 0)&&(item->icon_w == 0)&&
|
||||
|
@ -128,7 +128,7 @@ void ConfigureIconWindow(struct icon_info *item)
|
|||
#ifdef SHAPE
|
||||
if (item->icon_maskPixmap != None)
|
||||
{
|
||||
XShapeCombineMask(dpy, item->icon_pixmap_w, ShapeBounding,
|
||||
XShapeCombineMask(dpy, item->icon_pixmap_w, ShapeBounding,
|
||||
hr, hr, item->icon_maskPixmap, ShapeSet);
|
||||
}
|
||||
#endif
|
||||
|
@ -137,7 +137,7 @@ void ConfigureIconWindow(struct icon_info *item)
|
|||
if(item->icon_depth == -1)
|
||||
{
|
||||
temp = item->iconPixmap;
|
||||
item->iconPixmap =
|
||||
item->iconPixmap =
|
||||
XCreatePixmap(dpy, Root, item->icon_w,
|
||||
item->icon_h,d_depth);
|
||||
XCopyPlane(dpy,temp,item->iconPixmap,NormalGC,
|
||||
|
@ -148,11 +148,11 @@ void ConfigureIconWindow(struct icon_info *item)
|
|||
void AdjustIconWindow(struct icon_info *item, int n)
|
||||
{
|
||||
int x=0,y=0,w,h,h2,h3,w3;
|
||||
|
||||
|
||||
w3 = w = max_icon_width + icon_relief;
|
||||
h3 = h2 = max_icon_height + icon_relief;
|
||||
h = h2 + 6 + font->ascent + font->descent;
|
||||
|
||||
|
||||
switch (primary){
|
||||
case LEFT:
|
||||
case RIGHT:
|
||||
|
@ -181,7 +181,7 @@ void AdjustIconWindow(struct icon_info *item, int n)
|
|||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
|
||||
item->x = x;
|
||||
item->y = y;
|
||||
|
||||
|
@ -208,10 +208,10 @@ void GetBitmapFile(struct icon_info *item)
|
|||
path = findIconFile(item->icon_file, iconPath,R_OK);
|
||||
if(path == NULL)return;
|
||||
|
||||
if(XReadBitmapFile (dpy, Root,path,(unsigned int *)&item->icon_w,
|
||||
if(XReadBitmapFile (dpy, Root,path,(unsigned int *)&item->icon_w,
|
||||
(unsigned int *)&item->icon_h,
|
||||
&item->iconPixmap,
|
||||
(int *)&HotX,
|
||||
(int *)&HotX,
|
||||
(int *)&HotY) != BitmapSuccess)
|
||||
{
|
||||
item->icon_w = 0;
|
||||
|
@ -242,7 +242,7 @@ void GetXPMFile(struct icon_info *item)
|
|||
XpmImage my_image;
|
||||
|
||||
path = findIconFile(item->icon_file, pixmapPath,R_OK);
|
||||
if(path == NULL)return;
|
||||
if(path == NULL)return;
|
||||
|
||||
XGetWindowAttributes(dpy,Root,&root_attr);
|
||||
xpm_attributes.colormap = root_attr.colormap;
|
||||
|
@ -257,7 +257,7 @@ void GetXPMFile(struct icon_info *item)
|
|||
color_reduce_pixmap(&my_image,save_color_limit);
|
||||
rc = XpmCreatePixmapFromXpmImage(dpy,Root, &my_image,
|
||||
&item->iconPixmap,
|
||||
&item->icon_maskPixmap,
|
||||
&item->icon_maskPixmap,
|
||||
&xpm_attributes);
|
||||
if (rc != XpmSuccess) {
|
||||
fprintf(stderr, "Problem creating pixmap from image, rc %d\n", rc);
|
||||
|
@ -284,9 +284,9 @@ void GetIconWindow(struct icon_info *item)
|
|||
unsigned int bw;
|
||||
Window Junkroot;
|
||||
|
||||
if(!XGetGeometry(dpy, item->wmhints->icon_window, &Junkroot,
|
||||
&x, &y, (unsigned int *)&item->icon_w,
|
||||
(unsigned int *)&item->icon_h,
|
||||
if(!XGetGeometry(dpy, item->wmhints->icon_window, &Junkroot,
|
||||
&x, &y, (unsigned int *)&item->icon_w,
|
||||
(unsigned int *)&item->icon_h,
|
||||
&bw, (unsigned int *)&item->icon_depth))
|
||||
return;
|
||||
|
||||
|
@ -301,7 +301,7 @@ void GetIconWindow(struct icon_info *item)
|
|||
}
|
||||
#endif
|
||||
|
||||
item->icon_w = min(max_icon_width + icon_relief, item->icon_w);
|
||||
item->icon_w = min(max_icon_width + icon_relief, item->icon_w);
|
||||
item->icon_h = min(max_icon_height + icon_relief, item->icon_h);
|
||||
|
||||
XReparentWindow(dpy, item->icon_pixmap_w, icon_win, 0, 0);
|
||||
|
@ -324,7 +324,7 @@ void GetIconBitmap(struct icon_info *item)
|
|||
GC gc;
|
||||
|
||||
if (!XGetGeometry(dpy, item->wmhints->icon_pixmap, &Junkroot, &x, &y,
|
||||
(unsigned int *)&item->icon_w,
|
||||
(unsigned int *)&item->icon_w,
|
||||
(unsigned int *)&item->icon_h, &bw, &depth))
|
||||
return;
|
||||
|
||||
|
@ -343,7 +343,7 @@ void GetIconBitmap(struct icon_info *item)
|
|||
item->icon_h = min(max_icon_height, item->icon_h);
|
||||
|
||||
item->iconPixmap = XCreatePixmap(dpy, Root, item->icon_w,
|
||||
item->icon_h, depth);
|
||||
item->icon_h, depth);
|
||||
gc = XCreateGC(dpy, item->iconPixmap, 0, NULL);
|
||||
XCopyArea(dpy, item->wmhints->icon_pixmap, item->iconPixmap,
|
||||
gc, 0, 0, item->icon_w, item->icon_h, 0, 0);
|
||||
|
@ -372,16 +372,16 @@ Bool GetBackPixmap(void)
|
|||
else{
|
||||
IconwinPixmap = XCreatePixmap(dpy, Root, w, h, d_depth);
|
||||
XCopyPlane(dpy, tmp_bitmap, IconwinPixmap, NormalGC, 0, 0, w, h,
|
||||
0, 0, 1);
|
||||
0, 0, 1);
|
||||
XFreePixmap(dpy, tmp_bitmap);
|
||||
}
|
||||
free(path);
|
||||
}
|
||||
|
||||
|
||||
#ifdef XPM
|
||||
if ( w == 0 && h == 0 && (path = findIconFile(IconwinPixmapFile,
|
||||
pixmapPath,R_OK)) != NULL)
|
||||
{
|
||||
{
|
||||
XGetWindowAttributes(dpy,Root,&root_attr);
|
||||
xpm_attributes.colormap = root_attr.colormap;
|
||||
xpm_attributes.closeness = 40000; /* same closeness used elsewhere */
|
||||
|
|
|
@ -120,7 +120,7 @@ static void set_draw_mode (WinManager *man, int flag)
|
|||
else if (man->we_are_drawing && !flag) {
|
||||
the_manager = man;
|
||||
num = accumulate_walk_hashtab (count_nonsticky_in_hashtab);
|
||||
ConsoleDebug (FVWM, "SetDrawMode on 0x%lx, num = %d\n",
|
||||
ConsoleDebug (FVWM, "SetDrawMode on 0x%lx, num = %d\n",
|
||||
(unsigned long)man, num);
|
||||
|
||||
if (num == 0)
|
||||
|
@ -383,9 +383,9 @@ static void mini_icon (FvwmPacketBody *body)
|
|||
body->mini_icon_data.width, body->mini_icon_data.height);
|
||||
|
||||
|
||||
ConsoleDebug (FVWM, "mini_icon: 0x%lx 0x%lx %dx%dx%d\n",
|
||||
ConsoleDebug (FVWM, "mini_icon: 0x%lx 0x%lx %dx%dx%d\n",
|
||||
(unsigned long) win->pic.picture,
|
||||
(unsigned long) win->pic.mask,
|
||||
(unsigned long) win->pic.mask,
|
||||
win->pic.width, win->pic.height, win->pic.depth);
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -65,7 +65,7 @@ static int num_builtins = sizeof (builtin_functions) / sizeof (FunctionType);
|
|||
/************************************************************************/
|
||||
|
||||
|
||||
struct charstring
|
||||
struct charstring
|
||||
{
|
||||
char key;
|
||||
int value;
|
||||
|
@ -133,19 +133,19 @@ void print_args (int numargs, BuiltinArg *args)
|
|||
break;
|
||||
|
||||
case ButtonArg:
|
||||
ConsoleDebug (CONFIG, "Button: %d %d ",
|
||||
ConsoleDebug (CONFIG, "Button: %d %d ",
|
||||
args[i].value.button_value.offset,
|
||||
args[i].value.button_value.base);
|
||||
break;
|
||||
|
||||
case WindowArg:
|
||||
ConsoleDebug (CONFIG, "Window: %d %d ",
|
||||
ConsoleDebug (CONFIG, "Window: %d %d ",
|
||||
args[i].value.button_value.offset,
|
||||
args[i].value.button_value.base);
|
||||
break;
|
||||
|
||||
case ManagerArg:
|
||||
ConsoleDebug (CONFIG, "Manager: %d %d ",
|
||||
ConsoleDebug (CONFIG, "Manager: %d %d ",
|
||||
args[i].value.button_value.offset,
|
||||
args[i].value.button_value.base);
|
||||
break;
|
||||
|
@ -174,7 +174,7 @@ static void print_binding (Binding *binding)
|
|||
ConsoleDebug (CONFIG, "\tMouse: %d\n", binding->Button_Key);
|
||||
}
|
||||
else {
|
||||
ConsoleDebug (CONFIG, "\tKey or action: %d %s\n", binding->Button_Key,
|
||||
ConsoleDebug (CONFIG, "\tKey or action: %d %s\n", binding->Button_Key,
|
||||
binding->key_name);
|
||||
}
|
||||
|
||||
|
@ -185,7 +185,7 @@ static void print_binding (Binding *binding)
|
|||
while (func) {
|
||||
for (i = 0; i < num_builtins; i++) {
|
||||
if (func->func == builtin_functions[i].func) {
|
||||
ConsoleDebug (CONFIG, "\tFunction: %s %p ",
|
||||
ConsoleDebug (CONFIG, "\tFunction: %s %p ",
|
||||
builtin_functions[i].name, func->func);
|
||||
break;
|
||||
}
|
||||
|
@ -197,7 +197,7 @@ static void print_binding (Binding *binding)
|
|||
func = func->next;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
#endif
|
||||
|
||||
void print_bindings (Binding *list)
|
||||
{
|
||||
|
@ -265,9 +265,9 @@ static int extract_int (char *p, int *n)
|
|||
}
|
||||
|
||||
*n = atoi (p) * sign;
|
||||
|
||||
|
||||
return 1;
|
||||
}
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
*
|
||||
|
@ -276,7 +276,7 @@ static int extract_int (char *p, int *n)
|
|||
* Return value is ptr to indata,updated to point to text after the word
|
||||
* which is extracted.
|
||||
* token is the extracted word, which is copied into a malloced
|
||||
* space, and must be freed after use.
|
||||
* space, and must be freed after use.
|
||||
*
|
||||
**************************************************************************/
|
||||
|
||||
|
@ -344,7 +344,7 @@ static char *parse_button (char *string, BuiltinArg *arg, int *flag,
|
|||
char *rest, *token;
|
||||
ButtonValue *bv;
|
||||
int n;
|
||||
|
||||
|
||||
ConsoleDebug (CONFIG, "parse_term: %s\n", string);
|
||||
|
||||
*flag = 1;
|
||||
|
@ -396,7 +396,7 @@ static char *parse_button (char *string, BuiltinArg *arg, int *flag,
|
|||
*flag = 0;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
Free (token);
|
||||
return rest;
|
||||
}
|
||||
|
@ -405,7 +405,7 @@ static void free_function_list (Function *func)
|
|||
{
|
||||
int i;
|
||||
Function *fp = func;
|
||||
|
||||
|
||||
while (fp) {
|
||||
for (i = 0; i < fp->numargs; i++) {
|
||||
if (fp->args[i].type == StringArg)
|
||||
|
@ -416,7 +416,7 @@ static void free_function_list (Function *func)
|
|||
Free (func);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
static int funccasecmp(const void *key /* actually char* */,
|
||||
const void *member /* actually FunctionType* */)
|
||||
{
|
||||
|
@ -474,7 +474,7 @@ static Function *parse_function (char **line, char *pstop_char)
|
|||
ftype->func = builtin_functions_i->func;
|
||||
ftype->numargs = builtin_functions_i->numargs;
|
||||
ftype->next = NULL;
|
||||
|
||||
|
||||
for (j = 0; j < builtin_functions_i->numargs && *pstop_char != ','; j++) {
|
||||
ftype->args[j].type = builtin_functions_i->args[j];
|
||||
switch (builtin_functions_i->args[j]) {
|
||||
|
@ -488,7 +488,7 @@ static Function *parse_function (char **line, char *pstop_char)
|
|||
return NULL;
|
||||
}
|
||||
if (extract_int (tok, &ftype->args[j].value.int_value) == 0) {
|
||||
ConsoleMessage ("%s: expect integer argument: %s\n",
|
||||
ConsoleMessage ("%s: expect integer argument: %s\n",
|
||||
builtin_functions_i->name, tok);
|
||||
Free (tok);
|
||||
Free(ftype);
|
||||
|
@ -497,7 +497,7 @@ static Function *parse_function (char **line, char *pstop_char)
|
|||
}
|
||||
Free (tok);
|
||||
break;
|
||||
|
||||
|
||||
case StringArg:
|
||||
ptr = DoGetNextToken (ptr, &ftype->args[j].value.string_value,NULL,
|
||||
",", pstop_char);
|
||||
|
@ -511,7 +511,7 @@ static Function *parse_function (char **line, char *pstop_char)
|
|||
}
|
||||
ftype->args[j].type = builtin_functions_i->args[j];
|
||||
break;
|
||||
|
||||
|
||||
case ButtonArg:
|
||||
case WindowArg:
|
||||
case ManagerArg:
|
||||
|
@ -525,7 +525,7 @@ static Function *parse_function (char **line, char *pstop_char)
|
|||
}
|
||||
ftype->args[j].type = builtin_functions_i->args[j];
|
||||
break;
|
||||
|
||||
|
||||
/* JmpArg can be a string or an int. However, if 'JmpArg'
|
||||
* is recorded as the argument type in the argument array
|
||||
* for a command, it means it is a string; the code for
|
||||
|
@ -553,7 +553,7 @@ static Function *parse_function (char **line, char *pstop_char)
|
|||
Free(tok);
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
default:
|
||||
ConsoleMessage ("internal error in parse_function\n");
|
||||
Free(ftype);
|
||||
|
@ -561,18 +561,18 @@ static Function *parse_function (char **line, char *pstop_char)
|
|||
return NULL;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (j != builtin_functions_i->numargs) {
|
||||
ConsoleMessage ("%s: too few arguments\n", builtin_functions_i->name);
|
||||
Free(ftype);
|
||||
*line = NULL;
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
*line = ptr;
|
||||
return ftype;
|
||||
}
|
||||
|
||||
|
||||
ConsoleMessage ("Unknown function: %s\n", name);
|
||||
Free (name);
|
||||
|
||||
|
@ -661,7 +661,7 @@ static Function *parse_function_list (char *line)
|
|||
ConsoleMessage ("No function defined\n");
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
|
||||
Binding *ParseMouseEntry (char *tline)
|
||||
{
|
||||
|
@ -672,25 +672,25 @@ Binding *ParseMouseEntry (char *tline)
|
|||
int mods;
|
||||
|
||||
/* tline points after the key word "key" */
|
||||
action = DoGetNextToken(tline,&token, NULL, ",", NULL);
|
||||
action = DoGetNextToken(tline,&token, NULL, ",", NULL);
|
||||
if(token != NULL) {
|
||||
n1 = sscanf(token,"%d",&button);
|
||||
Free(token);
|
||||
}
|
||||
|
||||
action = DoGetNextToken(action,&token, NULL, ",", NULL);
|
||||
action = DoGetNextToken(action,&token, NULL, ",", NULL);
|
||||
if(token != NULL) {
|
||||
n2 = sscanf(token,"%19s",modifiers);
|
||||
Free(token);
|
||||
}
|
||||
if((n1 != 1)||(n2 != 1))
|
||||
ConsoleMessage ("Mouse binding: Syntax error");
|
||||
|
||||
|
||||
find_context(modifiers,&mods,key_modifiers,tline);
|
||||
if((mods & AnyModifier)&&(mods&(~AnyModifier))) {
|
||||
ConsoleMessage ("Binding specified AnyModifier and other modifers too. Excess modifiers will be ignored.");
|
||||
}
|
||||
|
||||
|
||||
new = (Binding *)safemalloc(sizeof(Binding));
|
||||
new->IsMouse = 1;
|
||||
new->Button_Key = button;
|
||||
|
@ -700,7 +700,7 @@ Binding *ParseMouseEntry (char *tline)
|
|||
new->Function = parse_function_list (action);
|
||||
new->NextBinding = NULL;
|
||||
new->LastBinding = new;
|
||||
|
||||
|
||||
if (!new->Function) {
|
||||
ConsoleMessage ("Bad action: %s\n", action);
|
||||
Free (new->Action);
|
||||
|
@ -727,13 +727,13 @@ static Binding *ParseKeyEntry (char *tline)
|
|||
/* tline points after the key word "key" */
|
||||
ptr = tline;
|
||||
|
||||
ptr = DoGetNextToken(ptr,&token, NULL, ",", NULL);
|
||||
ptr = DoGetNextToken(ptr,&token, NULL, ",", NULL);
|
||||
if(token != NULL) {
|
||||
n1 = sscanf(token,"%19s",key);
|
||||
Free(token);
|
||||
}
|
||||
|
||||
action = DoGetNextToken(ptr,&token, NULL, ",", NULL);
|
||||
|
||||
action = DoGetNextToken(ptr,&token, NULL, ",", NULL);
|
||||
if(token != NULL) {
|
||||
n2 = sscanf(token,"%19s",modifiers);
|
||||
Free(token);
|
||||
|
@ -751,13 +751,13 @@ static Binding *ParseKeyEntry (char *tline)
|
|||
* Don't let a 0 keycode go through, since that means AnyKey to the
|
||||
* XGrabKey call in GrabKeys().
|
||||
*/
|
||||
if ((keysym = XStringToKeysym(key)) == NoSymbol ||
|
||||
if ((keysym = XStringToKeysym(key)) == NoSymbol ||
|
||||
XKeysymToKeycode(theDisplay, keysym) == 0) {
|
||||
ConsoleMessage ("Can't find keysym: %s\n", key);
|
||||
return NULL;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
XDisplayKeycodes(theDisplay, &min, &max);
|
||||
for (i=min; i<=max; i++) {
|
||||
if (XKeycodeToKeysym(theDisplay, i, 0) == keysym) {
|
||||
|
@ -893,13 +893,13 @@ static char *read_next_cmd (ReadOption flag)
|
|||
retstring = cur_pos;
|
||||
cur_pos += ModuleLen;
|
||||
displaced = *cur_pos;
|
||||
if (displaced == '*')
|
||||
if (displaced == '*')
|
||||
status = READ_OPTION;
|
||||
else if (displaced == '\0')
|
||||
status = READ_LINE;
|
||||
else if (iswhite (displaced))
|
||||
status = READ_ARG;
|
||||
else
|
||||
else
|
||||
status = READ_LINE;
|
||||
break;
|
||||
}
|
||||
|
@ -909,7 +909,7 @@ static char *read_next_cmd (ReadOption flag)
|
|||
case READ_OPTION:
|
||||
*cur_pos = displaced;
|
||||
retstring = ++cur_pos;
|
||||
while (*cur_pos != '*' && !iswhite (*cur_pos))
|
||||
while (*cur_pos != '*' && !iswhite (*cur_pos))
|
||||
cur_pos++;
|
||||
displaced = *cur_pos;
|
||||
*cur_pos = '\0';
|
||||
|
@ -919,7 +919,7 @@ static char *read_next_cmd (ReadOption flag)
|
|||
status = READ_LINE;
|
||||
else if (iswhite (displaced))
|
||||
status = READ_ARG;
|
||||
else
|
||||
else
|
||||
status = READ_LINE;
|
||||
break;
|
||||
|
||||
|
@ -935,7 +935,7 @@ static char *read_next_cmd (ReadOption flag)
|
|||
status = READ_LINE;
|
||||
else if (iswhite (displaced))
|
||||
status = READ_ARG;
|
||||
else
|
||||
else
|
||||
status = READ_LINE;
|
||||
break;
|
||||
|
||||
|
@ -1020,8 +1020,8 @@ static NameType parse_format_dependencies (char *format)
|
|||
static void handle_button_config (int manager, int context, char *option)
|
||||
{
|
||||
char *p;
|
||||
ButtonState state;
|
||||
|
||||
ButtonState state;
|
||||
|
||||
p = read_next_cmd (READ_ARG);
|
||||
if (!p) {
|
||||
ConsoleMessage ("Bad line: %s\n", current_line);
|
||||
|
@ -1048,7 +1048,7 @@ static void handle_button_config (int manager, int context, char *option)
|
|||
ConsoleMessage ("This isn't a valid button state: %s\n", p);
|
||||
return;
|
||||
}
|
||||
ConsoleDebug (CONFIG, "Setting buttonState[%s] to %s\n",
|
||||
ConsoleDebug (CONFIG, "Setting buttonState[%s] to %s\n",
|
||||
contextDefaults[context].name, p);
|
||||
SET_MANAGER (manager, buttonState[context], state);
|
||||
|
||||
|
@ -1056,18 +1056,18 @@ static void handle_button_config (int manager, int context, char *option)
|
|||
p = read_next_cmd (READ_ARG);
|
||||
if ( !p )
|
||||
return;
|
||||
|
||||
SET_MANAGER (manager, foreColorName[context],
|
||||
|
||||
SET_MANAGER (manager, foreColorName[context],
|
||||
copy_string (&globals.managers[id].foreColorName[context], p));
|
||||
|
||||
/* check for optional back color */
|
||||
p = read_next_cmd (READ_ARG);
|
||||
if ( !p )
|
||||
return;
|
||||
|
||||
|
||||
ConsoleDebug (CONFIG, "Setting backColorName[%s] to %s\n",
|
||||
contextDefaults[context].name, p);
|
||||
SET_MANAGER (manager, backColorName[context],
|
||||
SET_MANAGER (manager, backColorName[context],
|
||||
copy_string (&globals.managers[id].backColorName[context], p));
|
||||
}
|
||||
|
||||
|
@ -1131,7 +1131,7 @@ void read_in_resources (char *file)
|
|||
ConsoleDebug (CONFIG, "In transient mode. Ignoring this line\n");
|
||||
continue;
|
||||
}
|
||||
if (extract_int (option1, &manager) == 0 ||
|
||||
if (extract_int (option1, &manager) == 0 ||
|
||||
manager <= 0 || manager > globals.num_managers) {
|
||||
ConsoleMessage ("Bad line: %s\n", current_line);
|
||||
ConsoleMessage ("This is not a valid manager: %s.\n", option1);
|
||||
|
@ -1191,7 +1191,7 @@ void read_in_resources (char *file)
|
|||
ConsoleMessage ("Need an action\n");
|
||||
continue;
|
||||
}
|
||||
|
||||
|
||||
switch (i) {
|
||||
case MOUSE:
|
||||
binding = ParseMouseEntry (q);
|
||||
|
@ -1235,8 +1235,8 @@ void read_in_resources (char *file)
|
|||
ConsoleDebug (CONFIG, "default background: %s\n", p);
|
||||
|
||||
for ( i = 0; i < NUM_CONTEXTS; i++ )
|
||||
SET_MANAGER (manager, backColorName[i],
|
||||
conditional_copy_string (&globals.managers[id].backColorName[i],
|
||||
SET_MANAGER (manager, backColorName[i],
|
||||
conditional_copy_string (&globals.managers[id].backColorName[i],
|
||||
p));
|
||||
}
|
||||
else if (!strcasecmp (option1, "buttongeometry")) {
|
||||
|
@ -1246,7 +1246,7 @@ void read_in_resources (char *file)
|
|||
continue;
|
||||
}
|
||||
|
||||
SET_MANAGER (manager, button_geometry_str,
|
||||
SET_MANAGER (manager, button_geometry_str,
|
||||
copy_string (&globals.managers[id].button_geometry_str, p));
|
||||
}
|
||||
else if (!strcasecmp (option1, "dontshow")) {
|
||||
|
@ -1335,7 +1335,7 @@ void read_in_resources (char *file)
|
|||
}
|
||||
ConsoleDebug (CONFIG, "font: %s\n", p);
|
||||
|
||||
SET_MANAGER (manager, fontname,
|
||||
SET_MANAGER (manager, fontname,
|
||||
copy_string (&globals.managers[id].fontname, p));
|
||||
}
|
||||
else if (!strcasecmp (option1, "foreground")) {
|
||||
|
@ -1347,8 +1347,8 @@ void read_in_resources (char *file)
|
|||
ConsoleDebug (CONFIG, "default foreground: %s\n", p);
|
||||
|
||||
for ( i = 0; i < NUM_CONTEXTS; i++ )
|
||||
SET_MANAGER (manager, foreColorName[i],
|
||||
conditional_copy_string (&globals.managers[id].foreColorName[i],
|
||||
SET_MANAGER (manager, foreColorName[i],
|
||||
conditional_copy_string (&globals.managers[id].foreColorName[i],
|
||||
p));
|
||||
}
|
||||
else if (!strcasecmp (option1, "format")) {
|
||||
|
@ -1366,7 +1366,7 @@ void read_in_resources (char *file)
|
|||
token = (char *)safemalloc(1);
|
||||
*token = 0;
|
||||
}
|
||||
|
||||
|
||||
SET_MANAGER (manager, formatstring,
|
||||
copy_string (&globals.managers[id].formatstring, token));
|
||||
flags = parse_format_dependencies (token);
|
||||
|
@ -1390,7 +1390,7 @@ void read_in_resources (char *file)
|
|||
token = (char *)safemalloc(1);
|
||||
*token = 0;
|
||||
}
|
||||
|
||||
|
||||
SET_MANAGER (manager, iconname,
|
||||
copy_string (&globals.managers[id].iconname, token));
|
||||
Free (token);
|
||||
|
@ -1402,7 +1402,7 @@ void read_in_resources (char *file)
|
|||
continue;
|
||||
}
|
||||
|
||||
SET_MANAGER (manager, geometry_str,
|
||||
SET_MANAGER (manager, geometry_str,
|
||||
copy_string (&globals.managers[id].geometry_str, p));
|
||||
}
|
||||
else if (!strcasecmp (option1, "resolution")) {
|
||||
|
@ -1494,9 +1494,9 @@ void read_in_resources (char *file)
|
|||
if (!strcasecmp (p, "name")) {
|
||||
i = SortName;
|
||||
}
|
||||
else if (!strcasecmp (p, "namewithcase")) {
|
||||
i = SortNameCase;
|
||||
}
|
||||
else if (!strcasecmp (p, "namewithcase")) {
|
||||
i = SortNameCase;
|
||||
}
|
||||
else if (!strcasecmp (p, "id")) {
|
||||
i = SortId;
|
||||
}
|
||||
|
@ -1531,7 +1531,7 @@ void read_in_resources (char *file)
|
|||
token = (char *)safemalloc(1);
|
||||
*token = 0;
|
||||
}
|
||||
|
||||
|
||||
SET_MANAGER (manager, titlename,
|
||||
copy_string (&globals.managers[id].titlename, token));
|
||||
Free (token);
|
||||
|
|
|
@ -36,7 +36,7 @@ void print_stringlist (StringList *list)
|
|||
case CLASS_NAME:
|
||||
s = "class";
|
||||
break;
|
||||
|
||||
|
||||
default:
|
||||
s = "unknown type";
|
||||
}
|
||||
|
@ -73,7 +73,7 @@ void add_to_stringlist (StringList *list, char *s)
|
|||
type = ALL_NAME;
|
||||
}
|
||||
|
||||
ConsoleDebug (WINLIST, "add_to_stringlist: %s %s\n",
|
||||
ConsoleDebug (WINLIST, "add_to_stringlist: %s %s\n",
|
||||
type == ALL_NAME ? "all" : s, pat);
|
||||
|
||||
new = (StringEl *)safemalloc (sizeof (StringEl));
|
||||
|
@ -91,14 +91,14 @@ void add_to_stringlist (StringList *list, char *s)
|
|||
ConsoleDebug (WINLIST, "Exiting add_to_stringlist\n");
|
||||
}
|
||||
|
||||
static int matches_string (NameType type, char *pattern, char *tname,
|
||||
static int matches_string (NameType type, char *pattern, char *tname,
|
||||
char *iname, char *rname, char *cname)
|
||||
{
|
||||
int ans = 0;
|
||||
|
||||
ConsoleDebug (WINLIST, "matches_string: type: 0x%x pattern: %s\n",
|
||||
|
||||
ConsoleDebug (WINLIST, "matches_string: type: 0x%x pattern: %s\n",
|
||||
type, pattern);
|
||||
ConsoleDebug (WINLIST, "\tstrings: %s:%s %s:%s\n", tname, iname,
|
||||
ConsoleDebug (WINLIST, "\tstrings: %s:%s %s:%s\n", tname, iname,
|
||||
rname, cname);
|
||||
|
||||
if (tname && (type == ALL_NAME || type == TITLE_NAME)) {
|
||||
|
@ -137,14 +137,14 @@ static int iconmanager_show (WinManager *man, char *tname, char *iname,
|
|||
|
||||
for (string = man->dontshow.list; string; string = string->next) {
|
||||
ConsoleDebug (WINLIST, "Matching: %s\n", string->string);
|
||||
if (matches_string (string->type, string->string, tname, iname,
|
||||
if (matches_string (string->type, string->string, tname, iname,
|
||||
rname, cname)) {
|
||||
ConsoleDebug (WINLIST, "Dont show\n");
|
||||
in_dontshowlist = 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
if (!in_dontshowlist) {
|
||||
if (man->show.list == NULL) {
|
||||
in_showlist = 1;
|
||||
|
@ -202,7 +202,7 @@ void free_windata (WinData *p)
|
|||
globals.select_win = NULL;
|
||||
abort();
|
||||
}
|
||||
|
||||
|
||||
Free (p->resname);
|
||||
Free (p->classname);
|
||||
Free (p->iconname);
|
||||
|
@ -275,7 +275,7 @@ int check_win_complete (WinData *p)
|
|||
ConsoleDebug (WINLIST, "\tcomplete: 0\n\n");
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
void init_winlists (void)
|
||||
{
|
||||
int i;
|
||||
|
@ -294,7 +294,7 @@ void delete_win_hashtab (WinData *win)
|
|||
entry = win->app_id & 0xff;
|
||||
list = &hash_tab[entry];
|
||||
|
||||
if (win->win_prev)
|
||||
if (win->win_prev)
|
||||
win->win_prev->win_next = win->win_next;
|
||||
else
|
||||
list->head = win->win_next;
|
||||
|
@ -303,7 +303,7 @@ void delete_win_hashtab (WinData *win)
|
|||
else
|
||||
list->tail = win->win_prev;
|
||||
list->n--;
|
||||
}
|
||||
}
|
||||
|
||||
void insert_win_hashtab (WinData *win)
|
||||
{
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#include "../../libs/fvwmlib.h"
|
||||
#include "../../libs/fvwmlib.h"
|
||||
#define STICKY (1<<2) /* Does window stick to glass? */
|
||||
#define ONTOP (1<<1) /* does window stay on top */
|
||||
#define BORDER (1<<13) /* Is this decorated with border*/
|
||||
|
@ -38,7 +38,7 @@ struct Item
|
|||
/*************************************************************************
|
||||
*
|
||||
* Subroutine Prototypes
|
||||
*
|
||||
*
|
||||
*************************************************************************/
|
||||
void Loop(int *fd);
|
||||
void SendInfo(int *fd,char *message,unsigned long window);
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
/*************************************************************************
|
||||
*
|
||||
* Subroutine Prototypes
|
||||
*
|
||||
*
|
||||
*************************************************************************/
|
||||
void DeadPipe(int nonsense);
|
||||
|
||||
|
|
|
@ -115,13 +115,13 @@ int is_suitable_window(unsigned long *body)
|
|||
|
||||
if ((flags&MAXIMIZED) && !maximized)
|
||||
return 0;
|
||||
|
||||
|
||||
if ((flags&STICKY) && !sticky)
|
||||
return 0;
|
||||
|
||||
|
||||
if (!XGetWindowAttributes(dpy, (Window)body[1], &xwa))
|
||||
return 0;
|
||||
|
||||
|
||||
if (xwa.map_state != IsViewable)
|
||||
return 0;
|
||||
|
||||
|
@ -138,7 +138,7 @@ int is_suitable_window(unsigned long *body)
|
|||
&& (x + w > 0) && (y + h > 0)))
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
if (!(flags&TITLE) && !untitled)
|
||||
return 0;
|
||||
|
||||
|
@ -174,12 +174,12 @@ int get_window(void)
|
|||
}
|
||||
last = 1;
|
||||
break;
|
||||
|
||||
|
||||
case M_END_WINDOWLIST:
|
||||
break;
|
||||
|
||||
|
||||
default:
|
||||
fprintf(console,
|
||||
fprintf(console,
|
||||
"%s: internal inconsistency: unknown message\n",
|
||||
argv0);
|
||||
break;
|
||||
|
@ -198,7 +198,7 @@ void wait_configure(window_item *wi)
|
|||
FD_ZERO(&infds);
|
||||
FD_SET(fd[1], &infds);
|
||||
select(fd_width,&infds, 0, 0, NULL);
|
||||
while (!found)
|
||||
while (!found)
|
||||
if ((count = ReadFvwmPacket(fd[1],header,&body)) > 0) {
|
||||
if ((header[1] == M_CONFIGURE_WINDOW)
|
||||
&& (Window)body[1] == wi->frame)
|
||||
|
@ -214,7 +214,7 @@ int atopixel(char *s, unsigned long f)
|
|||
if (isalpha(s[l - 1])) {
|
||||
char s2[24];
|
||||
strcpy(s2,s);
|
||||
s2[strlen(s2) - 1] = 0;
|
||||
s2[strlen(s2) - 1] = 0;
|
||||
return atoi(s2);
|
||||
}
|
||||
return (atoi(s) * f) / 100;
|
||||
|
@ -225,7 +225,7 @@ void tile_windows(void)
|
|||
char msg[128];
|
||||
int cur_x = ofsx, cur_y = ofsy;
|
||||
int wdiv, hdiv, i, j, count = 1;
|
||||
window_item *w = reversed ? wins_tail : wins;
|
||||
window_item *w = reversed ? wins_tail : wins;
|
||||
|
||||
if (horizontal) {
|
||||
if ((maxnum > 0) && (maxnum < wins_count)) {
|
||||
|
@ -242,7 +242,7 @@ void tile_windows(void)
|
|||
for (j = 0; w && (j < maxnum); ++j) {
|
||||
int nw = wdiv - w->bw * 2;
|
||||
int nh = hdiv - w->bw * 2 - w->th;
|
||||
|
||||
|
||||
if (resize) {
|
||||
if (nostretch) {
|
||||
if (nw > w->width)
|
||||
|
@ -252,7 +252,7 @@ void tile_windows(void)
|
|||
}
|
||||
sprintf(msg, "Resize %lup %lup",
|
||||
(nw > 0) ? nw : w->width,
|
||||
(nh > 0) ? nh : w->height);
|
||||
(nh > 0) ? nh : w->height);
|
||||
SendInfo(fd,msg,w->frame);
|
||||
}
|
||||
sprintf(msg, "Move %up %up", cur_x, cur_y);
|
||||
|
@ -281,7 +281,7 @@ void tile_windows(void)
|
|||
for (j = 0; w && (j < maxnum); ++j) {
|
||||
int nw = wdiv - w->bw * 2;
|
||||
int nh = hdiv - w->bw * 2 - w->th;
|
||||
|
||||
|
||||
if (resize) {
|
||||
if (nostretch) {
|
||||
if (nw > w->width)
|
||||
|
@ -305,7 +305,7 @@ void tile_windows(void)
|
|||
cur_x = ofsx;
|
||||
cur_y += hdiv;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void cascade_windows(void)
|
||||
|
@ -321,7 +321,7 @@ void cascade_windows(void)
|
|||
sprintf(msg, "Move %up %up", cur_x, cur_y);
|
||||
SendInfo(fd,msg,w->frame);
|
||||
if (resize) {
|
||||
if (nostretch) {
|
||||
if (nostretch) {
|
||||
if (maxw
|
||||
&& (w->width > maxw))
|
||||
nw = maxw;
|
||||
|
@ -329,12 +329,12 @@ void cascade_windows(void)
|
|||
&& (w->height > maxh))
|
||||
nh = maxh;
|
||||
} else {
|
||||
nw = maxw;
|
||||
nw = maxw;
|
||||
nh = maxh;
|
||||
}
|
||||
if (nw || nh) {
|
||||
sprintf(msg, "Resize %lup %lup",
|
||||
nw ? nw : w->width,
|
||||
sprintf(msg, "Resize %lup %lup",
|
||||
nw ? nw : w->width,
|
||||
nh ? nh : w->height);
|
||||
SendInfo(fd,msg,w->frame);
|
||||
}
|
||||
|
@ -506,7 +506,7 @@ int main(int argc, char *argv[])
|
|||
|
||||
if (!(argv0 = strrchr(argv[0],'/')))
|
||||
argv0 = argv[0];
|
||||
else
|
||||
else
|
||||
++argv0;
|
||||
|
||||
if (argc < 6) {
|
||||
|
@ -538,7 +538,7 @@ int main(int argc, char *argv[])
|
|||
}
|
||||
|
||||
fd_width = GetFdWidth();
|
||||
|
||||
|
||||
#ifdef USERC
|
||||
strcpy(match, "*");
|
||||
strcat(match, argv0);
|
||||
|
@ -547,7 +547,7 @@ int main(int argc, char *argv[])
|
|||
if ((config_line = GetConfigLine(argv[3], match))) {
|
||||
char **args = NULL;
|
||||
config_line_count = parse_line(config_line, &args);
|
||||
parse_args("config args",
|
||||
parse_args("config args",
|
||||
config_line_count, args, 0);
|
||||
free(config_line);
|
||||
free(args);
|
||||
|
@ -561,7 +561,7 @@ int main(int argc, char *argv[])
|
|||
if (config_line[cllen - 1] == '\n')
|
||||
config_line[cllen - 1] = 0;
|
||||
config_line_count = parse_line(config_line, &args);
|
||||
parse_args("config args",
|
||||
parse_args("config args",
|
||||
config_line_count, args, 0);
|
||||
free(args);
|
||||
}
|
||||
|
@ -593,7 +593,7 @@ int main(int argc, char *argv[])
|
|||
M_END_WINDOWLIST
|
||||
));
|
||||
SendInfo(fd,msg,0);
|
||||
|
||||
|
||||
#ifdef FVWM1_MOVENULL
|
||||
/* avoid interactive placement in fvwm version 1 */
|
||||
if (!ofsx) ++ofsx;
|
||||
|
@ -602,7 +602,7 @@ int main(int argc, char *argv[])
|
|||
}
|
||||
#else
|
||||
SetMessageMask(fd,
|
||||
M_CONFIGURE_WINDOW
|
||||
M_CONFIGURE_WINDOW
|
||||
| M_END_WINDOWLIST
|
||||
);
|
||||
#endif
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#include "fvwmlib.h"
|
||||
#include "fvwmlib.h"
|
||||
|
||||
#define STICKY 1
|
||||
#define ICONIFIED 32 /* is it an icon now? */
|
||||
|
@ -24,7 +24,7 @@ struct list
|
|||
/*************************************************************************
|
||||
*
|
||||
* Subroutine Prototypes
|
||||
*
|
||||
*
|
||||
*************************************************************************/
|
||||
void Loop(int *fd);
|
||||
void SendInfo(int *fd,char *message,unsigned long window);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#include "fvwmlib.h"
|
||||
#include "fvwmlib.h"
|
||||
|
||||
#define STICKY 1
|
||||
#define ICONIFIED 32 /* is it an icon now? */
|
||||
|
@ -26,7 +26,7 @@ struct list
|
|||
/*************************************************************************
|
||||
*
|
||||
* Subroutine Prototypes
|
||||
*
|
||||
*
|
||||
*************************************************************************/
|
||||
void Loop(int *fd);
|
||||
void SendInfo(int *fd,char *message,unsigned long window);
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#include "fvwmlib.h"
|
||||
#include "fvwmlib.h"
|
||||
|
||||
extern Display *dpy;
|
||||
extern char *MyName;
|
||||
|
|
|
@ -114,7 +114,7 @@ void RelieveWindow(Window win,int x,int y,int w,int h,
|
|||
|
||||
/************************************************************************
|
||||
*
|
||||
* Sizes and creates the window
|
||||
* Sizes and creates the window
|
||||
*
|
||||
***********************************************************************/
|
||||
XSizeHints mysizehints;
|
||||
|
@ -146,7 +146,7 @@ void CreateWindow(int x,int y, int w, int h)
|
|||
mysizehints.max_width = w + BAR_WIDTH + PAD_WIDTH3;
|
||||
mysizehints.max_height = h + BAR_WIDTH + PAD_WIDTH3;
|
||||
|
||||
mysizehints.win_gravity = NorthWestGravity;
|
||||
mysizehints.win_gravity = NorthWestGravity;
|
||||
|
||||
if(d_depth < 2)
|
||||
{
|
||||
|
@ -180,21 +180,21 @@ void CreateWindow(int x,int y, int w, int h)
|
|||
gcm = GCForeground|GCBackground;
|
||||
gcv.foreground = hilite_pix;
|
||||
gcv.background = hilite_pix;
|
||||
ReliefGC = XCreateGC(dpy, Root, gcm, &gcv);
|
||||
ReliefGC = XCreateGC(dpy, Root, gcm, &gcv);
|
||||
|
||||
gcm = GCForeground|GCBackground;
|
||||
gcv.foreground = shadow_pix;
|
||||
gcv.background = shadow_pix;
|
||||
ShadowGC = XCreateGC(dpy, Root, gcm, &gcv);
|
||||
ShadowGC = XCreateGC(dpy, Root, gcm, &gcv);
|
||||
|
||||
_XA_WM_COLORMAP_WINDOWS = XInternAtom (dpy, "WM_COLORMAP_WINDOWS", False);
|
||||
}
|
||||
|
||||
/****************************************************************************
|
||||
*
|
||||
*
|
||||
* Loads a single color
|
||||
*
|
||||
****************************************************************************/
|
||||
****************************************************************************/
|
||||
Pixel GetColor(char *name)
|
||||
{
|
||||
XColor color;
|
||||
|
@ -202,11 +202,11 @@ Pixel GetColor(char *name)
|
|||
|
||||
XGetWindowAttributes(dpy,Root,&attributes);
|
||||
color.pixel = 0;
|
||||
if (!XParseColor (dpy, attributes.colormap, name, &color))
|
||||
if (!XParseColor (dpy, attributes.colormap, name, &color))
|
||||
{
|
||||
nocolor("parse",name);
|
||||
}
|
||||
else if(!XAllocColor (dpy, attributes.colormap, &color))
|
||||
else if(!XAllocColor (dpy, attributes.colormap, &color))
|
||||
{
|
||||
nocolor("alloc",name);
|
||||
}
|
||||
|
@ -250,7 +250,7 @@ void Loop(Window target)
|
|||
exposed = 1;
|
||||
RedrawWindow(target);
|
||||
break;
|
||||
|
||||
|
||||
case ConfigureNotify:
|
||||
XGetGeometry(dpy,main_win,&root,&x,&y,
|
||||
(unsigned int *)&tw,(unsigned int *)&th,
|
||||
|
@ -276,7 +276,7 @@ void Loop(Window target)
|
|||
RedrawWindow(target);
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
case ButtonPress:
|
||||
if((Event.xbutton.y > Height-BAR_WIDTH) &&
|
||||
(Event.xbutton.x < SCROLL_BAR_WIDTH+PAD_WIDTH3))
|
||||
|
@ -324,7 +324,7 @@ void Loop(Window target)
|
|||
RedrawWindow(target);
|
||||
}
|
||||
else if((Event.xbutton.y > Height- BAR_WIDTH ) &&
|
||||
(Event.xbutton.x < Width- BAR_WIDTH))
|
||||
(Event.xbutton.x < Width- BAR_WIDTH))
|
||||
{
|
||||
motion=HORIZONTAL;
|
||||
target_x_offset=(Event.xbutton.x -PAD_WIDTH3-SCROLL_BAR_WIDTH)*
|
||||
|
@ -332,14 +332,14 @@ void Loop(Window target)
|
|||
(Width-BAR_WIDTH-PAD_WIDTH3-2*SCROLL_BAR_WIDTH);
|
||||
if(target_x_offset < 0)
|
||||
target_x_offset = 0;
|
||||
|
||||
|
||||
if(target_x_offset + Width - BAR_WIDTH -PAD_WIDTH3> target_width)
|
||||
target_x_offset = target_width - Width + BAR_WIDTH+PAD_WIDTH3;
|
||||
XMoveWindow(dpy,target,-target_x_offset, -target_y_offset);
|
||||
RedrawWindow(target);
|
||||
}
|
||||
else if((Event.xbutton.y > Height- BAR_WIDTH ) &&
|
||||
(Event.xbutton.x > Width- BAR_WIDTH))
|
||||
(Event.xbutton.x > Width- BAR_WIDTH))
|
||||
{
|
||||
exposed = 2;
|
||||
motion=QUIT;
|
||||
|
@ -417,7 +417,7 @@ void Loop(Window target)
|
|||
(Width-BAR_WIDTH-PAD_WIDTH3-2*SCROLL_BAR_WIDTH);
|
||||
if(target_x_offset < 0)
|
||||
target_x_offset = 0;
|
||||
|
||||
|
||||
if(target_x_offset + Width - BAR_WIDTH -PAD_WIDTH3> target_width)
|
||||
target_x_offset = target_width - Width + BAR_WIDTH+PAD_WIDTH3;
|
||||
XMoveWindow(dpy,target,-target_x_offset, -target_y_offset);
|
||||
|
@ -473,7 +473,7 @@ void Loop(Window target)
|
|||
(Width-BAR_WIDTH-PAD_WIDTH3-2*SCROLL_BAR_WIDTH);
|
||||
if(target_x_offset < 0)
|
||||
target_x_offset = 0;
|
||||
|
||||
|
||||
if(target_x_offset + Width - BAR_WIDTH -PAD_WIDTH3> target_width)
|
||||
target_x_offset = target_width - Width + BAR_WIDTH+PAD_WIDTH3;
|
||||
XMoveWindow(dpy,target,-target_x_offset, -target_y_offset);
|
||||
|
@ -488,7 +488,7 @@ void Loop(Window target)
|
|||
RedrawWindow(target);
|
||||
break;
|
||||
case ClientMessage:
|
||||
if ((Event.xclient.format==32) &&
|
||||
if ((Event.xclient.format==32) &&
|
||||
(Event.xclient.data.l[0]==wm_del_win))
|
||||
{
|
||||
DeadPipe(1);
|
||||
|
@ -505,8 +505,8 @@ void Loop(Window target)
|
|||
{
|
||||
if (XGetWindowProperty (dpy,
|
||||
target, Event.xproperty.atom, 0,
|
||||
MAX_ICON_NAME_LEN, False, XA_STRING,
|
||||
&actual,&actual_format, &nitems,
|
||||
MAX_ICON_NAME_LEN, False, XA_STRING,
|
||||
&actual,&actual_format, &nitems,
|
||||
&bytesafter, (unsigned char **) &prop)
|
||||
== Success && (prop != NULL))
|
||||
change_icon_name(prop);
|
||||
|
@ -519,7 +519,7 @@ void Loop(Window target)
|
|||
XSetWMHints(dpy,main_win, wmhints);
|
||||
XFree(wmhints);
|
||||
}
|
||||
else if(Event.xproperty.atom == XA_WM_NORMAL_HINTS)
|
||||
else if(Event.xproperty.atom == XA_WM_NORMAL_HINTS)
|
||||
{
|
||||
/* don't do Normal Hints. They alter the size of the window */
|
||||
}
|
||||
|
@ -527,7 +527,7 @@ void Loop(Window target)
|
|||
{
|
||||
}
|
||||
break;
|
||||
|
||||
|
||||
case DestroyNotify:
|
||||
DeadPipe(1);
|
||||
break;
|
||||
|
@ -561,7 +561,7 @@ void Loop(Window target)
|
|||
|
||||
/************************************************************************
|
||||
*
|
||||
* Draw the window
|
||||
* Draw the window
|
||||
*
|
||||
***********************************************************************/
|
||||
void RedrawWindow(Window target)
|
||||
|
@ -573,7 +573,7 @@ void RedrawWindow(Window target)
|
|||
|
||||
while (XCheckTypedWindowEvent (dpy, main_win, Expose, &dummy))
|
||||
exposed |= 1;
|
||||
|
||||
|
||||
XSetWindowBorderWidth(dpy,target,0);
|
||||
|
||||
RelieveWindow(main_win,PAD_WIDTH3-2,PAD_WIDTH3-2,
|
||||
|
@ -676,11 +676,11 @@ void RedrawWindow(Window target)
|
|||
void change_window_name(char *str)
|
||||
{
|
||||
XTextProperty name;
|
||||
|
||||
|
||||
if(str == NULL)
|
||||
return;
|
||||
|
||||
if (XStringListToTextProperty(&str,1,&name) == 0)
|
||||
if (XStringListToTextProperty(&str,1,&name) == 0)
|
||||
{
|
||||
fprintf(stderr,"%s: cannot allocate window name",MyName);
|
||||
return;
|
||||
|
@ -696,9 +696,9 @@ void change_window_name(char *str)
|
|||
void change_icon_name(char *str)
|
||||
{
|
||||
XTextProperty name;
|
||||
|
||||
|
||||
if(str == NULL)return;
|
||||
if (XStringListToTextProperty(&str,1,&name) == 0)
|
||||
if (XStringListToTextProperty(&str,1,&name) == 0)
|
||||
{
|
||||
fprintf(stderr,"%s: cannot allocate window name",MyName);
|
||||
return;
|
||||
|
@ -718,7 +718,7 @@ void GrabWindow(Window target)
|
|||
Atom actual = None;
|
||||
int actual_format;
|
||||
unsigned long nitems, bytesafter;
|
||||
|
||||
|
||||
XUnmapWindow(dpy,target);
|
||||
XSync(dpy,0);
|
||||
XGetGeometry(dpy,target,&root,&x,&y,
|
||||
|
@ -741,8 +741,8 @@ void GrabWindow(Window target)
|
|||
temp = NULL;
|
||||
if (XGetWindowProperty (dpy,
|
||||
target, XA_WM_ICON_NAME, 0,
|
||||
MAX_ICON_NAME_LEN, False, XA_STRING,
|
||||
&actual,&actual_format, &nitems,
|
||||
MAX_ICON_NAME_LEN, False, XA_STRING,
|
||||
&actual,&actual_format, &nitems,
|
||||
&bytesafter, (unsigned char **) &prop)
|
||||
== Success && (prop != NULL))
|
||||
{
|
||||
|
@ -752,7 +752,7 @@ void GrabWindow(Window target)
|
|||
change_window_name(temp);
|
||||
{
|
||||
XWMHints *wmhints;
|
||||
|
||||
|
||||
wmhints = XGetWMHints(dpy,target);
|
||||
if(wmhints != NULL)
|
||||
{
|
||||
|
@ -767,7 +767,7 @@ void GrabWindow(Window target)
|
|||
XSetWindowColormap(dpy,main_win,xwa.colormap);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
XMapWindow(dpy,main_win);
|
||||
RedrawWindow(target);
|
||||
XFree(temp);
|
||||
|
@ -779,9 +779,9 @@ void GrabWindow(Window target)
|
|||
|
||||
void RedrawLeftButton(GC rgc, GC sgc,int x1,int y1)
|
||||
{
|
||||
XSegment seg[4];
|
||||
XSegment seg[4];
|
||||
int i=0;
|
||||
|
||||
|
||||
seg[i].x1 = x1+1; seg[i].y1 = y1+SCROLL_BAR_WIDTH/2;
|
||||
seg[i].x2 = x1+SCROLL_BAR_WIDTH - 2; seg[i++].y2 = y1+1;
|
||||
|
||||
|
@ -806,7 +806,7 @@ void RedrawLeftButton(GC rgc, GC sgc,int x1,int y1)
|
|||
|
||||
void RedrawRightButton(GC rgc, GC sgc,int x1,int y1)
|
||||
{
|
||||
XSegment seg[4];
|
||||
XSegment seg[4];
|
||||
int i=0;
|
||||
|
||||
seg[i].x1 = x1+1; seg[i].y1 = y1+1;
|
||||
|
@ -834,7 +834,7 @@ void RedrawRightButton(GC rgc, GC sgc,int x1,int y1)
|
|||
|
||||
void RedrawTopButton(GC rgc, GC sgc,int x1,int y1)
|
||||
{
|
||||
XSegment seg[4];
|
||||
XSegment seg[4];
|
||||
int i=0;
|
||||
|
||||
seg[i].x1 = x1+SCROLL_BAR_WIDTH/2; seg[i].y1 = y1+1;
|
||||
|
@ -861,7 +861,7 @@ void RedrawTopButton(GC rgc, GC sgc,int x1,int y1)
|
|||
|
||||
void RedrawBottomButton(GC rgc, GC sgc,int x1, int y1)
|
||||
{
|
||||
XSegment seg[4];
|
||||
XSegment seg[4];
|
||||
int i=0;
|
||||
|
||||
seg[i].x1 = x1+1; seg[i].y1 = y1+1;
|
||||
|
@ -885,4 +885,4 @@ void RedrawBottomButton(GC rgc, GC sgc,int x1, int y1)
|
|||
seg[i].x2 = x1+SCROLL_BAR_WIDTH/2; seg[i++].y2 = y1+SCROLL_BAR_WIDTH - 1;
|
||||
XDrawSegments(dpy, main_win, sgc, seg, i);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#include "fvwmlib.h"
|
||||
#include "fvwmlib.h"
|
||||
|
||||
#define ACTION1 1
|
||||
#define ACTION2 2
|
||||
|
@ -15,7 +15,7 @@ struct list
|
|||
/*************************************************************************
|
||||
*
|
||||
* Subroutine Prototypes
|
||||
*
|
||||
*
|
||||
*************************************************************************/
|
||||
void Loop(int *fd);
|
||||
void SendInfo(int *fd,char *message,unsigned long window);
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
/* FvwmWinList Module for Fvwm.
|
||||
/* FvwmWinList Module for Fvwm.
|
||||
*
|
||||
* Copyright 1994, Mike Finger (mfinger@mermaid.micro.umn.edu or
|
||||
* Mike_Finger@atk.com)
|
||||
*
|
||||
* The functions in this header file that are the original work of Mike Finger.
|
||||
*
|
||||
*
|
||||
* No guarantees or warantees or anything are provided or implied in any way
|
||||
* whatsoever. Use this program at your own risk. Permission to use this
|
||||
* program for any purpose is given, as long as the copyright is kept intact.
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* Part of the FvwmWinList Module for Fvwm.
|
||||
/* Part of the FvwmWinList Module for Fvwm.
|
||||
*
|
||||
* Copyright 1994, Mike Finger (mfinger@mermaid.micro.umn.edu or
|
||||
* Mike_Finger@atk.com)
|
||||
|
@ -27,7 +27,7 @@ extern Window Root;
|
|||
|
||||
/****************************************************************************
|
||||
Loads a single color
|
||||
*****************************************************************************/
|
||||
*****************************************************************************/
|
||||
Pixel GetColor(char *name)
|
||||
{
|
||||
XColor color;
|
||||
|
@ -35,9 +35,9 @@ Pixel GetColor(char *name)
|
|||
|
||||
XGetWindowAttributes(dpy,Root,&attributes);
|
||||
color.pixel = 0;
|
||||
if (!XParseColor (dpy, attributes.colormap, name, &color))
|
||||
if (!XParseColor (dpy, attributes.colormap, name, &color))
|
||||
nocolor("parse",name);
|
||||
else if(!XAllocColor (dpy, attributes.colormap, &color))
|
||||
else if(!XAllocColor (dpy, attributes.colormap, &color))
|
||||
nocolor("alloc",name);
|
||||
return color.pixel;
|
||||
}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* Part of the FvwmWinList Module for Fvwm.
|
||||
/* Part of the FvwmWinList Module for Fvwm.
|
||||
*
|
||||
* The functions in this header file were originally part of the GoodStuff
|
||||
* and FvwmIdent modules for Fvwm, so there copyrights are listed:
|
||||
|
|
|
@ -185,7 +185,7 @@ int main(int argc, char **argv)
|
|||
sigemptyset(&sigact.sa_mask);
|
||||
sigact.sa_handler = TerminateHandler;
|
||||
sigaction(SIGPIPE, &sigact, NULL);
|
||||
sigaction(SIGTERM, &sigact, NULL);
|
||||
sigaction(SIGTERM, &sigact, NULL);
|
||||
#else
|
||||
signal(SIGPIPE, TerminateHandler);
|
||||
signal(SIGTERM, TerminateHandler);
|
||||
|
@ -1066,7 +1066,7 @@ PropMwmHints prop;
|
|||
int ErrorHandler(Display *d, XErrorEvent *event)
|
||||
{
|
||||
char errmsg[256];
|
||||
|
||||
|
||||
XGetErrorText(d, event->error_code, errmsg, sizeof(errmsg));
|
||||
ConsoleMessage("%s failed request: %s\n", Module, errmsg);
|
||||
ConsoleMessage("Major opcode: 0x%x, resource id: 0x%x\n",
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#include "fvwmlib.h"
|
||||
#include "fvwmlib.h"
|
||||
|
||||
/* FvwmWinList Module for Fvwm.
|
||||
/* FvwmWinList Module for Fvwm.
|
||||
*
|
||||
* Copyright 1994, Mike Finger (mfinger@mermaid.micro.umn.edu or
|
||||
* Mike_Finger@atk.com)
|
||||
|
@ -50,13 +50,13 @@ typedef PropMotifWmHints PropMwmHints;
|
|||
#define MWM_FUNC_MOVE (1L << 2)
|
||||
#define MWM_FUNC_MINIMIZE (1L << 3)
|
||||
#define MWM_FUNC_MAXIMIZE (1L << 4)
|
||||
#define MWM_FUNC_CLOSE (1L << 5)
|
||||
#define MWM_FUNC_CLOSE (1L << 5)
|
||||
|
||||
/* values for MwmHints.input_mode */
|
||||
#define MWM_INPUT_MODELESS 0
|
||||
#define MWM_INPUT_PRIMARY_APPLICATION_MODAL 1
|
||||
#define MWM_INPUT_SYSTEM_MODAL 2
|
||||
#define MWM_INPUT_FULL_APPLICATION_MODAL 3
|
||||
#define MWM_INPUT_FULL_APPLICATION_MODAL 3
|
||||
|
||||
/* bit definitions for MwmHints.decorations */
|
||||
#define MWM_DECOR_ALL (1L << 0)
|
||||
|
|
|
@ -3,8 +3,8 @@ XCOMM $OpenBSD: Imakefile,v 1.1.1.1 2006/11/26 10:53:56 matthieu Exp $
|
|||
FVWMTOP=../..
|
||||
#include "../../Fvwm.tmpl"
|
||||
|
||||
SRCS= ButtonArray.c Colors.c FvwmWinList.c List.c Mallocs.c
|
||||
OBJS= ButtonArray.o Colors.o FvwmWinList.o List.o Mallocs.o
|
||||
SRCS= ButtonArray.c Colors.c FvwmWinList.c List.c Mallocs.c
|
||||
OBJS= ButtonArray.o Colors.o FvwmWinList.o List.o Mallocs.o
|
||||
|
||||
DEPLIBS= $(FVWMLIB) $(DEPXPMLIB) $(DEPXLIB)
|
||||
LOCAL_LIBRARIES= $(FVWMLIB) $(XPMLIB) $(XLIB)
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
/* FvwmWinList Module for Fvwm.
|
||||
/* FvwmWinList Module for Fvwm.
|
||||
*
|
||||
* Copyright 1994, Mike Finger (mfinger@mermaid.micro.umn.edu or
|
||||
* Mike_Finger@atk.com)
|
||||
*
|
||||
* The functions in this source file are the original work of Mike Finger.
|
||||
*
|
||||
*
|
||||
* No guarantees or warantees or anything are provided or implied in any way
|
||||
* whatsoever. Use this program at your own risk. Permission to use this
|
||||
* program for any purpose is given, as long as the copyright is kept intact.
|
||||
|
@ -64,7 +64,7 @@ int FindItem(List *list, long id)
|
|||
if (temp==NULL) return -1;
|
||||
return i;
|
||||
}
|
||||
|
||||
|
||||
/******************************************************************************
|
||||
FindItemDesk - Find the item in the list matching the id, and desk id
|
||||
******************************************************************************/
|
||||
|
@ -95,8 +95,8 @@ int UpdateItemName(List *list, long id, char *string)
|
|||
|
||||
/******************************************************************************
|
||||
UpdateItemDesk - Update the item in the list, setting desk as necessary.
|
||||
returns 1 if desk was updated,
|
||||
returns 0, if not changed
|
||||
returns 1 if desk was updated,
|
||||
returns 0, if not changed
|
||||
returns -1 if not found
|
||||
******************************************************************************/
|
||||
int UpdateItemDesk(List *list, long id, long desk)
|
||||
|
@ -131,7 +131,7 @@ int i;
|
|||
if (flags!=-1) temp->flags=flags;
|
||||
return i;
|
||||
}
|
||||
|
||||
|
||||
/******************************************************************************
|
||||
FreeItem - Frees allocated space for an Item
|
||||
******************************************************************************/
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
/* FvwmWinList Module for Fvwm.
|
||||
/* FvwmWinList Module for Fvwm.
|
||||
*
|
||||
* Copyright 1994, Mike Finger (mfinger@mermaid.micro.umn.edu or
|
||||
* Mike_Finger@atk.com)
|
||||
*
|
||||
* The functions in this source file that are the original work of Mike Finger.
|
||||
*
|
||||
*
|
||||
* No guarantees or warantees or anything are provided or implied in any way
|
||||
* whatsoever. Use this program at your own risk. Permission to use this
|
||||
* program for any purpose is given, as long as the copyright is kept intact.
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
.PATH: ${DIST}/modules/FvwmWinList
|
||||
|
||||
PROG= FvwmWinList
|
||||
SRCS= ButtonArray.c Colors.c FvwmWinList.c List.c Mallocs.c
|
||||
SRCS= ButtonArray.c Colors.c FvwmWinList.c List.c Mallocs.c
|
||||
|
||||
LDADD+= -lXpm ${XLIB}
|
||||
BINDIR= ${FVWMLIBDIR}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* FvwmWinList Module for Fvwm.
|
||||
/* FvwmWinList Module for Fvwm.
|
||||
*
|
||||
* Copyright 1994, Mike Finger (mfinger@mermaid.micro.umn.edu or
|
||||
* Mike_Finger@atk.com)
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# -*- makefile -*-
|
||||
# -*- makefile -*-
|
||||
# $OpenBSD: Makefile.inc,v 1.9 2012/09/30 10:12:51 espie Exp $
|
||||
|
||||
.ifndef FVWM_MAKEFILE_INC
|
||||
|
|
|
@ -350,7 +350,7 @@ Key F8 A M CirculateDown
|
|||
*FvwmPagerFore white
|
||||
*FvwmPagerHilight #2d2d2d
|
||||
*FvwmPagerGeometry 80x60-1-1
|
||||
*FvwmPagerLabel 0 "OpenBSD"
|
||||
*FvwmPagerLabel 0 "SecBSD"
|
||||
*FvwmPagerLabel 1 Maker
|
||||
*FvwmPagerLabel 2 Mail
|
||||
*FvwmPagerLabel 3 Matlab
|
||||
|
|
|
@ -18,7 +18,7 @@ print "AddToMenu XLockMenu \"XLock Modes\" Title\n";
|
|||
while (<XL>)
|
||||
{
|
||||
chomp;
|
||||
|
||||
|
||||
/where mode is one of:/ && do
|
||||
{
|
||||
$start = 1;
|
||||
|
|
|
@ -1,16 +1,16 @@
|
|||
#!/bin/sh
|
||||
#!/bin/sh
|
||||
|
||||
# Some time ago, Martin Kraemer <Martin.Kraemer@mch.sni.de> posted an
|
||||
# incomplete script to convert fvwm-1 'rc' files to fvwm-2. I've just
|
||||
# recently fixed and enhanced that script; it's complete (or nearly
|
||||
# so) now. This should help if you choose to convert.
|
||||
#
|
||||
#
|
||||
# I've also made a couple of other minor changes to make life easier
|
||||
# for our users here: I changed the default initialization from "Read
|
||||
# .fvwmrc" to "Read .fvwm2rc" (in fvwm/fvwmc), and I installed fvwm 2
|
||||
# as "fvwm2". With these changes, users can easily convert at their
|
||||
# leisure.
|
||||
#
|
||||
#
|
||||
# Herewith the script. It's using GNU awk (gawk), but will run with
|
||||
# any "new" awk (nawk on Suns (SunOS 4, Solaris), awk on most other
|
||||
# systems). If you do not use gawk, it will be case-sensitive (the
|
||||
|
@ -116,7 +116,7 @@ BEGIN {
|
|||
print $0;
|
||||
next;
|
||||
}
|
||||
|
||||
|
||||
################ Rename common items ##############
|
||||
/Restart/ && /fvwm/ {
|
||||
gsub("fvwm", "fvwm2"); gsub("fvwm22","fvwm2"); # try to leave paths alone
|
||||
|
@ -390,7 +390,7 @@ BEGIN {
|
|||
|
||||
# hack: popup declarations cannot have leading whitespace
|
||||
/^Popup/ {
|
||||
if (inpopup)
|
||||
if (inpopup)
|
||||
print "ERROR: EndPopup missing\n" NR ": " $0 >"'$TTY'";
|
||||
if (infunction)
|
||||
print "ERROR: EndFunction missing\n" NR ": " $0 >"'$TTY'";
|
||||
|
@ -432,7 +432,7 @@ BEGIN {
|
|||
/^[ \t]*StubbornIcons[ \t]*/ ||
|
||||
/^[ \t]*StubbornIconPlacement[ \t]*/ ||
|
||||
/^[ \t]*StubbornPlacement[ \t]*/ ||
|
||||
/^[ \t]*Cursor[ \t]*/ {
|
||||
/^[ \t]*Cursor[ \t]*/ {
|
||||
print "#! " $0 " [deleted]";
|
||||
if (warned[$1]==FALSE) {
|
||||
print "Warning: " $1 " not in Fvwm2, command dropped" >"'$TTY'";
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
/****************************************************************************
|
||||
* This is an all new program to set the root window to an Xpm pixmap.
|
||||
* Copyright 1993, Rob Nation
|
||||
* Copyright 1993, Rob Nation
|
||||
* You may use this file for anything you want, as long as the copyright
|
||||
* is kept intact. No guarantees of any sort are made in any way regarding
|
||||
* this program or anything related to it.
|
||||
|
@ -13,7 +13,7 @@
|
|||
#include <string.h>
|
||||
#include <X11/Xos.h>
|
||||
#include <X11/Xatom.h>
|
||||
#include "../libs/fvwmlib.h"
|
||||
#include "../libs/fvwmlib.h"
|
||||
#include <X11/xpm.h> /* Has to be after Intrinsic.h gets included */
|
||||
|
||||
int save_colors = 0;
|
||||
|
@ -39,7 +39,7 @@ int main(int argc, char **argv)
|
|||
exit(1);
|
||||
}
|
||||
dpy = XOpenDisplay(display_name);
|
||||
if (!dpy)
|
||||
if (!dpy)
|
||||
{
|
||||
fprintf(stderr, "Xpmroot: unable to open display '%s'\n",
|
||||
XDisplayName (display_name));
|
||||
|
@ -47,11 +47,11 @@ int main(int argc, char **argv)
|
|||
}
|
||||
screen = DefaultScreen(dpy);
|
||||
root = RootWindow(dpy, screen);
|
||||
|
||||
|
||||
SetRootWindow(argv[1]);
|
||||
|
||||
prop = XInternAtom(dpy, "_XSETROOT_ID", False);
|
||||
|
||||
|
||||
(void)XGetWindowProperty(dpy, root, prop, 0L, 1L, True, AnyPropertyType,
|
||||
&type, &format, &length, &after, &data);
|
||||
if ((type == XA_PIXMAP) && (format == 32) && (length == 1) && (after == 0))
|
||||
|
@ -76,8 +76,8 @@ void SetRootWindow(char *tline)
|
|||
xpm_attributes.colormap = root_attr.colormap;
|
||||
xpm_attributes.valuemask = XpmSize | XpmReturnPixels|XpmColormap;
|
||||
if((val = XpmReadFileToPixmap(dpy,root, tline,
|
||||
&rootXpm, &shapeMask,
|
||||
&xpm_attributes))!= XpmSuccess)
|
||||
&rootXpm, &shapeMask,
|
||||
&xpm_attributes))!= XpmSuccess)
|
||||
{
|
||||
if(val == XpmOpenFailed)
|
||||
fprintf(stderr, "Couldn't open pixmap file\n");
|
||||
|
|
|
@ -1,16 +1,16 @@
|
|||
/*
|
||||
* Copyright (C) 1999-2001 Brian Paul All Rights Reserved.
|
||||
*
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included
|
||||
* in all copies or substantial portions of the Software.
|
||||
*
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
|
@ -113,7 +113,7 @@ static GLfloat left, right, asp; /* Stereo frustum params. */
|
|||
*
|
||||
* Draw a gear wheel. You'll probably want to call this function when
|
||||
* building a display list since we do a lot of trig here.
|
||||
*
|
||||
*
|
||||
* Input: inner_radius - radius of hole at center
|
||||
* outer_radius - radius at center of teeth
|
||||
* width - width of gear
|
||||
|
@ -342,7 +342,7 @@ draw_frame(Display *dpy, Window win)
|
|||
glXSwapBuffers(dpy, win);
|
||||
|
||||
frames++;
|
||||
|
||||
|
||||
if (tRate0 < 0.0)
|
||||
tRate0 = t;
|
||||
if (t - tRate0 >= 5.0) {
|
||||
|
@ -379,12 +379,12 @@ reshape(int width, int height)
|
|||
glLoadIdentity();
|
||||
glFrustum(-1.0, 1.0, -h, h, 5.0, 60.0);
|
||||
}
|
||||
|
||||
|
||||
glMatrixMode(GL_MODELVIEW);
|
||||
glLoadIdentity();
|
||||
glTranslatef(0.0, 0.0, -40.0);
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
static void
|
||||
|
@ -716,7 +716,7 @@ usage(void)
|
|||
printf(" -info display OpenGL renderer info\n");
|
||||
printf(" -geometry WxH+X+Y window geometry\n");
|
||||
}
|
||||
|
||||
|
||||
|
||||
int
|
||||
main(int argc, char *argv[])
|
||||
|
|
|
@ -1,16 +1,16 @@
|
|||
/*
|
||||
* Copyright (C) 1999-2014 Brian Paul All Rights Reserved.
|
||||
*
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included
|
||||
* in all copies or substantial portions of the Software.
|
||||
*
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
|
@ -450,7 +450,7 @@ print_shader_limits(GLenum target)
|
|||
* Print interesting limits for vertex/fragment programs.
|
||||
*/
|
||||
static void
|
||||
print_program_limits(GLenum target,
|
||||
print_program_limits(GLenum target,
|
||||
const struct ext_functions *extfuncs)
|
||||
{
|
||||
#if defined(GL_ARB_vertex_program) || defined(GL_ARB_fragment_program)
|
||||
|
|
|
@ -1,16 +1,16 @@
|
|||
/*
|
||||
* Copyright (C) 1999-2014 Brian Paul All Rights Reserved.
|
||||
*
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included
|
||||
* in all copies or substantial portions of the Software.
|
||||
*
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
|
|
|
@ -1,16 +1,16 @@
|
|||
/*
|
||||
* Copyright (C) 1999-2006 Brian Paul All Rights Reserved.
|
||||
*
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the "Software"),
|
||||
* to deal in the Software without restriction, including without limitation
|
||||
* the rights to use, copy, modify, merge, publish, distribute, sublicense,
|
||||
* and/or sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following conditions:
|
||||
*
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be included
|
||||
* in all copies or substantial portions of the Software.
|
||||
*
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
|
||||
|
@ -102,7 +102,7 @@ struct visual_attribs
|
|||
int srgb;
|
||||
};
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* Version of the context that was created
|
||||
*
|
||||
|
@ -733,7 +733,7 @@ get_visual_attribs(Display *dpy, XVisualInfo *vInfo,
|
|||
attribs->render_type = GLX_RGBA_BIT;
|
||||
else
|
||||
attribs->render_type = GLX_COLOR_INDEX_BIT;
|
||||
|
||||
|
||||
glXGetConfig(dpy, vInfo, GLX_DRAWABLE_TYPE, &attribs->drawableType);
|
||||
glXGetConfig(dpy, vInfo, GLX_DOUBLEBUFFER, &attribs->doubleBuffer);
|
||||
glXGetConfig(dpy, vInfo, GLX_STEREO, &attribs->stereo);
|
||||
|
@ -1087,7 +1087,7 @@ print_visual_info(Display *dpy, int scrnum, InfoMode mode)
|
|||
print_visual_attribs_verbose(&attribs, False);
|
||||
else if (mode == Normal)
|
||||
print_visual_attribs_short(&attribs);
|
||||
else if (mode == Wide)
|
||||
else if (mode == Wide)
|
||||
print_visual_attribs_long(&attribs);
|
||||
}
|
||||
printf("\n");
|
||||
|
@ -1122,7 +1122,7 @@ print_fbconfig_info(Display *dpy, int scrnum, InfoMode mode)
|
|||
for (i = 0; i < numFBConfigs; i++) {
|
||||
get_fbconfig_attribs(dpy, fbconfigs[i], &attribs);
|
||||
|
||||
if (mode == Verbose)
|
||||
if (mode == Verbose)
|
||||
print_visual_attribs_verbose(&attribs, True);
|
||||
else if (mode == Normal)
|
||||
print_visual_attribs_short(&attribs);
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#
|
||||
#
|
||||
# Copyright 2005 Red Hat, Inc.
|
||||
#
|
||||
#
|
||||
# Permission to use, copy, modify, distribute, and sell 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
|
||||
|
@ -10,7 +10,7 @@
|
|||
# specific, written prior permission. Red Hat makes no
|
||||
# representations about the suitability of this software for any purpose. It
|
||||
# is provided "as is" without express or implied warranty.
|
||||
#
|
||||
#
|
||||
# RED HAT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
|
||||
# INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
|
||||
# EVENT SHALL RED HAT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
|
||||
|
|
1783
app/iceauth/config.guess
vendored
1783
app/iceauth/config.guess
vendored
File diff suppressed because it is too large
Load diff
2954
app/iceauth/config.sub
vendored
2954
app/iceauth/config.sub
vendored
File diff suppressed because it is too large
Load diff
|
@ -1,6 +1,6 @@
|
|||
|
||||
dnl Copyright 2005 Red Hat, Inc.
|
||||
dnl
|
||||
dnl
|
||||
dnl Permission to use, copy, modify, distribute, and sell this software and its
|
||||
dnl documentation for any purpose is hereby granted without fee, provided that
|
||||
dnl the above copyright notice appear in all copies and that both that
|
||||
|
@ -10,7 +10,7 @@ dnl advertising or publicity pertaining to distribution of the software without
|
|||
dnl specific, written prior permission. Red Hat makes no
|
||||
dnl representations about the suitability of this software for any purpose. It
|
||||
dnl is provided "as is" without express or implied warranty.
|
||||
dnl
|
||||
dnl
|
||||
dnl RED HAT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
|
||||
dnl INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
|
||||
dnl EVENT SHALL RED HAT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
/*
|
||||
* xauth - manipulate authorization file
|
||||
*
|
||||
*
|
||||
*
|
||||
Copyright 1989, 1998 The Open Group
|
||||
|
||||
Permission to use, copy, modify, distribute, and sell this software and its
|
||||
|
@ -55,7 +55,7 @@ static const char *defsource = "(stdin)";
|
|||
static void _X_NORETURN
|
||||
usage (int exitcode)
|
||||
{
|
||||
static const char prefixmsg[] =
|
||||
static const char prefixmsg[] =
|
||||
"\n"
|
||||
"where options include:\n"
|
||||
" -f authfilename name of authority file to use\n"
|
||||
|
@ -66,7 +66,7 @@ usage (int exitcode)
|
|||
" -V print version and exit\n"
|
||||
"\n"
|
||||
"and commands have the following syntax:\n";
|
||||
static const char suffixmsg[] =
|
||||
static const char suffixmsg[] =
|
||||
"A dash may be used with the \"merge\" and \"source\" to read from the\n"
|
||||
"standard input. Commands beginning with \"n\" use numeric format.\n";
|
||||
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
*
|
||||
*
|
||||
Copyright 1989, 1998 The Open Group
|
||||
|
||||
Permission to use, copy, modify, distribute, and sell this software and its
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
/*
|
||||
*
|
||||
*
|
||||
Copyright 1989, 1998 The Open Group
|
||||
|
||||
Permission to use, copy, modify, distribute, and sell this software and its
|
||||
|
@ -182,38 +182,38 @@ source read commands from file\n\
|
|||
static Bool okay_to_use_stdin = True; /* set to false after using */
|
||||
|
||||
static const char * const hex_table[] = { /* for printing hex digits */
|
||||
"00", "01", "02", "03", "04", "05", "06", "07",
|
||||
"08", "09", "0a", "0b", "0c", "0d", "0e", "0f",
|
||||
"10", "11", "12", "13", "14", "15", "16", "17",
|
||||
"18", "19", "1a", "1b", "1c", "1d", "1e", "1f",
|
||||
"20", "21", "22", "23", "24", "25", "26", "27",
|
||||
"28", "29", "2a", "2b", "2c", "2d", "2e", "2f",
|
||||
"30", "31", "32", "33", "34", "35", "36", "37",
|
||||
"38", "39", "3a", "3b", "3c", "3d", "3e", "3f",
|
||||
"40", "41", "42", "43", "44", "45", "46", "47",
|
||||
"48", "49", "4a", "4b", "4c", "4d", "4e", "4f",
|
||||
"50", "51", "52", "53", "54", "55", "56", "57",
|
||||
"58", "59", "5a", "5b", "5c", "5d", "5e", "5f",
|
||||
"60", "61", "62", "63", "64", "65", "66", "67",
|
||||
"68", "69", "6a", "6b", "6c", "6d", "6e", "6f",
|
||||
"70", "71", "72", "73", "74", "75", "76", "77",
|
||||
"78", "79", "7a", "7b", "7c", "7d", "7e", "7f",
|
||||
"80", "81", "82", "83", "84", "85", "86", "87",
|
||||
"88", "89", "8a", "8b", "8c", "8d", "8e", "8f",
|
||||
"90", "91", "92", "93", "94", "95", "96", "97",
|
||||
"98", "99", "9a", "9b", "9c", "9d", "9e", "9f",
|
||||
"a0", "a1", "a2", "a3", "a4", "a5", "a6", "a7",
|
||||
"a8", "a9", "aa", "ab", "ac", "ad", "ae", "af",
|
||||
"b0", "b1", "b2", "b3", "b4", "b5", "b6", "b7",
|
||||
"b8", "b9", "ba", "bb", "bc", "bd", "be", "bf",
|
||||
"c0", "c1", "c2", "c3", "c4", "c5", "c6", "c7",
|
||||
"c8", "c9", "ca", "cb", "cc", "cd", "ce", "cf",
|
||||
"d0", "d1", "d2", "d3", "d4", "d5", "d6", "d7",
|
||||
"d8", "d9", "da", "db", "dc", "dd", "de", "df",
|
||||
"e0", "e1", "e2", "e3", "e4", "e5", "e6", "e7",
|
||||
"e8", "e9", "ea", "eb", "ec", "ed", "ee", "ef",
|
||||
"f0", "f1", "f2", "f3", "f4", "f5", "f6", "f7",
|
||||
"f8", "f9", "fa", "fb", "fc", "fd", "fe", "ff",
|
||||
"00", "01", "02", "03", "04", "05", "06", "07",
|
||||
"08", "09", "0a", "0b", "0c", "0d", "0e", "0f",
|
||||
"10", "11", "12", "13", "14", "15", "16", "17",
|
||||
"18", "19", "1a", "1b", "1c", "1d", "1e", "1f",
|
||||
"20", "21", "22", "23", "24", "25", "26", "27",
|
||||
"28", "29", "2a", "2b", "2c", "2d", "2e", "2f",
|
||||
"30", "31", "32", "33", "34", "35", "36", "37",
|
||||
"38", "39", "3a", "3b", "3c", "3d", "3e", "3f",
|
||||
"40", "41", "42", "43", "44", "45", "46", "47",
|
||||
"48", "49", "4a", "4b", "4c", "4d", "4e", "4f",
|
||||
"50", "51", "52", "53", "54", "55", "56", "57",
|
||||
"58", "59", "5a", "5b", "5c", "5d", "5e", "5f",
|
||||
"60", "61", "62", "63", "64", "65", "66", "67",
|
||||
"68", "69", "6a", "6b", "6c", "6d", "6e", "6f",
|
||||
"70", "71", "72", "73", "74", "75", "76", "77",
|
||||
"78", "79", "7a", "7b", "7c", "7d", "7e", "7f",
|
||||
"80", "81", "82", "83", "84", "85", "86", "87",
|
||||
"88", "89", "8a", "8b", "8c", "8d", "8e", "8f",
|
||||
"90", "91", "92", "93", "94", "95", "96", "97",
|
||||
"98", "99", "9a", "9b", "9c", "9d", "9e", "9f",
|
||||
"a0", "a1", "a2", "a3", "a4", "a5", "a6", "a7",
|
||||
"a8", "a9", "aa", "ab", "ac", "ad", "ae", "af",
|
||||
"b0", "b1", "b2", "b3", "b4", "b5", "b6", "b7",
|
||||
"b8", "b9", "ba", "bb", "bc", "bd", "be", "bf",
|
||||
"c0", "c1", "c2", "c3", "c4", "c5", "c6", "c7",
|
||||
"c8", "c9", "ca", "cb", "cc", "cd", "ce", "cf",
|
||||
"d0", "d1", "d2", "d3", "d4", "d5", "d6", "d7",
|
||||
"d8", "d9", "da", "db", "dc", "dd", "de", "df",
|
||||
"e0", "e1", "e2", "e3", "e4", "e5", "e6", "e7",
|
||||
"e8", "e9", "ea", "eb", "ec", "ed", "ee", "ef",
|
||||
"f0", "f1", "f2", "f3", "f4", "f5", "f6", "f7",
|
||||
"f8", "f9", "fa", "fb", "fc", "fd", "fe", "ff",
|
||||
};
|
||||
|
||||
static unsigned int hexvalues[256]; /* for parsing hex input */
|
||||
|
@ -561,12 +561,12 @@ int auth_initialize ( char *authfilename )
|
|||
}
|
||||
|
||||
iceauth_filename = strdup(authfilename);
|
||||
|
||||
|
||||
if (ignore_locks) {
|
||||
if (break_locks) IceUnlockAuthFile (authfilename);
|
||||
} else {
|
||||
n = IceLockAuthFile (authfilename, ICEAUTH_DEFAULT_RETRIES,
|
||||
ICEAUTH_DEFAULT_TIMEOUT,
|
||||
ICEAUTH_DEFAULT_TIMEOUT,
|
||||
(break_locks ? 0L : ICEAUTH_DEFAULT_DEADTIME));
|
||||
if (n != IceAuthLockSuccess) {
|
||||
const char *reason = "unknown error";
|
||||
|
@ -604,7 +604,7 @@ int auth_initialize ( char *authfilename )
|
|||
errno = olderrno;
|
||||
return -1;
|
||||
} /* else ignore it */
|
||||
fprintf (stderr,
|
||||
fprintf (stderr,
|
||||
"%s: creating new authority file %s\n",
|
||||
ProgramName, authfilename);
|
||||
} else {
|
||||
|
@ -625,7 +625,7 @@ int auth_initialize ( char *authfilename )
|
|||
iceauth_modified = False;
|
||||
|
||||
if (verbose) {
|
||||
printf ("%s authority file %s\n",
|
||||
printf ("%s authority file %s\n",
|
||||
ignore_locks ? "Ignoring locks on" : "Using", authfilename);
|
||||
}
|
||||
return 0;
|
||||
|
@ -640,7 +640,7 @@ static int write_auth_file (char *tmp_nam, size_t tmp_nam_len)
|
|||
tmp_nam[tmp_nam_len - 1] = '\0';
|
||||
return -1;
|
||||
}
|
||||
|
||||
|
||||
strcpy (tmp_nam, iceauth_filename);
|
||||
strcat (tmp_nam, "-n"); /* for new */
|
||||
(void) unlink (tmp_nam);
|
||||
|
@ -649,7 +649,7 @@ static int write_auth_file (char *tmp_nam, size_t tmp_nam_len)
|
|||
fprintf (stderr, "%s: unable to open tmp file \"%s\"\n",
|
||||
ProgramName, tmp_nam);
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
for (AuthList *list = iceauth_head; list; list = list->next) {
|
||||
IceWriteAuthFileEntry (fp, list->auth);
|
||||
|
@ -680,14 +680,14 @@ int auth_finalize (void)
|
|||
#endif
|
||||
}
|
||||
} else if (!iceauth_allowed) {
|
||||
fprintf (stderr,
|
||||
fprintf (stderr,
|
||||
"%s: %s not writable, changes ignored\n",
|
||||
ProgramName, iceauth_filename);
|
||||
} else {
|
||||
char temp_name[1024]; /* large filename size */
|
||||
|
||||
if (verbose) {
|
||||
printf ("%s authority file %s\n",
|
||||
printf ("%s authority file %s\n",
|
||||
ignore_locks ? "Ignoring locks and writing" :
|
||||
"Writing", iceauth_filename);
|
||||
}
|
||||
|
@ -1046,7 +1046,7 @@ int print_help (
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return n;
|
||||
}
|
||||
|
||||
|
@ -1202,8 +1202,8 @@ static int do_merge (
|
|||
|
||||
nentries = merge_entries (&iceauth_head, listhead,
|
||||
&nnew, &nrepl, &ndup);
|
||||
if (verbose)
|
||||
printf ("%d entries read in: %d new, %d replacement%s\n",
|
||||
if (verbose)
|
||||
printf ("%d entries read in: %d new, %d replacement%s\n",
|
||||
nentries, nnew, nrepl, nrepl != 1 ? "s" : "");
|
||||
if (nentries > 0) iceauth_modified = True;
|
||||
}
|
||||
|
@ -1234,16 +1234,16 @@ static int do_extract (
|
|||
ed.nwritten = 0;
|
||||
ed.cmd = argv[0];
|
||||
|
||||
errors = search_and_do (inputfilename, lineno, 2, argc, argv,
|
||||
errors = search_and_do (inputfilename, lineno, 2, argc, argv,
|
||||
extract_entry, &ed);
|
||||
|
||||
if (!ed.fp) {
|
||||
fprintf (stderr,
|
||||
fprintf (stderr,
|
||||
"No matches found, authority file \"%s\" not written\n",
|
||||
ed.filename);
|
||||
} else {
|
||||
if (verbose) {
|
||||
printf ("%d entries written to \"%s\"\n",
|
||||
printf ("%d entries written to \"%s\"\n",
|
||||
ed.nwritten, ed.filename);
|
||||
}
|
||||
if (!ed.used_stdout) {
|
||||
|
@ -1263,7 +1263,7 @@ static int do_add (
|
|||
int lineno,
|
||||
int argc,
|
||||
const char **argv)
|
||||
{
|
||||
{
|
||||
int n, nnew, nrepl, ndup;
|
||||
const char *protoname;
|
||||
const char *protodata_hex;
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
#
|
||||
#
|
||||
# Copyright 2005 Red Hat, Inc.
|
||||
#
|
||||
#
|
||||
# Permission to use, copy, modify, distribute, and sell 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
|
||||
|
@ -10,7 +10,7 @@
|
|||
# specific, written prior permission. Red Hat makes no
|
||||
# representations about the suitability of this software for any purpose. It
|
||||
# is provided "as is" without express or implied warranty.
|
||||
#
|
||||
#
|
||||
# RED HAT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
|
||||
# INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
|
||||
# EVENT SHALL RED HAT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
|
||||
|
|
1783
app/ico/config.guess
vendored
1783
app/ico/config.guess
vendored
File diff suppressed because it is too large
Load diff
2954
app/ico/config.sub
vendored
2954
app/ico/config.sub
vendored
File diff suppressed because it is too large
Load diff
|
@ -1,6 +1,6 @@
|
|||
|
||||
dnl Copyright 2005 Red Hat, Inc.
|
||||
dnl
|
||||
dnl
|
||||
dnl Permission to use, copy, modify, distribute, and sell this software and its
|
||||
dnl documentation for any purpose is hereby granted without fee, provided that
|
||||
dnl the above copyright notice appear in all copies and that both that
|
||||
|
@ -10,7 +10,7 @@ dnl advertising or publicity pertaining to distribution of the software without
|
|||
dnl specific, written prior permission. Red Hat makes no
|
||||
dnl representations about the suitability of this software for any purpose. It
|
||||
dnl is provided "as is" without express or implied warranty.
|
||||
dnl
|
||||
dnl
|
||||
dnl RED HAT DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE,
|
||||
dnl INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO
|
||||
dnl EVENT SHALL RED HAT BE LIABLE FOR ANY SPECIAL, INDIRECT OR
|
||||
|
|
|
@ -28,13 +28,13 @@ Copyright 1987 by Digital Equipment Corporation, Maynard, Massachusetts.
|
|||
|
||||
All Rights Reserved
|
||||
|
||||
Permission to use, copy, modify, and distribute this software and its
|
||||
documentation for any purpose and without fee is hereby granted,
|
||||
Permission to use, copy, modify, and distribute this software and its
|
||||
documentation for any purpose and without fee is hereby granted,
|
||||
provided that the above copyright notice appear in all copies and that
|
||||
both that copyright notice and this permission notice appear in
|
||||
both that copyright notice and this permission notice appear in
|
||||
supporting documentation, and that the name of Digital not be
|
||||
used in advertising or publicity pertaining to distribution of the
|
||||
software without specific, written prior permission.
|
||||
software without specific, written prior permission.
|
||||
|
||||
DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
|
||||
ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
|
||||
|
@ -154,7 +154,7 @@ struct closure {
|
|||
Point3D xv[2][MAXNV];
|
||||
int xv_buffer;
|
||||
double wo2, ho2;
|
||||
#ifdef MULTITHREAD
|
||||
#ifdef MULTITHREAD
|
||||
int thread_num;
|
||||
#endif
|
||||
};
|
||||
|
@ -191,11 +191,11 @@ static const char *help_message =
|
|||
" -bg color background color\n"
|
||||
" -colors color ... codes to use on sides\n"
|
||||
" -p# use # (1 through 8) primary colors\n"
|
||||
#ifdef MULTIBUFFER
|
||||
#ifdef MULTIBUFFER
|
||||
" -dbl use double buffering extension (if present)\n"
|
||||
#else
|
||||
#else
|
||||
" -dbl use double buffering (software only)\n"
|
||||
#endif
|
||||
#endif
|
||||
" -softdbl use software double buffering\n"
|
||||
" -noedges don't draw wire frame edges\n"
|
||||
" -faces draw faces\n"
|
||||
|
@ -207,7 +207,7 @@ static const char *help_message =
|
|||
" -sleep number seconds to sleep in between draws\n"
|
||||
" -obj objname type of polyhedral object to draw\n"
|
||||
" -objhelp list polyhedral objects available\n"
|
||||
#ifdef MULTITHREAD
|
||||
#ifdef MULTITHREAD
|
||||
" -threads number number of windows, each its own thread\n"
|
||||
#endif
|
||||
" -version print program version\n"
|
||||
|
@ -842,7 +842,7 @@ do_ico_window(void *ptr)
|
|||
Bool do_it = True;
|
||||
char buf[20];
|
||||
struct closure *closure = ptr;
|
||||
#ifdef MULTITHREAD
|
||||
#ifdef MULTITHREAD
|
||||
int len;
|
||||
#endif
|
||||
|
||||
|
@ -862,7 +862,7 @@ do_ico_window(void *ptr)
|
|||
if (XAllocNamedColor (dpy, closure->cmap, background_colorname,
|
||||
&cdef, &igndef))
|
||||
bg = cdef.pixel;
|
||||
else
|
||||
else
|
||||
icoFatal("background: no such color \"%s\"",background_colorname);
|
||||
}
|
||||
if (numcolors && (!dofaces || numcolors == 1)) {
|
||||
|
@ -870,7 +870,7 @@ do_ico_window(void *ptr)
|
|||
|
||||
if (XAllocNamedColor (dpy, closure->cmap, colornames[0], &cdef, &igndef))
|
||||
fg = cdef.pixel;
|
||||
else
|
||||
else
|
||||
icoFatal("face: no such color \"%s\"", colornames[0]);
|
||||
}
|
||||
|
||||
|
@ -892,7 +892,7 @@ do_ico_window(void *ptr)
|
|||
closure->winW = closure->winH = (multibufext&&dblbuf ? 300 : 600);
|
||||
winX = (DisplayWidth(dpy, DefaultScreen(dpy)) - closure->winW) >> 1;
|
||||
winY = (DisplayHeight(dpy, DefaultScreen(dpy)) - closure->winH) >> 1;
|
||||
if (geom)
|
||||
if (geom)
|
||||
XParseGeometry(geom, &winX, &winY,
|
||||
(unsigned int *)&closure->winW,
|
||||
(unsigned int *)&closure->winH);
|
||||
|
@ -904,19 +904,19 @@ do_ico_window(void *ptr)
|
|||
xswa.border_pixel = fg;
|
||||
|
||||
closure->draw_window = XCreateWindow(dpy,
|
||||
DefaultRootWindow(dpy),
|
||||
winX, winY, closure->winW, closure->winH, 0,
|
||||
DefaultDepth(dpy, DefaultScreen(dpy)),
|
||||
DefaultRootWindow(dpy),
|
||||
winX, winY, closure->winW, closure->winH, 0,
|
||||
DefaultDepth(dpy, DefaultScreen(dpy)),
|
||||
InputOutput, DefaultVisual(dpy, DefaultScreen(dpy)),
|
||||
CWEventMask | CWBackPixel | CWBorderPixel, &xswa);
|
||||
#ifdef MULTITHREAD
|
||||
#ifdef MULTITHREAD
|
||||
len = sprintf(buf, "Ico: thread %d", closure->thread_num);
|
||||
XChangeProperty(dpy, closure->draw_window,
|
||||
XA_WM_NAME, XA_STRING, 8,
|
||||
XA_WM_NAME, XA_STRING, 8,
|
||||
PropModeReplace, (unsigned char *)buf, len);
|
||||
#else
|
||||
XChangeProperty(dpy, closure->draw_window,
|
||||
XA_WM_NAME, XA_STRING, 8,
|
||||
XA_WM_NAME, XA_STRING, 8,
|
||||
PropModeReplace, (unsigned char *)"Ico", 3);
|
||||
#endif
|
||||
(void) XSetWMProtocols (dpy, closure->draw_window,
|
||||
|
@ -940,7 +940,7 @@ do_ico_window(void *ptr)
|
|||
closure->winH = xwa.height;
|
||||
}
|
||||
|
||||
if (ico_geom)
|
||||
if (ico_geom)
|
||||
XParseGeometry (ico_geom, &icoX, &icoY,
|
||||
(unsigned int *)&icoW,
|
||||
(unsigned int *)&icoH);
|
||||
|
@ -970,7 +970,7 @@ do_ico_window(void *ptr)
|
|||
DefaultGC(dpy, DefaultScreen(dpy)),
|
||||
0, 0, closure->winW, closure->winH, 0, 0);
|
||||
closure->win = closure->multibuffers[1];
|
||||
} else
|
||||
} else
|
||||
icoFatal ("unable to obtain 2 buffers");
|
||||
}
|
||||
#endif /* MULTIBUFFER */
|
||||
|
@ -1275,7 +1275,7 @@ int main(int argc, const char **argv)
|
|||
polyobj = findpoly(*++argv); argc--;
|
||||
} else if (!strcmp(*argv, "-dsync"))
|
||||
dsync = 1;
|
||||
else if (!strncmp(*argv, "-sync", 5))
|
||||
else if (!strncmp(*argv, "-sync", 5))
|
||||
xsync = 1;
|
||||
else if (!strcmp(*argv, "-objhelp")) {
|
||||
giveObjHelp();
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue