Specifically, you have been hired to develop the bookz_lib
module and the bookz_player
module.
You must uncompress it (using gzip
) and extract the
collection (using tar
) before using it, but you must not
change any of the individual file names or the contents of the files.
read()
and write()
for input/output. You must not use C/C++
I/O libraries (e.g., you must not use printf()
or scanf()
or any of their variants other than
sprintf()
).
gzip
and
tar
) from the command line
using man
or on-line.
bookz_player
will display the
"lines" of the bookz one per second. Specifically, it will display
them much more quickly than that. Hence, you will need to slow the
display. This can be accomplished with a call to the
sleep()
function
after each "line" is displayed.
printf()
you will need to convert
the numebr of lines read to a char[]
in order to display it
using write()
. The easiest way to do this is using the
library function sprintf()
.
You should know (or be able to figure out) how to determine the number of digits in a number. If you get stuck, you can review my , CS139 lecture on the topic.
Copyright 2017