Lines Matching +full:min +full:- +full:len
3 * Copyright (c) 2005-2006, Jouni Malinen <j@w1.fi>
43 tt = (li.QuadPart - EPOCHFILETIME) / 10; in os_get_time()
44 t->sec = (os_time_t) (tt / 1000000); in os_get_time()
45 t->usec = (os_time_t) (tt % 1000000); in os_get_time()
56 t->sec = now.sec; in os_get_reltime()
57 t->usec = now.usec; in os_get_reltime()
62 int os_mktime(int year, int month, int day, int hour, int min, int sec, in os_mktime() argument
70 hour < 0 || hour > 23 || min < 0 || min > 59 || sec < 0 || in os_mktime()
72 return -1; in os_mktime()
75 tm.tm_year = year - 1900; in os_mktime()
76 tm.tm_mon = month - 1; in os_mktime()
79 tm.tm_min = min; in os_mktime()
91 tz_offset = t2 - t1; in os_mktime()
97 *t = (os_time_t) t_local - tz_offset; in os_mktime()
109 return -1; in os_gmtime()
110 tm->sec = tm2->tm_sec; in os_gmtime()
111 tm->min = tm2->tm_min; in os_gmtime()
112 tm->hour = tm2->tm_hour; in os_gmtime()
113 tm->day = tm2->tm_mday; in os_gmtime()
114 tm->month = tm2->tm_mon + 1; in os_gmtime()
115 tm->year = tm2->tm_year + 1900; in os_gmtime()
123 return -1; in os_daemonize()
132 int os_get_random(unsigned char *buf, size_t len) in os_get_random() argument
139 return -1; in os_get_random()
141 ret = CryptGenRandom(prov, len, buf); in os_get_random()
144 return ret ? 0 : -1; in os_get_random()
166 return -1; in os_program_init()
183 return -1; in os_setenv()
189 return -1; in os_unsetenv()
193 char * os_readfile(const char *name, size_t *len) in os_readfile() argument
203 *len = ftell(f); in os_readfile()
206 buf = malloc(*len); in os_readfile()
212 fread(buf, 1, *len, f); in os_readfile()
224 return -1; in os_fdatasync()
228 return -1; in os_fdatasync()
231 return -1; in os_fdatasync()
250 while (--left != 0) { in os_strlcpy()
257 /* Not enough room for the string; force NUL-termination */ in os_strlcpy()
264 return s - src - 1; in os_strlcpy()
268 int os_memcmp_const(const void *a, const void *b, size_t len) in os_memcmp_const() argument
275 for (res = 0, i = 0; i < len; i++) in os_memcmp_const()
284 return -1; in os_exec()
288 void * os_memdup(const void *src, size_t len) in os_memdup() argument
290 void *r = os_malloc(len); in os_memdup()
293 os_memcpy(r, src, len); in os_memdup()