#include #include #define STR_MAX_LENGTH 1024 /** * W. John Holden (http://wjholden.com) * Save as "convert.c", compile with "gcc convert.c -o convert", * run with "./convert", type in your email address and your * email address will be printed out in HTML ASCII Special * Character codes. Great for obfuscating an email address * on a website. */ int main (int argc, char * argv[]) { char str[STR_MAX_LENGTH]; int x, y; x = y = 0; for ( ; x < STR_MAX_LENGTH && str[x-1] != '\n'; x++) { str[x] = getchar(); } str[x] = '\0'; while (y < x) { printf("&#%d;", str[y++]); } printf("\n"); return(EXIT_SUCCESS); }