Sync usage with man page.
[netbsd-mini2440.git] / gnu / usr.bin / rcs / lib / partime.h
blobce7b7b40b2738c3bf17d9e2d17fa1e828cfd79b6
1 /* $NetBSD: partime.h,v 1.1.1.1 1996/10/13 21:57:05 veego Exp $ */
3 /* Parse a string, yielding a struct partime that describes it. */
5 /* Copyright 1993, 1994, 1995 Paul Eggert
6 Distributed under license by the Free Software Foundation, Inc.
8 This file is part of RCS.
10 RCS is free software; you can redistribute it and/or modify
11 it under the terms of the GNU General Public License as published by
12 the Free Software Foundation; either version 2, or (at your option)
13 any later version.
15 RCS is distributed in the hope that it will be useful,
16 but WITHOUT ANY WARRANTY; without even the implied warranty of
17 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
18 GNU General Public License for more details.
20 You should have received a copy of the GNU General Public License
21 along with RCS; see the file COPYING.
22 If not, write to the Free Software Foundation,
23 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
25 Report problems and direct all questions to:
27 rcs-bugs@cs.purdue.edu
31 #define TM_UNDEFINED (-1)
32 #define TM_DEFINED(x) (0 <= (x))
34 #define TM_UNDEFINED_ZONE ((long) -24 * 60 * 60)
35 #define TM_LOCAL_ZONE (TM_UNDEFINED_ZONE - 1)
37 struct partime {
39 * This structure describes the parsed time.
40 * Only the following tm_* values in it are used:
41 * sec, min, hour, mday, mon, year, wday, yday.
42 * If TM_UNDEFINED(value), the parser never found the value.
43 * The tm_year field is the actual year, not the year - 1900;
44 * but see ymodulus below.
46 struct tm tm;
49 * If !TM_UNDEFINED(ymodulus),
50 * then tm.tm_year is actually modulo ymodulus.
52 int ymodulus;
55 * Week of year, ISO 8601 style.
56 * If TM_UNDEFINED(yweek), the parser never found yweek.
57 * Weeks start on Mondays.
58 * Week 1 includes Jan 4.
60 int yweek;
62 /* Seconds east of UTC; or TM_LOCAL_ZONE or TM_UNDEFINED_ZONE. */
63 long zone;
66 #if defined(__STDC__) || has_prototypes
67 # define __PARTIME_P(x) x
68 #else
69 # define __PARTIME_P(x) ()
70 #endif
72 char *partime __PARTIME_P((char const *, struct partime *));
73 char *parzone __PARTIME_P((char const *, long *));