mirror of
git://git.code.sf.net/p/cdesktopenv/code
synced 2025-02-15 04:32:24 +00:00
Linux compilation of dtcm (Calendar), (Matthew Howkins)
This commit is contained in:
parent
5388cb4314
commit
cc1d109aa9
27 changed files with 117 additions and 32 deletions
|
@ -47,6 +47,12 @@ EXTRA_CCOPTIONS = -xstrconst -Xc -v
|
||||||
EXTRA_LIBRARIES = $(FNS_EXTRA_LIBS)
|
EXTRA_LIBRARIES = $(FNS_EXTRA_LIBS)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
XCOMM On Linux once you link against a C++ library the whole program
|
||||||
|
XCOMM has to be linked with the C++ linker
|
||||||
|
#if defined(LinuxDistribution)
|
||||||
|
CCLINK = $(CXX)
|
||||||
|
#endif
|
||||||
|
|
||||||
PROG1 = dtcm
|
PROG1 = dtcm
|
||||||
SRCS1 = MonthPanel.c RFCMIME.c about.c \
|
SRCS1 = MonthPanel.c RFCMIME.c about.c \
|
||||||
alarm.c blist.c browser.c \
|
alarm.c blist.c browser.c \
|
||||||
|
|
|
@ -69,6 +69,9 @@
|
||||||
|
|
||||||
#define XOS_USE_XT_LOCKING
|
#define XOS_USE_XT_LOCKING
|
||||||
#define X_INCLUDE_TIME_H
|
#define X_INCLUDE_TIME_H
|
||||||
|
#if defined(linux)
|
||||||
|
#undef SVR4
|
||||||
|
#endif
|
||||||
#include <X11/Xos_r.h>
|
#include <X11/Xos_r.h>
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -131,6 +131,9 @@ static char sccsid[] = "@(#)calendarA.c 1.196 95/04/12 Copyr 1991 Sun Microsyst
|
||||||
#include "cmtt.h"
|
#include "cmtt.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(linux)
|
||||||
|
#undef SVR4
|
||||||
|
#endif
|
||||||
#include <X11/Xos.h>
|
#include <X11/Xos.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#ifdef X_NOT_STDC_ENV
|
#ifdef X_NOT_STDC_ENV
|
||||||
|
|
|
@ -81,6 +81,9 @@ static char sccsid[] = "@(#)dayglance.c 1.76 95/04/24 Copyr 1991 Sun Microsystem
|
||||||
|
|
||||||
#define XOS_USE_XT_LOCKING
|
#define XOS_USE_XT_LOCKING
|
||||||
#define X_INCLUDE_TIME_H
|
#define X_INCLUDE_TIME_H
|
||||||
|
#if defined(linux)
|
||||||
|
#undef SVR4
|
||||||
|
#endif
|
||||||
#include <X11/Xos_r.h>
|
#include <X11/Xos_r.h>
|
||||||
|
|
||||||
extern int debug;
|
extern int debug;
|
||||||
|
|
|
@ -60,6 +60,9 @@
|
||||||
|
|
||||||
#define XOS_USE_XT_LOCKING
|
#define XOS_USE_XT_LOCKING
|
||||||
#define X_INCLUDE_TIME_H
|
#define X_INCLUDE_TIME_H
|
||||||
|
#if defined(linux)
|
||||||
|
#undef SVR4
|
||||||
|
#endif
|
||||||
#include <X11/Xos_r.h>
|
#include <X11/Xos_r.h>
|
||||||
|
|
||||||
static void layout_labels(Widget, Widget, Widget, Widget);
|
static void layout_labels(Widget, Widget, Widget, Widget);
|
||||||
|
|
|
@ -69,6 +69,9 @@ static char sccsid[] = "@(#)format.c 1.27 95/01/19 Copyr 1991 Sun Microsystems,
|
||||||
|
|
||||||
#define XOS_USE_XT_LOCKING
|
#define XOS_USE_XT_LOCKING
|
||||||
#define X_INCLUDE_TIME_H
|
#define X_INCLUDE_TIME_H
|
||||||
|
#if defined(linux)
|
||||||
|
#undef SVR4
|
||||||
|
#endif
|
||||||
#include <X11/Xos_r.h>
|
#include <X11/Xos_r.h>
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -101,6 +101,9 @@ static char sccsid[] = "@(#)monthglance.c 1.82 95/07/27 Copyr 1994 Sun Microsys
|
||||||
|
|
||||||
#define XOS_USE_XT_LOCKING
|
#define XOS_USE_XT_LOCKING
|
||||||
#define X_INCLUDE_TIME_H
|
#define X_INCLUDE_TIME_H
|
||||||
|
#if defined(linux)
|
||||||
|
#undef SVR4
|
||||||
|
#endif
|
||||||
#include <X11/Xos_r.h>
|
#include <X11/Xos_r.h>
|
||||||
|
|
||||||
static void paint_day_entries(Tick, int, int, int, int,
|
static void paint_day_entries(Tick, int, int, int, int,
|
||||||
|
|
|
@ -89,7 +89,11 @@ static char sccsid[] = "@(#)tempbr.c 1.48 95/03/28 Copyr 1991 Sun Microsystems,
|
||||||
static void tb_cancel_cb();
|
static void tb_cancel_cb();
|
||||||
static void tb_close_cb();
|
static void tb_close_cb();
|
||||||
static void tempbr_show_cb(Widget w, XtPointer data, XtPointer cbs);
|
static void tempbr_show_cb(Widget w, XtPointer data, XtPointer cbs);
|
||||||
|
#if defined(linux)
|
||||||
|
#include <string.h>
|
||||||
|
#else
|
||||||
extern char *strdup(const char *);
|
extern char *strdup(const char *);
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef FNS_DEMO
|
#ifdef FNS_DEMO
|
||||||
/* This stuff is currently broken */
|
/* This stuff is currently broken */
|
||||||
|
|
|
@ -77,6 +77,9 @@
|
||||||
|
|
||||||
#define XOS_USE_XT_LOCKING
|
#define XOS_USE_XT_LOCKING
|
||||||
#define X_INCLUDE_TIME_H
|
#define X_INCLUDE_TIME_H
|
||||||
|
#if defined(linux)
|
||||||
|
#undef SVR4
|
||||||
|
#endif
|
||||||
#include <X11/Xos_r.h>
|
#include <X11/Xos_r.h>
|
||||||
|
|
||||||
static int week_xytoclock(Week *w, int x, int y);
|
static int week_xytoclock(Week *w, int x, int y);
|
||||||
|
|
|
@ -66,6 +66,9 @@
|
||||||
|
|
||||||
#define XOS_USE_XT_LOCKING
|
#define XOS_USE_XT_LOCKING
|
||||||
#define X_INCLUDE_TIME_H
|
#define X_INCLUDE_TIME_H
|
||||||
|
#if defined(linux)
|
||||||
|
#undef SVR4
|
||||||
|
#endif
|
||||||
#include <X11/Xos_r.h>
|
#include <X11/Xos_r.h>
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|
|
@ -88,6 +88,9 @@ static char sccsid[] = "@(#)yearglance.c 1.37 95/07/27 Copyr 1991 Sun Microsyste
|
||||||
|
|
||||||
#define XOS_USE_XT_LOCKING
|
#define XOS_USE_XT_LOCKING
|
||||||
#define X_INCLUDE_TIME_H
|
#define X_INCLUDE_TIME_H
|
||||||
|
#if defined(linux)
|
||||||
|
#undef SVR4
|
||||||
|
#endif
|
||||||
#include <X11/Xos_r.h>
|
#include <X11/Xos_r.h>
|
||||||
|
|
||||||
/* if positioning of months in year view changes this must change too!
|
/* if positioning of months in year view changes this must change too!
|
||||||
|
|
|
@ -73,76 +73,76 @@ extern long timezone;
|
||||||
timedate: /* empty */
|
timedate: /* empty */
|
||||||
| timedate item;
|
| timedate item;
|
||||||
|
|
||||||
item: tspec =
|
item: tspec
|
||||||
{timeflag++;}
|
{timeflag++;}
|
||||||
| zone =
|
| zone
|
||||||
{zoneflag++;}
|
{zoneflag++;}
|
||||||
| dtspec =
|
| dtspec
|
||||||
{dateflag++;}
|
{dateflag++;}
|
||||||
| dyspec =
|
| dyspec
|
||||||
{dayflag++;}
|
{dayflag++;}
|
||||||
| rspec =
|
| rspec
|
||||||
{relflag++;}
|
{relflag++;}
|
||||||
| nspec;
|
| nspec;
|
||||||
|
|
||||||
nspec: NUMBER =
|
nspec: NUMBER
|
||||||
{if (timeflag && dateflag && !relflag) year = $1;
|
{if (timeflag && dateflag && !relflag) year = $1;
|
||||||
else {timeflag++;hh = $1/100;mm = $1%100;ss = 0;merid = 24;}};
|
else {timeflag++;hh = $1/100;mm = $1%100;ss = 0;merid = 24;}};
|
||||||
|
|
||||||
tspec: NUMBER MERIDIAN =
|
tspec: NUMBER MERIDIAN
|
||||||
{hh = $1; mm = 0; ss = 0; merid = $2;}
|
{hh = $1; mm = 0; ss = 0; merid = $2;}
|
||||||
| NUMBER ':' NUMBER =
|
| NUMBER ':' NUMBER
|
||||||
{hh = $1; mm = $3; merid = 24;}
|
{hh = $1; mm = $3; merid = 24;}
|
||||||
| NUMBER ':' NUMBER MERIDIAN =
|
| NUMBER ':' NUMBER MERIDIAN
|
||||||
{hh = $1; mm = $3; merid = $4;}
|
{hh = $1; mm = $3; merid = $4;}
|
||||||
| NUMBER ':' NUMBER ':' NUMBER =
|
| NUMBER ':' NUMBER ':' NUMBER
|
||||||
{hh = $1; mm = $3; ss = $5; merid = 24;}
|
{hh = $1; mm = $3; ss = $5; merid = 24;}
|
||||||
| NUMBER ':' NUMBER ':' NUMBER MERIDIAN =
|
| NUMBER ':' NUMBER ':' NUMBER MERIDIAN
|
||||||
{hh = $1; mm = $3; ss = $5; merid = $6;};
|
{hh = $1; mm = $3; ss = $5; merid = $6;};
|
||||||
|
|
||||||
zone: ZONE =
|
zone: ZONE
|
||||||
{ourzone = $1; daylightsavings = STANDARD;}
|
{ourzone = $1; daylightsavings = STANDARD;}
|
||||||
| DAYZONE =
|
| DAYZONE
|
||||||
{ourzone = $1; daylightsavings = DAYLIGHT;};
|
{ourzone = $1; daylightsavings = DAYLIGHT;};
|
||||||
|
|
||||||
dyspec: DAY =
|
dyspec: DAY
|
||||||
{dayord = 1; dayreq = $1;}
|
{dayord = 1; dayreq = $1;}
|
||||||
| DAY ',' =
|
| DAY ','
|
||||||
{dayord = 1; dayreq = $1;}
|
{dayord = 1; dayreq = $1;}
|
||||||
| NUMBER DAY =
|
| NUMBER DAY
|
||||||
{dayord = $1; dayreq = $2;};
|
{dayord = $1; dayreq = $2;};
|
||||||
|
|
||||||
dtspec: NUMBER '/' NUMBER =
|
dtspec: NUMBER '/' NUMBER
|
||||||
{month = $1; day = $3; noyear = 1;}
|
{month = $1; day = $3; noyear = 1;}
|
||||||
| NUMBER '/' NUMBER '/' NUMBER =
|
| NUMBER '/' NUMBER '/' NUMBER
|
||||||
{month = $1; day = $3; year = $5;}
|
{month = $1; day = $3; year = $5;}
|
||||||
| NUMBER '-' NUMBER =
|
| NUMBER '-' NUMBER
|
||||||
{month = $1; day = $3; noyear = 1;}
|
{month = $1; day = $3; noyear = 1;}
|
||||||
| NUMBER '-' NUMBER '-' NUMBER =
|
| NUMBER '-' NUMBER '-' NUMBER
|
||||||
{month = $1; day = $3; year = $5;}
|
{month = $1; day = $3; year = $5;}
|
||||||
| MONTH NUMBER =
|
| MONTH NUMBER
|
||||||
{month = $1; day = $2; noyear = 1;}
|
{month = $1; day = $2; noyear = 1;}
|
||||||
| MONTH NUMBER ',' NUMBER =
|
| MONTH NUMBER ',' NUMBER
|
||||||
{month = $1; day = $2; year = $4;}
|
{month = $1; day = $2; year = $4;}
|
||||||
| NUMBER MONTH =
|
| NUMBER MONTH
|
||||||
{month = $2; day = $1; noyear = 1;}
|
{month = $2; day = $1; noyear = 1;}
|
||||||
| NUMBER MONTH NUMBER =
|
| NUMBER MONTH NUMBER
|
||||||
{month = $2; day = $1; year = $3;};
|
{month = $2; day = $1; year = $3;};
|
||||||
|
|
||||||
|
|
||||||
rspec: NUMBER UNIT =
|
rspec: NUMBER UNIT
|
||||||
{relsec += 60L * $1 * $2;}
|
{relsec += 60L * $1 * $2;}
|
||||||
| NUMBER MUNIT =
|
| NUMBER MUNIT
|
||||||
{relmonth += $1 * $2;}
|
{relmonth += $1 * $2;}
|
||||||
| NUMBER SUNIT =
|
| NUMBER SUNIT
|
||||||
{relsec += $1;}
|
{relsec += $1;}
|
||||||
| UNIT =
|
| UNIT
|
||||||
{relsec += 60L * $1;}
|
{relsec += 60L * $1;}
|
||||||
| MUNIT =
|
| MUNIT
|
||||||
{relmonth += $1;}
|
{relmonth += $1;}
|
||||||
| SUNIT =
|
| SUNIT
|
||||||
{relsec++;}
|
{relsec++;}
|
||||||
| rspec AGO =
|
| rspec AGO
|
||||||
{relsec = -relsec; relmonth = -relmonth;};
|
{relsec = -relsec; relmonth = -relmonth;};
|
||||||
%%
|
%%
|
||||||
|
|
||||||
|
|
|
@ -58,7 +58,13 @@ static char sccsid[] = "@(#)timeops.c 1.13 95/05/02 Copyr 1991 Sun Microsystems,
|
||||||
|
|
||||||
#define XOS_USE_NO_LOCKING
|
#define XOS_USE_NO_LOCKING
|
||||||
#define X_INCLUDE_TIME_H
|
#define X_INCLUDE_TIME_H
|
||||||
|
#if defined(linux)
|
||||||
|
#undef SVR4
|
||||||
|
#endif
|
||||||
#include <X11/Xos_r.h>
|
#include <X11/Xos_r.h>
|
||||||
|
#if defined(linux)
|
||||||
|
#define SVR4
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <sys/param.h>
|
#include <sys/param.h>
|
||||||
#include <sys/time.h>
|
#include <sys/time.h>
|
||||||
|
|
|
@ -72,6 +72,9 @@
|
||||||
#define X_INCLUDE_STRING_H
|
#define X_INCLUDE_STRING_H
|
||||||
#define X_INCLUDE_TIME_H
|
#define X_INCLUDE_TIME_H
|
||||||
#define XOS_USE_NO_LOCKING
|
#define XOS_USE_NO_LOCKING
|
||||||
|
#if defined(linux)
|
||||||
|
#undef SVR4
|
||||||
|
#endif
|
||||||
#include <X11/Xos_r.h>
|
#include <X11/Xos_r.h>
|
||||||
|
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
|
|
@ -49,6 +49,12 @@ EXTRA_CCOPTIONS = -xstrconst -Xc -v
|
||||||
EXTRA_LIBRARIES = -lsocket -lnsl -lintl
|
EXTRA_LIBRARIES = -lsocket -lnsl -lintl
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
XCOMM On Linux once you link against a C++ library the whole program
|
||||||
|
XCOMM has to be linked with the C++ linker
|
||||||
|
#if defined(LinuxDistribution)
|
||||||
|
CCLINK = $(CXX)
|
||||||
|
#endif
|
||||||
|
|
||||||
SRCS = \
|
SRCS = \
|
||||||
parser.y access.c callback.c \
|
parser.y access.c callback.c \
|
||||||
cmscalendar.c cmsconvert.c cmsentry.c \
|
cmscalendar.c cmsconvert.c cmsentry.c \
|
||||||
|
|
|
@ -35,6 +35,9 @@
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#define XOS_USE_NO_LOCKING
|
#define XOS_USE_NO_LOCKING
|
||||||
#define X_INCLUDE_TIME_H
|
#define X_INCLUDE_TIME_H
|
||||||
|
#if defined(linux)
|
||||||
|
#undef SVR4
|
||||||
|
#endif
|
||||||
#include <X11/Xos_r.h>
|
#include <X11/Xos_r.h>
|
||||||
#include "log.h"
|
#include "log.h"
|
||||||
#include "rtable4.h"
|
#include "rtable4.h"
|
||||||
|
|
|
@ -39,6 +39,9 @@
|
||||||
#include <sys/file.h>
|
#include <sys/file.h>
|
||||||
#define XOS_USE_NO_LOCKING
|
#define XOS_USE_NO_LOCKING
|
||||||
#define X_INCLUDE_TIME_H
|
#define X_INCLUDE_TIME_H
|
||||||
|
#if defined(linux)
|
||||||
|
#undef SVR4
|
||||||
|
#endif
|
||||||
#include <X11/Xos_r.h>
|
#include <X11/Xos_r.h>
|
||||||
#include "cm.h"
|
#include "cm.h"
|
||||||
#include "rtable4.h"
|
#include "rtable4.h"
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#if defined(sun) && defined(_XOPEN_SOURCE)
|
#if (defined(sun) && defined(_XOPEN_SOURCE)) || defined(linux)
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
#endif
|
#endif
|
||||||
#include "csa.h"
|
#include "csa.h"
|
||||||
|
|
|
@ -30,6 +30,9 @@
|
||||||
|
|
||||||
#define XOS_USE_NO_LOCKING
|
#define XOS_USE_NO_LOCKING
|
||||||
#define X_INCLUDE_TIME_H
|
#define X_INCLUDE_TIME_H
|
||||||
|
#if defined(linux)
|
||||||
|
#undef SVR4
|
||||||
|
#endif
|
||||||
#include <X11/Xos_r.h>
|
#include <X11/Xos_r.h>
|
||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
|
@ -30,6 +30,9 @@
|
||||||
|
|
||||||
#define XOS_USE_NO_LOCKING
|
#define XOS_USE_NO_LOCKING
|
||||||
#define X_INCLUDE_TIME_H
|
#define X_INCLUDE_TIME_H
|
||||||
|
#if defined(linux)
|
||||||
|
#undef SVR4
|
||||||
|
#endif
|
||||||
#include <X11/Xos_r.h>
|
#include <X11/Xos_r.h>
|
||||||
|
|
||||||
#include <EUSCompat.h>
|
#include <EUSCompat.h>
|
||||||
|
|
|
@ -30,6 +30,9 @@
|
||||||
|
|
||||||
#define XOS_USE_NO_LOCKING
|
#define XOS_USE_NO_LOCKING
|
||||||
#define X_INCLUDE_TIME_H
|
#define X_INCLUDE_TIME_H
|
||||||
|
#if defined(linux)
|
||||||
|
#undef SVR4
|
||||||
|
#endif
|
||||||
#include <X11/Xos_r.h>
|
#include <X11/Xos_r.h>
|
||||||
|
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
|
|
|
@ -31,6 +31,9 @@
|
||||||
|
|
||||||
#define XOS_USE_NO_LOCKING
|
#define XOS_USE_NO_LOCKING
|
||||||
#define X_INCLUDE_TIME_H
|
#define X_INCLUDE_TIME_H
|
||||||
|
#if defined(linux)
|
||||||
|
#undef SVR4
|
||||||
|
#endif
|
||||||
#include <X11/Xos_r.h>
|
#include <X11/Xos_r.h>
|
||||||
|
|
||||||
#include "rerule.h"
|
#include "rerule.h"
|
||||||
|
|
|
@ -32,6 +32,9 @@
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#define XOS_USE_NO_LOCKING
|
#define XOS_USE_NO_LOCKING
|
||||||
#define X_INCLUDE_TIME_H
|
#define X_INCLUDE_TIME_H
|
||||||
|
#if defined(linux)
|
||||||
|
#undef SVR4
|
||||||
|
#endif
|
||||||
#include <X11/Xos_r.h>
|
#include <X11/Xos_r.h>
|
||||||
#include "csa.h"
|
#include "csa.h"
|
||||||
#include "rtable4.h"
|
#include "rtable4.h"
|
||||||
|
|
|
@ -30,6 +30,9 @@
|
||||||
|
|
||||||
#define XOS_USE_NO_LOCKING
|
#define XOS_USE_NO_LOCKING
|
||||||
#define X_INCLUDE_TIME_H
|
#define X_INCLUDE_TIME_H
|
||||||
|
#if defined(linux)
|
||||||
|
#undef SVR4
|
||||||
|
#endif
|
||||||
#include <X11/Xos_r.h>
|
#include <X11/Xos_r.h>
|
||||||
|
|
||||||
#include "rerule.h"
|
#include "rerule.h"
|
||||||
|
|
|
@ -37,6 +37,9 @@
|
||||||
|
|
||||||
#define XOS_USE_NO_LOCKING
|
#define XOS_USE_NO_LOCKING
|
||||||
#define X_INCLUDE_TIME_H
|
#define X_INCLUDE_TIME_H
|
||||||
|
#if defined(linux)
|
||||||
|
#undef SVR4
|
||||||
|
#endif
|
||||||
#include <X11/Xos_r.h>
|
#include <X11/Xos_r.h>
|
||||||
|
|
||||||
extern int monthdays[12];
|
extern int monthdays[12];
|
||||||
|
|
|
@ -28,6 +28,10 @@
|
||||||
* (c) Copyright 1993, 1994 Sun Microsystems, Inc.
|
* (c) Copyright 1993, 1994 Sun Microsystems, Inc.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
#if defined(linux)
|
||||||
|
#define _POSIX_C_SOURCE 2
|
||||||
|
#endif
|
||||||
|
|
||||||
#include <EUSCompat.h>
|
#include <EUSCompat.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
|
|
@ -41,7 +41,9 @@
|
||||||
#include "utility.h"
|
#include "utility.h"
|
||||||
#include "lutil.h"
|
#include "lutil.h"
|
||||||
|
|
||||||
|
#if !defined(linux)
|
||||||
extern char * strdup(const char *);
|
extern char * strdup(const char *);
|
||||||
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* calendar_name@host[.domain] -> calendar_name
|
* calendar_name@host[.domain] -> calendar_name
|
||||||
|
|
Loading…
Reference in a new issue