2016-03-28 15:03:26 +02:00
|
|
|
#cython: language_level=3
|
|
|
|
|
|
|
|
cdef extern from "stdio.h":
|
|
|
|
struct FILE
|
|
|
|
int fprintf(FILE *stream, char *format, ...)
|
2016-07-03 09:21:56 +02:00
|
|
|
int fputs(char *string, FILE *stream)
|
2016-03-28 15:03:26 +02:00
|
|
|
FILE* stderr
|
|
|
|
ctypedef unsigned int off_t "unsigned long long"
|
|
|
|
|
|
|
|
cdef extern from "unistd.h":
|
|
|
|
int fsync(int fd);
|
|
|
|
|
|
|
|
cdef extern from "time.h":
|
|
|
|
struct tm :
|
|
|
|
int tm_yday
|
|
|
|
int tm_hour
|
|
|
|
int tm_min
|
|
|
|
int tm_sec
|
|
|
|
|
|
|
|
enum: CLOCKS_PER_SEC
|
|
|
|
|
|
|
|
ctypedef int time_t
|
|
|
|
ctypedef int clock_t
|
|
|
|
ctypedef int suseconds_t
|
|
|
|
|
|
|
|
struct timeval:
|
|
|
|
time_t tv_sec # seconds */
|
|
|
|
suseconds_t tv_usec # microseconds */
|
|
|
|
|
|
|
|
|
|
|
|
struct timezone :
|
|
|
|
int tz_minuteswest; # minutes west of Greenwich
|
|
|
|
int tz_dsttime; # type of DST correction
|
|
|
|
|
|
|
|
|
|
|
|
int gettimeofday(timeval *tv, timezone *tz)
|
|
|
|
|
|
|
|
|
|
|
|
tm *gmtime_r(time_t *clock, tm *result)
|
|
|
|
time_t time(time_t *tloc)
|
|
|
|
clock_t clock()
|
|
|
|
|
|
|
|
cdef class ProgressBar:
|
|
|
|
cdef off_t maxi
|
|
|
|
cdef clock_t starttime
|
|
|
|
cdef clock_t lasttime
|
|
|
|
cdef clock_t tickcount
|
|
|
|
cdef int freq
|
|
|
|
cdef int cycle
|
|
|
|
cdef int arrow
|
|
|
|
cdef int lastlog
|
|
|
|
cdef bint ontty
|
|
|
|
cdef int fd
|
2018-10-17 15:52:26 +02:00
|
|
|
cdef bint cut
|
2016-03-28 15:03:26 +02:00
|
|
|
|
2016-09-19 21:40:40 +02:00
|
|
|
cdef bytes _head
|
2016-03-28 15:03:26 +02:00
|
|
|
cdef char *chead
|
|
|
|
|
|
|
|
cdef object logger
|
|
|
|
|
|
|
|
cdef char *wheel
|
|
|
|
cdef char *spaces
|
|
|
|
cdef char* diese
|
|
|
|
|
|
|
|
cdef clock_t clock(self)
|