all:
@echo "Please choose what to make:"
- @grep '^[^ ]*:' Makefile
+ @grep '^[^ ]*:' Makefile | grep -v =
parrot: parrot.c
else
{
if (rate <= 0)
- total_discharge += 359999;
+ total_discharge += 1000000;
else
total_discharge += remains*3600 / rate;
}
p += sprintf(p, "%d%%", 100*total_full/total_capa);
else
p += sprintf(p, "??%%");
- if (total_discharge)
+ if (total_discharge && total_discharge < 1000000)
p += sprintf(p, " %d:%02d remains", total_discharge/3600, (total_discharge/60)%60);
else if (total_charge)
p += sprintf(p, " %d:%02d charging", total_charge/3600, (total_charge/60)%60);
- else
- p += sprintf(p, " ????");
xosd_display(osd, 0, XOSD_string, status);
}