10 #include <linux/ppdev.h>
14 static void badusage(void) {
16 "usage: readlots <&parport\n"
20 int main(int argc, const char *const *argv) {
27 if (argc>=1) badusage();
30 r= gettimeofday(&tv,0); assert(!r);
31 doioctl(PPRSTATUS, &v, 0);
32 printf("%10lu.%06lu %02x\n", tv.tv_sec, tv.tv_usec, v);