Searched refs:tm (Results 1 - 25 of 472) sorted by relevance

1234567891011>>

/freebsd-current/contrib/mandoc/
H A Dtest-strptime.c6 struct tm tm; local
8 return ! (strptime(input, "%Y-%m-%d", &tm) == input + 10 &&
9 tm.tm_year == 114 && tm.tm_mon == 0 && tm.tm_mday == 4);
/freebsd-current/contrib/ntp/libntp/
H A Dhumandate.c21 struct tm * tm; local
24 tm = localtime(&cursec);
25 if (!tm)
31 tm->tm_mday, months[tm->tm_mon],
32 tm->tm_hour, tm->tm_min, tm->tm_sec);
48 struct tm * t local
[all...]
H A Duglydate.c21 struct tm *tm; local
30 tm = gmtime(&sec);
36 tm->tm_yday = 0;
37 tm->tm_hour = 0;
38 tm->tm_min = 0;
39 tm->tm_sec = 0;
41 year = tm->tm_year;
47 tm->tm_yday, tm
[all...]
/freebsd-current/crypto/heimdal/lib/roken/
H A Dtimegm.c51 rk_timegm (struct tm *tm) argument
59 if (tm->tm_year < 0)
61 if (tm->tm_mon < 0 || tm->tm_mon > 11)
63 if (tm->tm_mday < 1 || tm->tm_mday > ndays[is_leap(tm->tm_year)][tm->tm_mon])
65 if (tm
[all...]
H A Dlocaltime_r.c42 ROKEN_LIB_FUNCTION struct tm * ROKEN_LIB_CALL
43 localtime_r(const time_t *timer, struct tm *result)
50 struct tm *tm;
52 tm = localtime((time_t *)timer);
53 if (tm == NULL)
55 *result = *tm;
H A Dstrftime.c119 * Return the week number of `tm' (Sunday being the first day of the week)
124 week_number_sun (const struct tm *tm) argument
126 return (tm->tm_yday + 7 - (tm->tm_yday % 7 - tm->tm_wday + 7) % 7) / 7;
130 * Return the week number of `tm' (Monday being the first day of the week)
135 week_number_mon (const struct tm *tm) argument
137 int wday = (tm
149 week_number_mon4(const struct tm *tm) argument
170 strftime(char *buf, size_t maxsize, const char *format, const struct tm *tm) argument
[all...]
H A Dtm2time.c47 tm2time (struct tm tm, int local) argument
51 tm.tm_isdst = local ? -1 : 0;
53 t = mktime (&tm);
H A Dstrpftime-test.h50 const struct tm *tm);
53 strptime (const char *buf, const char *format, struct tm *timeptr);
/freebsd-current/crypto/heimdal/lib/asn1/
H A Dtimegm.c56 _der_timegm (struct tm *tm) argument
64 if (tm->tm_year > ASN1_MAX_YEAR)
67 if (tm->tm_year < 0)
69 if (tm->tm_mon < 0 || tm->tm_mon > 11)
71 if (tm->tm_mday < 1 || tm->tm_mday > (int)ndays[is_leap(tm->tm_year)][tm
96 _der_gmtime(time_t t, struct tm *tm) argument
[all...]
H A Dcheck-timegm.c42 struct tm tm; local
45 memset(&tm, 0, sizeof(tm));
46 tm.tm_year = 106;
47 tm.tm_mon = 9;
48 tm.tm_mday = 1;
49 tm.tm_hour = 10;
50 tm.tm_min = 3;
52 t = _der_timegm(&tm);
[all...]
/freebsd-current/contrib/file/src/
H A Dlocaltime_r.c11 struct tm *
12 localtime_r(const time_t *t, struct tm *tm) argument
14 struct tm *tmp = localtime(t);
17 memcpy(tm, tmp, sizeof(*tm));
H A Dgmtime_r.c11 struct tm *
12 gmtime_r(const time_t *t, struct tm *tm) argument
14 struct tm *tmp = gmtime(t);
17 memcpy(tm, tmp, sizeof(*tm));
/freebsd-current/crypto/openssh/openbsd-compat/
H A Dbsd-timegm.c50 time_t timegm(struct tm *tm) argument
58 if (tm->tm_mon > 12 ||
59 tm->tm_mon < 0 ||
60 tm->tm_mday > 31 ||
61 tm->tm_min > 60 ||
62 tm->tm_sec > 60 ||
63 tm->tm_hour > 24) {
64 /* invalid tm structure */
68 for (i = 70; i < tm
[all...]
/freebsd-current/contrib/netbsd-tests/lib/libutil/
H A Dt_parsedate.c58 struct tm * time_to_tm(const time_t *, struct tm *),
62 struct tm tm; local
87 ATF_CHECK(time_to_tm(&t, &tm) != NULL);
89 ATF_CHECK_MSG(tm.tm_year + 1900 == year,
91 argstr, year, (int)tm.tm_year);
93 ATF_CHECK_MSG(tm.tm_mon + 1 == month,
95 argstr, month, (int)tm.tm_mon);
97 ATF_CHECK_MSG(tm
195 struct tm tm; local
238 struct tm tm; local
[all...]
/freebsd-current/usr.bin/localedef/
H A Dtime.c45 struct lc_time_T tm; variable in typeref:struct:lc_time_T
50 (void) memset(&tm, 0, sizeof (tm));
66 tm.c_fmt = str;
69 tm.x_fmt = str;
72 tm.X_fmt = str;
75 tm.ampm_fmt = str;
82 tm.date_fmt = str;
123 add_list(tm.mon, str, 12);
126 add_list(tm
[all...]
/freebsd-current/libexec/bootpd/
H A Dtzone.c35 struct tm *tm;
39 if ((tm = localtime(&now)) == NULL) {
43 secondswest = -tm->tm_gmtoff;
/freebsd-current/usr.bin/calendar/
H A Dday.c43 const struct tm tm0;
49 settimes(time_t now, int before, int after, int friday, struct tm *tp1, struct tm *tp2)
51 struct tm tp;
79 struct tm tm, tp; local
84 tm = tm0;
85 tm.tm_mday = tp.tm_mday;
86 tm.tm_mon = tp.tm_mon;
87 tm
[all...]
/freebsd-current/usr.sbin/newsyslog/
H A Dptimes.c72 struct tm basetm; /* Base Time expanded into fields */
73 struct tm tm; /* Time expanded into fields */ member in struct:ptime_data
98 * We are usually called with a 'tm-year' value
131 struct tm tm; local
142 tm = ptime->tm;
146 tm.tm_year = ((l / 1000000) - 19) * 100;
151 tm
231 struct tm tm; local
503 struct tm tm; local
[all...]
/freebsd-current/sys/kern/
H A Dsubr_terminal.c55 #define TERMINAL_LOCK(tm) do { \
56 if ((tm)->tm_flags & TF_CONS) \
57 mtx_lock_spin(&(tm)->tm_mtx); \
58 else if ((tm)->tm_tty != NULL) \
59 tty_lock((tm)->tm_tty); \
61 #define TERMINAL_UNLOCK(tm) do { \
62 if ((tm)->tm_flags & TF_CONS) \
63 mtx_unlock_spin(&(tm)->tm_mtx); \
64 else if ((tm)->tm_tty != NULL) \
65 tty_unlock((tm)
165 terminal_init(struct terminal *tm) argument
201 struct terminal *tm; local
213 terminal_sync_ttysize(struct terminal *tm) argument
227 terminal_maketty(struct terminal *tm, const char *fmt, ...) argument
244 terminal_set_cursor(struct terminal *tm, const term_pos_t *pos) argument
251 terminal_set_winsize_blank(struct terminal *tm, const struct winsize *size, int blank, const term_attr_t *attr) argument
277 terminal_set_winsize(struct terminal *tm, const struct winsize *size) argument
291 terminal_mute(struct terminal *tm, int yes) argument
303 terminal_input_char(struct terminal *tm, term_char_t c) argument
356 terminal_input_raw(struct terminal *tm, char c) argument
371 terminal_input_special(struct terminal *tm, unsigned int k) argument
397 struct terminal *tm = tty_softc(tp); local
406 struct terminal *tm = tty_softc(tp); local
414 struct terminal *tm = tty_softc(tp); local
440 struct terminal *tm = tty_softc(tp); local
496 struct terminal *tm = tty_softc(tp); local
524 termcn_cnregister(struct terminal *tm) argument
550 struct terminal *tm = cp->cn_arg; local
558 struct terminal *tm = cp->cn_arg; local
566 struct terminal *tm = cp->cn_arg; local
594 struct terminal *tm = cp->cn_arg; local
602 struct terminal *tm = cp->cn_arg; local
624 struct terminal *tm = softc; local
632 struct terminal *tm = softc; local
641 struct terminal *tm = softc; local
650 struct terminal *tm = softc; local
658 struct terminal *tm = softc; local
666 struct terminal *tm = softc; local
674 struct terminal *tm = softc; local
682 struct terminal *tm = softc; local
[all...]
/freebsd-current/contrib/ldns/compat/
H A Dlocaltime_r.c9 struct tm *localtime_r(const time_t *timep, struct tm *result)
H A Dgmtime_r.c9 struct tm *gmtime_r(const time_t *timep, struct tm *result)
/freebsd-current/crypto/openssh/regress/
H A Dtimestamp.c35 struct tm *tm; local
40 if ((tm = localtime(&tv.tv_sec)) == NULL)
42 if (strftime(buf, sizeof buf, "%Y%m%dT%H%M%S", tm) <= 0)
/freebsd-current/contrib/unbound/compat/
H A Dstrptime.c103 /** Converts the character string s to values which are stored in tm
107 unbound_strptime(const char *s, const char *format, struct tm *tm) argument
139 tm->tm_wday = ret;
150 tm->tm_mon = ret;
153 if (!(s = unbound_strptime(s, "%x %X", tm))) {
164 tm->tm_year = ret*100 + (tm->tm_year%100);
167 tm->tm_year = ret*100 - TM_YEAR_BASE;
177 tm
[all...]
/freebsd-current/crypto/openssl/crypto/
H A Do_time.c14 struct tm *OPENSSL_gmtime(const time_t *timer, struct tm *result)
16 struct tm *ts = NULL;
31 struct tm data, *ts2 = &data;
37 memcpy(result, ts2, sizeof(struct tm));
53 memcpy(result, ts, sizeof(struct tm));
60 * Take a tm structure and add an offset to it. This avoids any OS issues
69 static int julian_adj(const struct tm *tm, int off_day, long offset_sec,
72 int OPENSSL_gmtime_adj(struct tm *t argument
133 julian_adj(const struct tm *tm, int off_day, long offset_sec, long *pday, int *psec) argument
[all...]
/freebsd-current/usr.bin/at/
H A Dparsetime.c286 plus_or_minus(struct tm *tm, int delay) argument
294 tm->tm_year += delay;
297 tm->tm_mon += delay;
302 tm->tm_mday += delay;
305 tm->tm_hour += delay;
308 tm->tm_min += delay;
318 tm->tm_isdst = -1;
319 if (mktime(tm) < 0)
331 plus(struct tm *t argument
346 minus(struct tm *tm) argument
362 tod(struct tm *tm) argument
428 assign_date(struct tm *tm, long mday, long mon, long year) argument
477 month(struct tm *tm) argument
[all...]

Completed in 234 milliseconds

1234567891011>>