Skip to content

Instantly share code, notes, and snippets.

@atiti
Last active August 29, 2015 13:58
Show Gist options
  • Save atiti/9953645 to your computer and use it in GitHub Desktop.
Save atiti/9953645 to your computer and use it in GitHub Desktop.
#include <stdio.h>
int main(int argc, const char *argv[]) {
char buffer[512], found = 0;
for(int i=0;i<argc;i++)
if (strcmp(argv[i], "-Wabc") == 0) { found = 1; break; }
if (!found) return 1;
while (!feof(stdin)) {
int bytes = fread(buffer, sizeof(char), 512, stdin);
fwrite(buffer, sizeof(char), bytes, stdout);
fflush(stdout);
}
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment