The Obfuscated C Style Guide
How to write Unmaintainable Code
[link|http://mindprod.com/unmainobfuscation.html|http://mindprod.com/...nobfuscation.html]
Aside from being humorous, this is actually useful as a "never do this" guide.
edit: This is particularly hilarious:
C's Eccentric View Of Arrays
C compilers transform myArray[i] into *(myArray + i), which is equivalent to *(i + myArray) which is equivalent to i[myArray]. Experts know to put this to good use. To really disguise things, generate the index with a function:
\nint myfunc(int q, int p) { return p%q; } \n ... \n myfunc(6291, 8)[Array]; \n
Edited by
deSitter
Dec. 8, 2003, 11:39:45 AM EST
The Obfuscated C Style Guide
How to write Unmaintainable Code
[link|http://mindprod.com/unmainobfuscation.html|http://mindprod.com/...nobfuscation.html]
Aside from being humerous, this is actually useful as a "never do this" guide.
edit: This is particularly hilarious:
C's Eccentric View Of Arrays
C compilers transform myArray[i] into *(myArray + i), which is equivalent to *(i + myArray) which is equivalent to i[myArray]. Experts know to put this to good use. To really disguise things, generate the index with a function:
int myfunc(int q, int p) { return p%q; }
...
myfunc(6291, 8)[Array];
-drl