Commit 9a593f02 by Eric Coissac

Substitutes fprintf call by fputs call to comply with the new Ubuntu

compilation rules
parent 8e4e7cf4
...@@ -5,6 +5,7 @@ ...@@ -5,6 +5,7 @@
cdef extern from "stdio.h": cdef extern from "stdio.h":
struct FILE struct FILE
int fprintf(FILE *stream, char *format, ...) int fprintf(FILE *stream, char *format, ...)
int fputs(char *string, FILE *stream)
FILE* stderr FILE* stderr
ctypedef unsigned int off_t "unsigned long long" ctypedef unsigned int off_t "unsigned long long"
......
...@@ -128,17 +128,17 @@ cdef class ProgressBar: ...@@ -128,17 +128,17 @@ cdef class ProgressBar:
self.diese[fraction]=b'#' self.diese[fraction]=b'#'
self.spaces[50 - fraction]=b' ' self.spaces[50 - fraction]=b' '
twentyth = int(percent * 20) tenth = int(percent * 10)
if twentyth != self.lastlog: if tenth != self.lastlog:
if self.ontty: if self.ontty:
<void>fprintf(stderr,b'\n') <void>fputs(b'\n',stderr)
self.logger.info('%s %5.1f %% remain : %02d:%02d:%02d' % ( self.logger.info('%s %5.1f %% remain : %02d:%02d:%02d' % (
bytes2str(self._head), bytes2str(self._head),
percent*100., percent*100.,
hour,minu,sec)) hour,minu,sec))
self.lastlog=twentyth self.lastlog=tenth
else: else:
self.cycle+=1 self.cycle+=1
......
major = 0 major = 0
minor = '2' minor = '2'
serial= '03' serial= '04'
version = "%d.%s.%s" % (major,minor,serial) version = "%d.%s.%s" % (major,minor,serial)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment