is using english haram in this chan?
anyways I'm tired of all of you faggots larping about computers while all you do is install shitty operating systems.
this is a thread about code, discussing code, sharing code, and improving code.
if you never wrote anything then go make another thread about gentoo or arch or whatever you newfags do.
anyways, I've made this push up counter, it can count up to 1 billion push ups everyday (of course you can make it do more by changing int to long unsigned int but you will also have to increase the toread variable to however many digits that can take + 11), it checks if the day had records before, if it did then it gets the old number of pushups, adds the new number, and seeks to the start of the old number and overwrites it, if the day didn't have any records it just makes a new entry at the end of the file and places the push up number, I will probably try to make it more general as it can count anything, just the name of the files and variables are specific to push-ups.
the stat function is still not complete, it should give more information (daily increase/decrease, monthly total, all that shit)
and I should probably replace the open/read with fread and fopen so I don't have to include unistd.h, but who cares unless you are static linking.
also you can post code of any language, even shell and batch scripts are fine.
(I hope the tags work)
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include <time.h>
#include <fcntl.h>
#include <unistd.h>