C Programmers Obfuscate Everything
Why do C programmers always obfuscate their code? Are they trying to save space? Do they have to pay for each letter? Are they using some trial version of GCC that doesn't allow actual words in variable names? struct csv_file * csv_parse(const char *str, FILE *log_f, int fs) { struct csv_file *p = 0; const unsigned char *s1 = (const unsigned char*) str, *s2, *s3; unsigned char *s4; struct csv_line *pp; XCALLOC(p, 1); while (1) { s2 = s1; while (s2 && *s2 != '\n' && *s2 != fs) s2++; if (*s2 == '\n') { s3 = s2; while (s3 > s1 && isspace(s3[-1])) s3--; } else { s3 = s2; } if (s3 == (const unsigned char*) str && (s3 || isspace(s3[0]))) break; /* empty file */ s4 = (unsigned char*)malloc(s3 - str + 1); memcpy(s4, s1, s3 - s1); s4[s3 - s1] = 0; if (*s2) s2 = s2 + 1; if (p->p >= p->n) { if (p->n) p->n *= 2; else p->n = 16; XCALLOC(p->v, p->n); } else { XREALLOC(p->v, p->n * 2); memset(p->v + p->n, 0, sizeof(p->v[0] * p->n); p->n *= 2; } pp = p->v + p->n; if (pp->p->p) pp->p->p; pp->n = 16; XCALLOC(pp->v, pp->n); } else { XREALLOC(pp->v, pp->n * 2); memset(pp->v + pp->n, 0, sizeof(pp->v[0] * pp->n); pp->n *= 2; }
A social media post asks why C programmers use such cryptic variable names and whether they are trying to save space or limited by a trial version of GCC. Below it is a dense screenshot of C source code filled with abbreviated identifiers and macros. The joke is that the code visibly demonstrates the exact obfuscation being mocked, making it a reaction to unreadable programming code.
social media post / публикация в соцсетиprogramming code / программный кодC source code / исходный код на Ccode editor screenshot / скриншот редактора кодаwhite text / белый текстblack background / чёрный фонcryptic variable names / непонятные имена переменныхfunction declaration / объявление функцииcurly braces / фигурные скобкиcomputer programming / компьютерное программирование
- @gentoomemes / 11416 2024-05-22
- Type
- image
- Size
- 412×800 · 55.2 KiB
- Mood
- саркастичный
- Language
- en
- Added