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 *__malloc__(size_t size) { | |
size_t *memory; | |
memory = (size_t*)malloc(sizeof(size_t) + size); | |
if (memory == NULL) return NULL; | |
*memory = size; |
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> | |
#include <ctype.h> | |
enum json_value_type { | |
jv_string, | |
jv_number, | |
jv_array, | |
jv_object | |
}; |
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 <stdlib.h> | |
#include <stdio.h> | |
#if defined(WIN32) || defined(_WIN32) || defined(__WIN32) && !defined(__CYGWIN__) | |
#include <fcntl.h> | |
#define PIPE(X) _pipe(X, 2, O_RAW) | |
#else | |
#include <unistd.h> | |
#define PIPE(X) pipe(X) | |
#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
#ifndef EASY_WIN32_CONTROLS_H | |
#define EASY_WIN32_CONTROLS_H | |
// EXAMPLE: | |
// https://ibb.co/GRHmv5s | |
// case WM_CREATE: { | |
// startWindow(5, 5, hwnd); | |
// | |
// newWindow(STATIC, "Edit Example:", 0, 0, 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 <stdio.h> | |
#include <stdlib.h> | |
#include <string.h> | |
#include <math.h> | |
char itoc(int i) { | |
if (i < 0) return 0; | |
return ((i-1) % 26) + 65; | |
} |
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> | |
#include <stdarg.h> | |
#include <string.h> | |
size_t counter(char *str) { | |
size_t commas = 0; | |
int string = 0; | |
while (*str) { |
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> | |
#include <string.h> | |
#include <stdarg.h> | |
size_t counter(char *str) { | |
size_t commas = 0; | |
int string = 0; | |
while (*str) { |
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> | |
#include <time.h> | |
#if defined(WIN32) || defined(_WIN32) || defined(__WIN32) && !defined(__CYGWIN__) | |
#include <windows.h> | |
#else | |
#include <unistd.h> | |
#define Sleep(time) sleep(time/1000) | |
#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 <stdarg.h> | |
size_t counter(char *str) { | |
size_t commas = 0; | |
int string = 0; | |
while (*str) { | |
//escape commas inside string; | |
if (*str == '"' && *(str - 1) != '\\') string = !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 <stdio.h> | |
#include <windows.h> | |
char SHOW_FLAG = 0; | |
void console_show() { | |
AllocConsole(); | |
freopen("CONIN$", "r", stdin); | |
freopen("CONOUT$", "w", stdout); | |
freopen("CONOUT$", "w", stderr); | |