This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
#ifndef HEAP_MAX | |
#define HEAP_MAX 1 | |
#endif | |
struct HeapMap_s { | |
void *memory; | |
char *file; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
void *ftob(const char *file, unsigned int *size, ...) { | |
FILE *fp; | |
unsigned char *buffer; | |
long int _size; | |
if ((fp = fopen(file, "rb")) == NULL) { | |
fprintf(stderr, "ERROR: Could not open '%s'\n", file); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <windows.h> | |
#include <stdarg.h> | |
int counter(wchar_t* str) { | |
int i = 0; | |
while (*str) { | |
if (*str == ',') i++; | |
str++; | |
} | |
return i+1; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <limits.h> | |
#define typeof(x) \ | |
(((x == 0) ? (x = 0.00000000001) : (x)) / INT_MAX == 0) \ | |
? ("0cs0i0000"[sizeof(x)]) \ | |
: ("0000f000d"[sizeof(x)]) | |
int main() { | |
char c; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <assert.h> | |
#include <pthread.h> | |
#include <stdarg.h> | |
#define thread_local _Thread_local | |
#ifndef THREAD_MAX | |
#define THREAD_MAX 50 | |
#endif |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <string.h> | |
#include <ctype.h> | |
#define str_assert(condition) \ | |
{ \ | |
if (!(condition)) { \ | |
fprintf(stderr, "Expression: '%s' failed at %s:%i\n", \ | |
#condition, file, line); \ | |
return 0; \ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <winsock2.h> | |
#include <assert.h> | |
#include <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
/*/////////////////////////////////// | |
easy-string | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <winsock2.h> | |
#include <assert.h> | |
#include <stdio.h> | |
#include <string.h> | |
#include <stdarg.h> | |
/*/////////////////////////////////// | |
easy-strings | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
#include <stdlib.h> | |
#ifndef HEAP_MAX | |
#define HEAP_MAX 50 | |
#endif | |
struct HeapMap_s { | |
void *memory; | |
char *file; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include <stdio.h> | |
void before_main() { | |
printf("code before main here.\n"); | |
} | |
void after_main() { | |
printf("code after main here.\n"); | |
} |
OlderNewer