programs/dtscreen/Makefile
+programs/dtcm/Makefile
+programs/dtcm/libDtCmP/Makefile
+programs/dtcm/server/Makefile
+programs/dtcm/dtcm/Makefile
+
+
])
AC_OUTPUT
MAINTAINERCLEANFILES = Makefile.in
-SUBDIRS = libDtCmpP dtcm server
+SUBDIRS = libDtCmP dtcm server
bin_PROGRAMS = dtcm dtcm_delete dtcm_insert dtcm_lookup dtcm_editor
-AM_CFLAGS = -I../../../lib/csa -I../libDtCmP -I../../dthelp $(TIRPCINC)
+AM_CFLAGS = $(DT_INCDIR) $(CSA_INCDIR) -I../../../lib/csa \
+-I../libDtCmP $(TIRPCINC)
-AM_LDADD = ../libDtCmP/libDtCmP.a $(LIBCSA) $(LIBPRINT) $(LIBHELP) \
- $(LIBWIDGET) $(LIBSVC) $(LIBTT) -lXm $(XTOOLLIB) ${X_LIBS}
+LDADD = ../libDtCmP/libDtCmP.a $(LIBCSA) $(DTCLIENTLIBS) $(XTOOLLIB)
if SOLARIS
AM_CFLAGS += -xstrconst -Xc -v
endif
-if HPUX
-AM_LDADD += -lrpcsvc -lV3
-endif
-
-if AIX
-AM_LDADD += -lrpcsvc -lPW -ldiag
-endif
-
if FREEBSD
-AM_LDADD += -lcompat
+LDADD += -lcompat
endif
if NETBSD
-AM_LDADD += -lcompat
+LDADD += -lcompat
endif
dtcm_SOURCES = MonthPanel.c RFCMIME.c about.c \
MAINTAINERCLEANFILES = Makefile.in
-CLEANFILES = y.tab.c getdate.c
-
noinst_LIBRARIES = libDtCmP.a
-libDtCmP_a_CFLAGS = -I../../../lib/csa -DRFC_MIME -DLINE_COUNT -DV2 -DOW_I18N \
- $(TIRPCINC)
+libDtCmP_a_CFLAGS = $(CSA_INCDIR) -I../../../lib/csa -DRFC_MIME \
+ -DLINE_COUNT -DV2 -DOW_I18N $(TIRPCINC)
if SOLARIS
libDtCmP_a_CFLAGS += -xstrconst -Xc -v
endif
-libDtCmP_a_SOURCES = cm_tty.c cmfns.c dtfns.c \
- getdate.c props.c resource.c \
- timeops.c util.c
-
-all:: getdate.c
+libDtCmP_a_SOURCES = cm_tty.c cmfns.c dtfns.c props.c resource.c \
+ timeops.c util.c getdate.y
-getdate.c: getdate.y
- $(YACC) getdate.y
- $(MV) y.tab.c getdate.c
+# This is strange - ususally you generate a .h and a .c. But CDE
+# comes with getdate.h, and you cannot generate it via yacc/lex. So -
+# someday this should be redone properly... see
+# https://opensource.apple.com/source/shell_cmds/shell_cmds-198/find/getdate.y.auto.html
+# for what seems like a more recent version...
+BUILT_SOURCES = getdate.c
+CLEANFILES = $(BUILT_SOURCES)
* Given a weekmask and the first day of the week, calculate
* the number of times outstanding in the week.
*/
-extern int
+int
ntimes_this_week(u_int weekmask, int firstday)
{
int i, ntimes, weekdaymask = 1 << firstday;
}
/* Return beginning of time */
-extern Tick
+Tick
get_bot(void)
{
return bot;
}
/* Return end of time */
-extern Tick
+Tick
get_eot(void)
{
return eot;
}
/* Given a weekmask, find the last appointment in the week */
-extern int
+int
lastapptofweek(u_int mask)
{
int n;
}
/* Remove after v3 release */
-extern boolean_t
+boolean_t
magic_time(Tick t)
{
boolean_t magic=B_FALSE;
return(magic);
}
/* for 12 hour clock, if 24 subtract 12 */
-extern boolean_t
+boolean_t
adjust_hour(int *hr)
{
boolean_t am = B_TRUE;
}
-extern int
+int
timeok( Tick t)
{
int r =((t >= bot) &&(t <= eot));
}
}
-extern int
+int
seconds(int n, Unit unit)
{
return(n *(int)unit);
}
-extern double
+double
seconds_dble(double n, Unit unit)
{
return((double)(n * (int)unit));
}
-extern int
+int
year(Tick t)
{
struct tm *tm;
return(tm->tm_year + 1900);
}
-extern int
+int
month(Tick t)
{
struct tm *tm;
return(tm->tm_mon+1);
}
-extern int
+int
hour(Tick t)
{
struct tm *tm;
return(tm->tm_hour);
}
-extern int
+int
minute(Tick t)
{
struct tm *tm;
return(tm->tm_min);
}
-extern int
+int
leapyr(int y)
{
return
(y % 4 == 0 && y % 100 !=0 || y % 400 == 0);
}
-extern int
+int
monthlength(Tick t)
{
int mon;
return(((mon==1) && leapyr(tm.tm_year+1900))? 29 : monthdays[mon]);
}
-extern int
+int
monthseconds(Tick t)
{
int mon;
return(((mon==1) && leapyr(tm.tm_year+1900))? 29*daysec : monthsecs[mon]);
}
-extern int
+int
dom(Tick t)
{
struct tm *tm;
return(tm->tm_mday);
}
-extern int
+int
wom(Tick t)
{
struct tm *tm;
return(mktime(&tm));
}
-extern Tick
+Tick
nextmonth(Tick t)
{
return(next_nmonth(t, 1));
}
-extern boolean_t
+boolean_t
weekofmonth(Tick t, int *wk)
{
struct tm tm, tm1, tm2;
}
}
-extern int
+int
dow(Tick t)
{
struct tm tm;
return(tm.tm_wday);
}
-extern int /* find dow(0-6) that 1st dom falls on */
+int /* find dow(0-6) that 1st dom falls on */
fdom(Tick t)
{
struct tm tm;
return(tm.tm_wday);
}
-extern int
+int
ldom(Tick t /* find dow(0-6) that last dom falls on */ )
{
struct tm tm;
}
/* returns tick of last day of month */
-extern Tick
+Tick
last_dom(Tick tick)
{
return(upperbound(next_ndays(tick, monthlength(tick) - dom(tick))));
}
/* returns tick of first day of month */
-extern Tick
+Tick
first_dom(Tick tick)
{
return(lowerbound(last_ndays(tick, dom(tick)-1)));
}
/* returns tick of first day of week */
-extern Tick
+Tick
first_dow(Tick tick)
{
int d;
}
/* returns tick of first day of week */
-extern Tick
+Tick
last_dow(Tick tick)
{
int d;
return(upperbound(next_ndays(tick, d)));
}
/* returns number of weeks in month */
-extern int
+int
numwks(Tick tick)
{
return (wom(last_dom(tick)));
}
-extern int
+int
adjust_dst(Tick start, Tick next)
{
DSTchange change;
return(next);
}
-extern Tick
+Tick
next_nhours(Tick t, int n)
{
Tick next;
return(next);
}
-extern Tick
+Tick
last_ndays(Tick t, int n)
{
Tick last;
return(last);
}
-extern Tick
+Tick
next_ndays(Tick t, int n)
{
Tick next;
return(next);
}
-extern Tick
+Tick
nextday(Tick t)
{
Tick next;
return(next);
}
-extern Tick
+Tick
prevday(Tick t)
{
Tick prev;
return(prev);
}
-extern Tick
+Tick
nextweek(Tick t)
{
Tick next;
return(next);
}
-extern Tick
+Tick
prevweek(Tick t)
{
Tick prev;
return(prev);
}
-extern Tick
+Tick
next2weeks(Tick t)
{
Tick next;
return(next);
}
-extern Tick
+Tick
prev2weeks(Tick t)
{
Tick prev;
}
/* WORK OUT A BETTER WAY TO DO THIS!! */
-extern Tick
+Tick
prevmonth_exactday(Tick t)
{
Tick prev; int day;
}
/* WORK OUT A BETTER WAY TO DO THIS!! */
-extern Tick
+Tick
nextmonth_exactday(Tick t)
{
Tick next; int day;
return(next);
}
-extern Tick
+Tick
nextnyear(Tick t, int n)
{
struct tm tm;
#endif /* SVR4 */
}
-extern Tick
+Tick
nextyear(Tick t)
{
return(nextnyear(t, 1));
}
-extern Tick
+Tick
prevnday_exacttime(Tick t, int n)
{
Tick prev;
return(prev);
}
-extern Tick
+Tick
prevnyear(Tick t, int n)
{
struct tm tm;
#endif /* SVR4 */
}
-extern Tick
+Tick
prevyear(Tick t)
{
return(prevnyear(t, 1));
}
-extern Tick
+Tick
previousmonth(Tick t)
{
struct tm tm;
#endif /* SVR4 */
}
-extern Tick
+Tick
prev_nmonth(Tick t, int n)
{
struct tm tm;
#endif /* SVR4 */
}
-extern Tick
+Tick
jan1(Tick t)
{
struct tm tm;
#endif /* SVR4 */
}
-extern Tick
+Tick
nextjan1(Tick t)
{
struct tm tm;
#endif /* SVR4 */
}
-extern Tick
+Tick
lastjan1(Tick t)
{
struct tm tm;
#endif /* SVR4 */
}
-extern Tick
+Tick
lowerbound(Tick t)
{
struct tm tm;
return(timelocal(&tm));
#endif /* SVR4 */
}
-extern Tick
+Tick
lower_bound(int i, Tick t)
{
struct tm tm;
return (timelocal(&tm));
#endif /* SVR4 */
}
-extern Tick
+Tick
upperbound(Tick t)
{
struct tm tm;
return((y-1)/4 -(y-1)/100 +(y-1)/400);
}
-extern Tick
+Tick
xytoclock(int x, int y, Tick t)
{
int dd, mn, yr, ly, leaps;
return(tick);
}
-extern Tick
+Tick
now(void)
{
return(time(0));
}
-extern void
+void
set_timezone(char *tzname)
{
static char tzenv[MAXPATHLEN];
}
}
-extern long
+long
gmt_off(void)
{
struct tm tm;
* definitions of eot and EOT need to be changed as well as some
* of the routines in this file and the caller of these routines.
*/
-extern void
+void
init_time(void)
{
struct tm tm, gm;
eot =mktime(&tm);
}
-extern int
+int
seconds_to_hours(int n)
{
return(n/(int)hrsec);
}
-extern int
+int
hours_to_seconds(int n)
{
return(n *(int)hrsec);
}
-extern int
+int
seconds_to_minutes(int n)
{
return(n/60);
}
-extern int
+int
minutes_to_seconds(int n)
{
return(n *(int)minsec);
}
-extern int
+int
days_to_seconds(int n)
{
return(n *(int)daysec);
}
-seconds_to_days(int n)
+int seconds_to_days(int n)
{
return(n/(int)daysec);
}
/*
-extern int
+int
weeks_to_seconds(int n)
{
return(n *(int)wksec);
}
-extern int
+int
seconds_to_weeks(int)
{
return(n/(int)wksec);
}
*/
-extern Tick
+Tick
monthdayyear(int m, int d, int y)
{
int t, t1;
MAINTAINERCLEANFILES = Makefile.in
-CLEANFILES = parser.c
-
bin_PROGRAMS = rpc.cmsd
-rpc.cmsd_CFLAGS = -I$(CSASRC) -I$(HELPSRC) $(TIRPCINC)
+rpc_cmsd_CFLAGS = -I../../../lib/csa $(DT_INCDIR) $(CSA_INCDIR) $(TIRPCINC)
-rpc.cmsd_LDADD = $(LIBCSA) $(LIBSVC) $(LIBTT) $(LIBWIDGET) $(XTOOLLIB) ${X_LIBS}
+rpc_cmsd_LDADD = $(LIBCSA) $(DTCLIENTLIBS) $(XTOOLLIB)
if SOLARIS
-rpc.cmsd_CFLAGS += -xstrconst -Xc -v
-rpc.cmsd_LDADD += -lsocket -lnsl -lintl -lm -ldl
-endif
-
-if AIX
-rpc.cmsd_LDADD += -lrpcsvc -lPW -ldiag -lc
+rpc_cmsd_CFLAGS += -xstrconst -Xc -v
+rpc_cmsd_LDADD += -lsocket -lnsl -lintl -lm -ldl
endif
-if HPUX
-rpc.cmsd_CFLAGS += -DHPUX -DS9000
-rpc.cmsd_LDADD += -lrpcsvc -lV3 -lc -lPW
-endif
-
-rpc_cmsd_SOURCES = parser.c access.c callback.c \
- cmscalendar.c cmsconvert.c cmsentry.c \
- cmsmatch.c delete.c garbage.c \
- insert.c lexit.c list.c \
- log.c lookup.c reclotick.c \
- recount.c relasttick.c reminder.c \
- renexttick.c repeat.c reprevtick.c \
- rerule.c reutil.c tree.c \
- utility.c v4ops.c v5ops.c \
- cmsfunc.c programtable.c rtable2.c \
- rtable3.c rtable4.c svcmain.c \
- update.c
-
-all:: rpc.cmsd
-
-.SUFFIXES: .y
-
-.y.c:
- $(YACC) -d $(YFLAGS) $<
- $(SED) -e "s/yy/yyy/g" -e "/# line/d" y.tab.c > $*.c
- $(SED) s/yy/yyy/g y.tab.h > $*.h
+rpc_cmsd_SOURCES = parser.c access.c callback.c cmscalendar.c \
+ cmsconvert.c cmsentry.c cmsmatch.c delete.c \
+ garbage.c insert.c lexit.c list.c log.c lookup.c \
+ reclotick.c recount.c relasttick.c reminder.c \
+ renexttick.c repeat.c reprevtick.c rerule.c \
+ reutil.c tree.c utility.c v4ops.c v5ops.c \
+ cmsfunc.c programtable.c rtable2.c rtable3.c \
+ rtable4.c svcmain.c update.c access.h cmsentry.h \
+ insert.h parser.h tree.h callback.h cmsmatch.h \
+ lexer.h reminder.h update.h cmsattr.h data.h \
+ list.h repeat.h utility.h cmscalendar.h delete.h \
+ log.h reutil.h v4ops.h cmsconvert.h garbage.h \
+ lookup.h rpcextras.h v5ops.h
+
+BUILT_SOURCES = parser.c parser.h
+CLEANFILES = parser.c parser.h
+
+AM_YFLAGS = -d
+
+parser.c parser.h: parser.y
+ $(YACC) $(AM_YFLAGS) $<
+ $(SED) -e "s/yy/yyy/g" -e "/# line/d" y.tab.c > parser.c
+ $(SED) -e 's/yy/yyy/g' y.tab.h > parser.h
$(RM) y.tab.c y.tab.h
-parser.o: parser.c
-
-includes:: parser.c
-
-clean::
- echo -n > parser.h
#include <string.h>
#include <stdlib.h>
#include <unistd.h>
+#include <time.h>
#include <sys/time.h>
#include <sys/resource.h>
#ifdef SVR4