extern.h (6a1485e2fe76cc9b44fd77b258016935f89f95ca) | extern.h (2f8d7c56da1ce2c5069fab78876cc6a90b343cfa) |
---|---|
1/*- 2 * ------+---------+---------+---------+---------+---------+---------+---------* 3 * Copyright (c) 2003 - Garance Alistair Drosehn <gad@FreeBSD.org>. 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 22 unchanged lines hidden (view full) --- 31 * ------+---------+---------+---------+---------+---------+---------+---------* 32 * $FreeBSD$ 33 * ------+---------+---------+---------+---------+---------+---------+---------* 34 */ 35 36#include <sys/cdefs.h> 37#include <time.h> 38 | 1/*- 2 * ------+---------+---------+---------+---------+---------+---------+---------* 3 * Copyright (c) 2003 - Garance Alistair Drosehn <gad@FreeBSD.org>. 4 * All rights reserved. 5 * 6 * Redistribution and use in source and binary forms, with or without 7 * modification, are permitted provided that the following conditions 8 * are met: --- 22 unchanged lines hidden (view full) --- 31 * ------+---------+---------+---------+---------+---------+---------+---------* 32 * $FreeBSD$ 33 * ------+---------+---------+---------+---------+---------+---------+---------* 34 */ 35 36#include <sys/cdefs.h> 37#include <time.h> 38 |
39#define PTM_PARSE_ISO8601 0x0001 /* Parse ISO-standard format */ 40#define PTM_PARSE_DWM 0x0002 /* Parse Day-Week-Month format */ 41#define PTM_PARSE_MATCHDOM 0x0004 /* If the user specifies a day-of-month, 42 * then the result should be a month 43 * which actually has that day. Eg: 44 * the user requests "day 31" when 45 * the present month is February. */ 46 47struct ptime_data; 48 49/* Some global variables from newsyslog.c which might be of interest */ 50extern int dbg_at_times; /* cmdline debugging option */ | |
51extern int noaction; /* command-line option */ 52extern int verbose; /* command-line option */ | 39extern int noaction; /* command-line option */ 40extern int verbose; /* command-line option */ |
53extern struct ptime_data *dbg_timenow; | |
54 | 41 |
42extern time_t dbg_timenow; 43extern time_t timenow; 44 |
|
55__BEGIN_DECLS | 45__BEGIN_DECLS |
56struct ptime_data *ptime_init(const struct ptime_data *_optsrc); 57int ptime_adjust4dst(struct ptime_data *_ptime, const struct 58 ptime_data *_dstsrc); 59int ptime_free(struct ptime_data *_ptime); 60int ptime_relparse(struct ptime_data *_ptime, int _parseopts, 61 time_t _basetime, const char *_str); 62const char *ptimeget_ctime(const struct ptime_data *_ptime); 63double ptimeget_diff(const struct ptime_data *_minuend, 64 const struct ptime_data *_subtrahend); 65time_t ptimeget_secs(const struct ptime_data *_ptime); 66int ptimeset_nxtime(struct ptime_data *_ptime); 67int ptimeset_time(struct ptime_data *_ptime, time_t _secs); | 46time_t parse8601(const char *_srcstr, time_t *_next_time); 47time_t parseDWM(char *_srcstr, time_t *_next_time); |
68__END_DECLS | 48__END_DECLS |