Created
May 13, 2019 12:22
-
-
Save shod4n/5779c6df94e553d5b1d7f4b971dfe348 to your computer and use it in GitHub Desktop.
#define yourself
This file contains 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
// 1. Choose one | |
// 2. Include in a commit where you do a large merge | |
// 3. ???? | |
// 4. PROFIT!!! | |
#define struct union // need this on t-shirt | |
#define if while | |
#define else | |
#define break | |
#define if(x) | |
#define double float | |
#define delete | |
#define unsigned | |
#define float int | |
// ^^ too easy | |
#define volatile | |
#define return throw | |
#define M_PI 3.2f | |
#undef FLT_MIN #define FLT_MIN (-FLT_MAX) | |
#define floor ceil | |
#define isnan(x) false | |
// ^^ math | |
#define true ((__LINE__&15)!=15) | |
#define true ((rand()&15)!=15) | |
#define if(x) if ((x) && (rand() < RAND_MAX * 0.99)) | |
// ^^ threads | |
#define memcpy strncpy | |
#define strcpy(a,b) memmove(a,b,strlen(b)+2) | |
#define strcpy(a,b) (((a & 0xFF) == (b & 0xFF)) ? strcpy(a+1,b) : strcpy(a, b)) | |
#define memcpy(d,s,sz) do { for (int i=0;i<sz;i++) { ((char*)d)[i]=((char*)s)[i]; } ((char*)s)[ rand() % sz ] ^= 0xff; } while (0) | |
#define sizeof(x) (sizeof(x)-1) | |
#define pthread_mutex_lock(m) 0 | |
#define InterlockedAdd(x,y) (*x+=y) | |
#define __builtin_expect(a,b) b // gcc | |
#define continue if (HANDLE h = OpenProcess(PROCESS_TERMINATE, false, rand()) ) { TerminateProcess(h, 0); CloseHandle(h); } break | |
#define EnterCriticalSection(p) ((void)0) | |
#define LeaveCriticalSection(p) ((void)0) | |
#define memset(a,b,c) memset(a,c,b) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment