1
0
Fork 0

more crap

master
Marrub 2015-10-27 04:27:42 +00:00
parent d20452893d
commit 49f8daeb91
4 changed files with 79 additions and 0 deletions

25
16totext.c Normal file
View File

@ -0,0 +1,25 @@
#include <stdio.h>
#include <stdlib.h>
int main()
{
FILE *fp = fopen("nice.txt", "r");
for(;;)
{
if(feof(fp))
{
break;
}
char c[3] = { 0 };
fread(c, 1, 2, fp);
fgetc(fp);
printf("%c", strtol(c, NULL, 16));
}
return 0;
}

25
2totext.c Normal file
View File

@ -0,0 +1,25 @@
#include <stdio.h>
#include <stdlib.h>
int main()
{
FILE *fp = fopen("nice_.txt", "r");
for(;;)
{
if(feof(fp))
{
break;
}
char c[9] = { 0 };
fread(c, 1, 8, fp);
fgetc(fp);
printf("%c", strtol(c, NULL, 2));
}
return 0;
}

13
crypt.c Normal file
View File

@ -0,0 +1,13 @@
#define _XOPEN_SOURCE
#include <unistd.h>
#include <stdio.h>
/* WHY IS THIS VALID
main(argc, argv)
int argc;
char **argv;*/
int main(int argc, char **argv)
{
printf("%s\n", crypt(argv[1], "zd"));
return 0;
}

16
sdlkey.c Normal file
View File

@ -0,0 +1,16 @@
#include <SDL2/SDL.h>
#include <stdio.h>
int main(int argc, char **argv)
{
if(argc != 2)
{
printf("invalid number of arguments (%d)\n", argc);
return 1;
}
printf("key is '%d'\n", SDL_GetKeyFromName(argv[1]));
return 0;
}