diff options
author | Guido van Rossum <guido@python.org> | 1993-06-17 12:35:49 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1993-06-17 12:35:49 (GMT) |
commit | 234f942aefb779efa6cfb7225e21d16a3f7e80f7 (patch) | |
tree | 9c85e1ae919ebb44c0a1ca48bdfd11d5f60c7d9c /Modules | |
parent | 6a0e2282c359801bd70742642d24f7b0b74f5b4e (diff) | |
download | cpython-234f942aefb779efa6cfb7225e21d16a3f7e80f7.zip cpython-234f942aefb779efa6cfb7225e21d16a3f7e80f7.tar.gz cpython-234f942aefb779efa6cfb7225e21d16a3f7e80f7.tar.bz2 |
* Added gmtime/localtime/mktime and SYSV timezone globals to timemodule.c.
Added $(SYSDEF) to its build rule in Makefile.
* cgensupport.[ch], modsupport.[ch]: removed some old stuff. Also
changed files that still used it... And made several things static
that weren't but should have been... And other minor cleanups...
* listobject.[ch]: add external interfaces {set,get}listslice
* socketmodule.c: fix bugs in new send() argument parsing.
* sunaudiodevmodule.c: added flush() and close().
Diffstat (limited to 'Modules')
-rw-r--r-- | Modules/almodule.c | 2 | ||||
-rw-r--r-- | Modules/arraymodule.c | 2 | ||||
-rw-r--r-- | Modules/cdmodule.c | 12 | ||||
-rw-r--r-- | Modules/cgensupport.c | 11 | ||||
-rw-r--r-- | Modules/cgensupport.h | 3 | ||||
-rw-r--r-- | Modules/flmodule.c | 12 | ||||
-rw-r--r-- | Modules/fmmodule.c | 2 | ||||
-rw-r--r-- | Modules/imgfile.c | 6 | ||||
-rw-r--r-- | Modules/mathmodule.c | 3 | ||||
-rw-r--r-- | Modules/nismodule.c | 2 | ||||
-rw-r--r-- | Modules/posixmodule.c | 24 | ||||
-rw-r--r-- | Modules/rotormodule.c | 6 | ||||
-rw-r--r-- | Modules/sgimodule.c | 2 | ||||
-rw-r--r-- | Modules/socketmodule.c | 4 | ||||
-rw-r--r-- | Modules/stdwinmodule.c | 25 | ||||
-rw-r--r-- | Modules/sunaudiodev.c | 35 | ||||
-rw-r--r-- | Modules/threadmodule.c | 2 | ||||
-rw-r--r-- | Modules/timemodule.c | 136 |
18 files changed, 225 insertions, 64 deletions
diff --git a/Modules/almodule.c b/Modules/almodule.c index d986d34..26bf38f 100644 --- a/Modules/almodule.c +++ b/Modules/almodule.c @@ -568,7 +568,7 @@ al_openport (self, args) } size = gettuplesize(args); if (size == 2) { - if (!getstrstrarg (args, &name, &dir)) + if (!getargs (args, "(ss)", &name, &dir)) return NULL; } else if (size == 3) { diff --git a/Modules/arraymodule.c b/Modules/arraymodule.c index e5bf46a..b5a2cfa 100644 --- a/Modules/arraymodule.c +++ b/Modules/arraymodule.c @@ -209,7 +209,7 @@ d_setitem(ap, i, v) } /* Description of types */ -struct arraydescr descriptors[] = { +static struct arraydescr descriptors[] = { {'c', sizeof(char), c_getitem, c_setitem}, {'b', sizeof(char), b_getitem, b_setitem}, {'h', sizeof(short), h_getitem, h_setitem}, diff --git a/Modules/cdmodule.c b/Modules/cdmodule.c index 27cf35c..b5d0def 100644 --- a/Modules/cdmodule.c +++ b/Modules/cdmodule.c @@ -725,12 +725,12 @@ CD_addcallback(self, args) object *args; { int type; - object *funcobject, *funcargobject; + object *func, *funcarg; CheckParser(self); /* XXX - more work here */ - if (!getargs(args, "(iOO)", &type, &funcobject, &funcargobject)) + if (!getargs(args, "(iOO)", &type, &func, &funcarg)) return NULL; if (type < 0 || type >= NCALLBACKS) { @@ -744,11 +744,11 @@ CD_addcallback(self, args) CDsetcallback(self->ob_cdparser, (CDDATATYPES) type, CD_callback, (void *) self); #endif XDECREF(self->ob_cdcallbacks[type].ob_cdcallback); - INCREF(funcobject); - self->ob_cdcallbacks[type].ob_cdcallback = funcobject; + INCREF(func); + self->ob_cdcallbacks[type].ob_cdcallback = func; XDECREF(self->ob_cdcallbacks[type].ob_cdcallbackarg); - INCREF(funcargobject); - self->ob_cdcallbacks[type].ob_cdcallbackarg = funcargobject; + INCREF(funcarg); + self->ob_cdcallbacks[type].ob_cdcallbackarg = funcarg; INCREF(None); return None; diff --git a/Modules/cgensupport.c b/Modules/cgensupport.c index 5dcac86..87fcfab 100644 --- a/Modules/cgensupport.c +++ b/Modules/cgensupport.c @@ -28,17 +28,6 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. #include "cgensupport.h" -/* Functions to construct return values */ - -object * -mknewcharobject(c) - int c; -{ - char ch[1]; - ch[0] = c; - return newsizedstringobject(ch, 1); -} - /* Functions to extract arguments. These needs to know the total number of arguments supplied, since the argument list is a tuple only of there is more than diff --git a/Modules/cgensupport.h b/Modules/cgensupport.h index 5c2cbd4..43818bc 100644 --- a/Modules/cgensupport.h +++ b/Modules/cgensupport.h @@ -29,8 +29,7 @@ typedef char *string; #define mknewlongobject(x) newintobject(x) #define mknewshortobject(x) newintobject((long)x) #define mknewfloatobject(x) newfloatobject(x) - -extern object *mknewcharobject PROTO((int c)); +#define mknewcharobject(c) mkvalue("c", c) extern int getiobjectarg PROTO((object *args, int nargs, int i, object **p_a)); extern int getilongarg PROTO((object *args, int nargs, int i, long *p_a)); diff --git a/Modules/flmodule.c b/Modules/flmodule.c index 3d424d1..0cc08da 100644 --- a/Modules/flmodule.c +++ b/Modules/flmodule.c @@ -528,7 +528,7 @@ call_forms_INiINstr (func, obj, args) char *b; int a; - if (!getintstrarg(args, &a, &b)) return NULL; + if (!getargs(args, "(is)", &a, &b)) return NULL; (*func) (obj, a, b); @@ -546,7 +546,7 @@ call_forms_INiINi (func, obj, args) { int par1, par2; - if (!getintintarg(args, &par1, &par2)) return NULL; + if (!getargs(args, "(ii)", &par1, &par2)) return NULL; (*func) (obj, par1, par2); @@ -1048,7 +1048,7 @@ get_default(g, args) c = fl_get_default (g->ob_generic); - return ((object *) mknewcharobject (c)); /* in cgensupport.c */ + return mkvalue("c", c); } static struct methodlist default_methods[] = { @@ -1479,7 +1479,7 @@ form_call_INiINi(func, f, args) { int a, b; - if (!getintintarg(args, &a, &b)) return NULL; + if (!getargs(args, "(ii)", &a, &b)) return NULL; (*func)(f, a, b); @@ -2144,7 +2144,7 @@ forms_set_graphics_mode(dummy, args) { int rgbmode, doublebuf; - if (!getintintarg(args, &rgbmode, &doublebuf)) + if (!getargs(args, "(ii)", &rgbmode, &doublebuf)) return NULL; fl_set_graphics_mode(rgbmode,doublebuf); INCREF(None); @@ -2441,7 +2441,7 @@ forms_show_input(f, args) char *str; char *a, *b; - if (!getstrstrarg(args, &a, &b)) return NULL; + if (!getargs(args, "(ss)", &a, &b)) return NULL; BGN_SAVE str = fl_show_input(a, b); diff --git a/Modules/fmmodule.c b/Modules/fmmodule.c index 8d54d97..aa49be3 100644 --- a/Modules/fmmodule.c +++ b/Modules/fmmodule.c @@ -68,7 +68,7 @@ fh_scalefont(self, args) object *args; { double size; - if (!getdoublearg(args, &size)) + if (!getargs(args, "d", &size)) return NULL; return newfhobject(fmscalefont(self->fh_fh, size)); } diff --git a/Modules/imgfile.c b/Modules/imgfile.c index a6db026..93f5ef3 100644 --- a/Modules/imgfile.c +++ b/Modules/imgfile.c @@ -162,9 +162,9 @@ imgfile_read(self, args) return rv; } -IMAGE *glob_image; -long *glob_datap; -int glob_width, glob_z; +static IMAGE *glob_image; +static long *glob_datap; +static int glob_width, glob_z; static xs_get(buf, y) diff --git a/Modules/mathmodule.c b/Modules/mathmodule.c index 979155e..8b1bccf 100644 --- a/Modules/mathmodule.c +++ b/Modules/mathmodule.c @@ -33,6 +33,9 @@ extern int errno; #include "modsupport.h" +#define getdoublearg(v, a) getargs(v, "d", a) +#define get2doublearg(v, a, b) getargs(v, "(dd)", a, b) + #include <math.h> #ifdef i860 diff --git a/Modules/nismodule.c b/Modules/nismodule.c index eb97dee..9234127 100644 --- a/Modules/nismodule.c +++ b/Modules/nismodule.c @@ -87,7 +87,7 @@ nis_match (self, args) int err; object *res; - if (!getstrstrarg(args, &key, &map)) + if (!getargs(args, "(ss)", &key, &map)) return NULL; if ((err = yp_get_default_domain(&domain)) != 0) return nis_error(err); diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c index 2e800de..88861c6 100644 --- a/Modules/posixmodule.c +++ b/Modules/posixmodule.c @@ -166,7 +166,7 @@ posix_2str(args, func) { char *path1, *path2; int res; - if (!getstrstrarg(args, &path1, &path2)) + if (!getargs(args, "(ss)", &path1, &path2)) return NULL; BGN_SAVE res = (*func)(path1, path2); @@ -185,7 +185,7 @@ posix_strint(args, func) char *path; int i; int res; - if (!getstrintarg(args, &path, &i)) + if (!getargs(args, "(si)", &path, &i)) return NULL; BGN_SAVE res = (*func)(path, i); @@ -691,7 +691,7 @@ posix_kill(self, args) object *args; { int pid, sig; - if (!getintintarg(args, &pid, &sig)) + if (!getargs(args, "(ii)", &pid, &sig)) return NULL; if (kill(pid, sig) == -1) return posix_error(); @@ -891,7 +891,7 @@ posix_tcsetpgrp(self, args) /* Functions acting on file descriptors */ -object * +static object * posix_open(self, args) object *self; object *args; @@ -913,7 +913,7 @@ posix_open(self, args) return newintobject((long)fd); } -object * +static object * posix_close(self, args) object *self; object *args; @@ -930,7 +930,7 @@ posix_close(self, args) return None; } -object * +static object * posix_dup(self, args) object *self; object *args; @@ -946,7 +946,7 @@ posix_dup(self, args) return newintobject((long)fd); } -object * +static object * posix_dup2(self, args) object *self; object *args; @@ -963,7 +963,7 @@ posix_dup2(self, args) return None; } -object * +static object * posix_lseek(self, args) object *self; object *args; @@ -988,7 +988,7 @@ posix_lseek(self, args) return newintobject(res); } -object * +static object * posix_read(self, args) object *self; object *args; @@ -1011,7 +1011,7 @@ posix_read(self, args) return buffer; } -object * +static object * posix_write(self, args) object *self; object *args; @@ -1028,7 +1028,7 @@ posix_write(self, args) return newintobject((long)size); } -object * +static object * posix_fstat(self, args) object *self; object *args; @@ -1079,7 +1079,7 @@ posix_fdopen(self, args) } #ifndef MSDOS -object * +static object * posix_pipe(self, args) object *self; object *args; diff --git a/Modules/rotormodule.c b/Modules/rotormodule.c index 4e9afd8..71bac90 100644 --- a/Modules/rotormodule.c +++ b/Modules/rotormodule.c @@ -763,8 +763,10 @@ static typeobject Rotortype = { }; -object *rotor_rotor(self, args) -object *args; +static object * +rotor_rotor(self, args) + object *self; + object *args; { char *string; rotorobject *r; diff --git a/Modules/sgimodule.c b/Modules/sgimodule.c index b373384..418609d 100644 --- a/Modules/sgimodule.c +++ b/Modules/sgimodule.c @@ -57,4 +57,4 @@ initsgi() initmodule("sgi", sgi_methods); } -int dummy; /* $%#@!& dl wants at least a byte of bss */ +static int dummy; /* $%#@!& dl wants at least a byte of bss */ diff --git a/Modules/socketmodule.c b/Modules/socketmodule.c index 160c292..dfdf97b 100644 --- a/Modules/socketmodule.c +++ b/Modules/socketmodule.c @@ -744,9 +744,9 @@ sock_send(s, args) char *buf; int len, n, flags; flags = 0; - if (!getargs(args, "(s#)", &buf, &len)) { + if (!getargs(args, "s#", &buf, &len)) { err_clear(); - if (!getargs(args, "s#", &buf, &len, &flags)) + if (!getargs(args, "(s#i)", &buf, &len, &flags)) return NULL; } BGN_SAVE diff --git a/Modules/stdwinmodule.c b/Modules/stdwinmodule.c index 02f7bcb..6e666a6 100644 --- a/Modules/stdwinmodule.c +++ b/Modules/stdwinmodule.c @@ -91,6 +91,15 @@ static type_lock StdwinLock; /* Lock held when interpreter not locked */ #endif +#define getpointarg(v, a) getargs(v, "(ii)", a, (a)+1) +#define get3pointarg(v, a) getargs(v, "((ii)(ii)(ii))", \ + a, a+1, a+2, a+3, a+4, a+5) +#define getrectarg(v, a) getargs(v, "((ii)(ii))", a, a+1, a+2, a+3) +#define getrectintarg(v, a) getargs(v, "(((ii)(ii))i)", a, a+1, a+2, a+3, a+4) +#define getpointintarg(v, a) getargs(v, "((ii)i)", a, a+1, a+2) +#define getrectpointarg(v, a) getargs(v, "(((ii)(ii))(ii))", \ + a, a+1, a+2, a+3, a+4, a+5) + static object *StdwinError; /* Exception stdwin.error */ /* Window and menu object types declared here because of forward references */ @@ -1236,7 +1245,7 @@ menu_setitem(self, args) { int index; char *text; - if (!getintstrarg(args, &index, &text)) + if (!getargs(args, "(is)", &index, &text)) return NULL; wmenusetitem(self->m_menu, index, text); INCREF(None); @@ -1250,7 +1259,7 @@ menu_enable(self, args) { int index; int flag; - if (!getintintarg(args, &index, &flag)) + if (!getargs(args, "(ii)", &index, &flag)) return NULL; wmenuenable(self->m_menu, index, flag); INCREF(None); @@ -1264,7 +1273,7 @@ menu_check(self, args) { int index; int flag; - if (!getintintarg(args, &index, &flag)) + if (!getargs(args, "(ii)", &index, &flag)) return NULL; wmenucheck(self->m_menu, index, flag); INCREF(None); @@ -1705,7 +1714,7 @@ window_settitle(wp, args) object *args; { object *title; - if (!getStrarg(args, &title)) + if (!getargs(args, "S", &title)) return NULL; DECREF(wp->w_title); INCREF(title); @@ -1930,7 +1939,7 @@ stdwin_open(sw, args) int tag; object *title; windowobject *wp; - if (!getStrarg(args, &title)) + if (!getargs(args, "S", &title)) return NULL; for (tag = 0; tag < MAXNWIN; tag++) { if (windowlist[tag] == NULL) @@ -2180,7 +2189,7 @@ stdwin_askfile(self, args) char *prompt, *dflt; int new, ret; char buf[256]; - if (!getstrstrintarg(args, &prompt, &dflt, &new)) + if (!getargs(args, "(ssi)", &prompt, &dflt, &new)) return NULL; strncpy(buf, dflt, sizeof buf); buf[sizeof buf - 1] = '\0'; @@ -2201,7 +2210,7 @@ stdwin_askync(self, args) { char *prompt; int new, ret; - if (!getstrintarg(args, &prompt, &new)) + if (!getargs(args, "(si)", &prompt, &new)) return NULL; BGN_STDWIN ret = waskync(prompt, new); @@ -2221,7 +2230,7 @@ stdwin_askstr(self, args) char *prompt, *dflt; int ret; char buf[256]; - if (!getstrstrarg(args, &prompt, &dflt)) + if (!getargs(args, "(ss)", &prompt, &dflt)) return NULL; strncpy(buf, dflt, sizeof buf); buf[sizeof buf - 1] = '\0'; diff --git a/Modules/sunaudiodev.c b/Modules/sunaudiodev.c index b4470dd..4e63123 100644 --- a/Modules/sunaudiodev.c +++ b/Modules/sunaudiodev.c @@ -28,6 +28,7 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. #include "modsupport.h" #include "structmember.h" +#include <stropts.h> #include <sys/ioctl.h> #include <sun/audioio.h> @@ -255,6 +256,38 @@ sad_drain(self, args) return None; } +static object * +sad_flush(self, args) + sadobject *self; + object *args; +{ + + if ( !getargs(args, "") ) + return 0; + if ( ioctl(self->x_fd, I_FLUSH, FLUSHW) < 0 ) { + err_errno(SunAudioError); + return NULL; + } + INCREF(None); + return None; +} + +static object * +sad_close(self, args) + sadobject *self; + object *args; +{ + + if ( !getargs(args, "") ) + return 0; + if ( self->x_fd >= 0 ) { + close(self->x_fd); + self->x_fd = -1; + } + INCREF(None); + return None; +} + static struct methodlist sad_methods[] = { { "read", sad_read }, { "write", sad_write }, @@ -264,6 +297,8 @@ static struct methodlist sad_methods[] = { { "getinfo", sad_getinfo }, { "setinfo", sad_setinfo }, { "drain", sad_drain }, + { "flush", sad_flush }, + { "close", sad_close }, {NULL, NULL} /* sentinel */ }; diff --git a/Modules/threadmodule.c b/Modules/threadmodule.c index 7a5f29d..f22aa8c 100644 --- a/Modules/threadmodule.c +++ b/Modules/threadmodule.c @@ -33,7 +33,7 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. int threads_started = 0; -object *ThreadError; +static object *ThreadError; /* Lock objects */ diff --git a/Modules/timemodule.c b/Modules/timemodule.c index b8b22e3..3df0885 100644 --- a/Modules/timemodule.c +++ b/Modules/timemodule.c @@ -78,6 +78,26 @@ OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. #include <errno.h> #endif +#ifdef SYSV +/* Access timezone stuff */ +#ifdef OLDTZ /* ANSI prepends underscore to these */ +#define _timezone timezone /* seconds to be added to GMT */ +#define _altzone 0 /* _timezone if daylight saving time */ +#define _daylight 0 /* if zero, _altzone is not available*/ +#define _tzname tzname /* Name of timezone and altzone */ +#endif +#ifdef NOALTTZ /* if system doesn't support alt tz */ +#undef _daylight +#undef _altzone +#define _daylight 0 +#define _altzone 0 +#endif +#endif /* SYSV */ + +/* Forward declarations */ +static void floatsleep PROTO((double)); +static long millitimer PROTO((void)); + /* Time methods */ static object * @@ -199,7 +219,6 @@ time_millitimer(self, args) object *args; { long msecs; - extern long millitimer(); if (!getnoarg(args)) return NULL; msecs = millitimer(); @@ -225,7 +244,7 @@ time_times(self, args) err_errno(IOError); return NULL; } - return mkvalue("dddd", + return mkvalue("(dddd)", (double)t.tms_utime / HZ, (double)t.tms_stime / HZ, (double)t.tms_cutime / HZ, @@ -235,6 +254,71 @@ time_times(self, args) #endif +static object * +time_convert(when, function) + time_t when; + struct tm * (*function) PROTO((time_t *)); +{ + struct tm *p = function(&when); + return mkvalue("(iiiiiiiii)", + p->tm_year + 1900, + p->tm_mon + 1, /* Want January == 1 */ + p->tm_mday, + p->tm_hour, + p->tm_min, + p->tm_sec, + (p->tm_wday + 6) % 7, /* Want Monday == 0 */ + p->tm_yday, + p->tm_isdst); +} + +static object * +time_gmtime(self, args) + object *self; + object *args; +{ + double when; + if (!getargs(args, "d", &when)) + return NULL; + return time_convert((time_t)when, gmtime); +} + +static object * +time_localtime(self, args) + object *self; + object *args; +{ + double when; + if (!getargs(args, "d", &when)) + return NULL; + return time_convert((time_t)when, localtime); +} + +/* Some very old systems may not have mktime(). Comment it out then! */ + +static object * +time_mktime(self, args) + object *self; + object *args; +{ + struct tm buf; + if (!getargs(args, "(iiiiiiiii)", + &buf.tm_year, + &buf.tm_mon, + &buf.tm_mday, + &buf.tm_hour, + &buf.tm_min, + &buf.tm_sec, + &buf.tm_wday, + &buf.tm_yday, + &buf.tm_isdst)) + return NULL; + if (buf.tm_year >= 1900) + buf.tm_year -= 1900; + buf.tm_mon--; + return newintobject((long)mktime(&buf)); +} + static struct methodlist time_methods[] = { #ifdef DO_MILLI {"millisleep", time_millisleep}, @@ -245,6 +329,9 @@ static struct methodlist time_methods[] = { #endif {"sleep", time_sleep}, {"time", time_time}, + {"gmtime", time_gmtime}, + {"localtime", time_localtime}, + {"mktime", time_mktime}, {NULL, NULL} /* sentinel */ }; @@ -252,7 +339,40 @@ static struct methodlist time_methods[] = { void inittime() { - initmodule("time", time_methods); + object *m, *d; + m = initmodule("time", time_methods); + d = getmoduledict(m); +#ifdef SYSV + tzset(); + dictinsert(d, "timezone", newintobject((long)_timezone)); + dictinsert(d, "altzone", newintobject((long)_altzone)); + dictinsert(d, "daylight", newintobject((long)_daylight)); + dictinsert(d, "tzname", mkvalue("(zz)", _tzname[0], _tzname[1])); +#else /* !SYSV */ + { +#define YEAR ((time_t)((365 * 24 + 6) * 3600)) + time_t t; + struct tm *p; + long winterzone, summerzone; + char wintername[10], summername[10]; + t = (time((time_t *)0) / YEAR) * YEAR; + p = localtime(&t); + winterzone = -p->tm_gmtoff; + strncpy(wintername, p->tm_zone ? p->tm_zone : " ", 9); + wintername[9] = '\0'; + t += YEAR/2; + p = localtime(&t); + summerzone = -p->tm_gmtoff; + strncpy(summername, p->tm_zone ? p->tm_zone : " ", 9); + summername[9] = '\0'; + dictinsert(d, "timezone", newintobject(winterzone)); + dictinsert(d, "altzone", newintobject(summerzone)); + dictinsert(d, "daylight", + newintobject((long)(winterzone != summerzone))); + dictinsert(d, "tzname", + mkvalue("(zz)", wintername, summername)); + } +#endif /* !SYSV */ } @@ -274,6 +394,7 @@ sleep(secs) } #endif +static void floatsleep(secs) double secs; { @@ -286,7 +407,7 @@ floatsleep(secs) } } -long +static long millitimer() { return MacTicks * 50 / 3; /* MacTicks * 1000 / 60 */ @@ -299,7 +420,7 @@ millitimer() #ifdef BSD_TIME -long +static long millitimer() { struct timeval t; @@ -309,6 +430,7 @@ millitimer() return t.tv_sec*1000 + t.tv_usec/1000; } +static void floatsleep(secs) double secs; { @@ -325,6 +447,7 @@ floatsleep(secs) #else /* !BSD_TIME */ +static void floatsleep(secs) double secs; { @@ -342,13 +465,14 @@ floatsleep(secs) #define CLOCKS_PER_SEC 55 /* 54.945 msec per tick (18.2 HZ clock) */ #endif +static void floatsleep(secs) double secs; { delay(long(secs/1000.0)); } -long +static long millitimer() { clock_t ticks; |