int y1,
int x2,
int y2) ;
-static int round(
+static int wmround(
double x) ;
static void DrawClockFace(
DtClockGadget g) ;
wc = width * cosangle;
ws = width * sinangle;
SetSegment (w,
- x = w->clock.centerX + round (length * sinangle),
- y = w->clock.centerY - round (length * cosangle),
- x1 = w->clock.centerX - round (ws + wc),
- y1 = w->clock.centerY + round (wc - ws)); /* 1 ---- 2 */
+ x = w->clock.centerX + wmround (length * sinangle),
+ y = w->clock.centerY - wmround (length * cosangle),
+ x1 = w->clock.centerX - wmround (ws + wc),
+ y1 = w->clock.centerY + wmround (wc - ws)); /* 1 ---- 2 */
SetSegment (w, x1, y1,
- x2 = w->clock.centerX - round (ws - wc),
- y2 = w->clock.centerY + round (wc + ws)); /* 2 ----- 3 */
+ x2 = w->clock.centerX - wmround (ws - wc),
+ y2 = w->clock.centerY + wmround (wc + ws)); /* 2 ----- 3 */
SetSegment (w, x2, y2, x, y); /* 3 ----- 1 (4) */
}
** round integer.
*/
static int
-round(
+wmround(
double x )
{
return (x >= 0.0 ? (int) (x + .5) : (int) (x - .5));
bin_PROGRAMS = dtwm dtfplist
-dist_config_DATA = sys.dtwmrc
+dist_config_DATA = sys.dtwmrc Dtwm.defs
+BUILT_SOURCES = sys.dtwmrc Dtwm.defs
AM_CPPFLAGS = -DLARGECURSORS -DR2_COMPAT -DOPAQUE -DSHAPE -DUNMAP_ON_RESTART \
-DBATCH_DRAG_REQUESTS -DCDE_INSTALLATION_TOP=\"${prefix}\" \
-DCDE_CONFIGURATION_TOP=\"$(CDE_CONFIGURATION_TOP)\" \
- -I$(TIRPCINC)
+ $(TIRPCINC)
-AM_LDADD = $(LIBXIN) -lXinerama $(LIBPRINT) $(LIBHELP) $(LIBWIDGET) \
- $(LIBSVC) $(LIBTT) -lXm $(XTOOLLIB) ${X_LIBS}
+dtwm_LDADD = @DTCLIENTLIBS@ $(TIRPCLIB) -lXm -lXext $(XTOOLLIB)
+dtfplist_LDADD = @DTCLIENTLIBS@ $(TIRPCLIB) -lXm -lXext $(XTOOLLIB)
if SOLARIS
-AM_LDADD += -lintl -lresolv
-endif
-
-if HPUX
-AM_CFLAGS += -D_HPUX_SOURCE
+dtwm_LDADD += -lintl -lresolv
+dtfplist_LDADD += -lintl -lresolv
endif
dtwm_SOURCES = WmCDInfo.c WmCDecor.c WmCEvent.c \
WmMenu.c WmProperty.c WmProtocol.c \
WmResCvt.c WmResParse.c WmResource.c \
WmSignal.c WmWinConf.c WmWinInfo.c \
- WmWinList.c WmWinState.c WmMultiHead.c
+ WmWinList.c WmWinState.c WmMultiHead.c \
Button.c Callback.c Clock.c \
DataBaseLoad.c PanelS.c Parse.c \
PopupMenu.c Session.c UI.c \
SCRIPTFLAGS = -DCDE_INSTALLATION_TOP=${prefix} \
-DCDE_CONFIGURATION_TOP=$(CDE_CONFIGURATION_TOP)
-CPPSRC = Dtwm.defs.src
-CPPTARGET = Dtwm.defs
-include $(srcdir)/include/cppfile.tmpl
+Dtwm.defs: Dtwm.defs.src
+ $(RM) $@
+ $(CPP) -P -DXCOMM=# $(AM_CPPFLAGS) - < $< > $@
CPPSRC = sys.dtwmrc.src
-CPPTARGET = sys.dtwmrc
-include $(srcdir)/include/cppfile.tmpl
+sys.dtwmrc: sys.dtwmrc.src
+ $(RM) $@
+ $(CPP) -P -DXCOMM=# $(AM_CPPFLAGS) - < $< > $@
+
OLD_CODE
Vestigal code.
- PORT_NOVFORK
- Enable for systems that don't have the vfork() call.
-
R2_COMPAT
Enables support for old clients that still pass window geometry
hint information in WM_NORMAL_HINTS.
#include <Xm/RowColumnP.h> /* for MS_LastManagedMenuTime */
extern XmMenuState _XmGetMenuState();
-extern int putenv ();
-extern char * getenv ();
-#ifndef PORT_NOVFORK
-extern pid_t vfork();
-#endif /* PORT_NOVFORK */
+#if defined(HAVE_CONFIG_H)
+#include <autotools_config.h>
+#endif
+
+#if defined(HAVE_SYS_TYPES_H)
+#include <sys/types.h>
+#endif
+
+#include <unistd.h>
+#include <stdlib.h>
+
+#if defined(HAVE_VFORK) && defined(HAVE_VFORK_H)
+#include <vfork.h>
+#endif
static unsigned int GetEventInverseMask(XEvent *event);
#if (defined(__linux__) || defined(sun) || defined(CSRG_BASED)) && !defined(_NFILE)
#define _NFILE FOPEN_MAX
#endif
+
#define CLOSE_FILES_ON_EXEC() \
-{int ifx; for (ifx=3; ifx < _NFILE; ifx++) (void) fcntl (ifx, F_SETFD, 1);}
+{int ifx; for (ifx=3; ifx < _NFILE; ifx++) (void) fcntl (ifx, F_SETFD, FD_CLOEXEC);}
/*
* Global Variables:
* Fork a process to exec a shell to run the specified command:
*/
-#ifdef PORT_NOVFORK
- if ((pid = fork ()) == 0)
-#else
+#if defined(HAVE_VFORK)
if ((pid = vfork ()) == 0)
+#else
+ if ((pid = fork ()) == 0)
#endif
{