mybin

my ~/bin
git clone https://a3nm.net/git/mybin/
Log | Files | Refs | README

cgitemailfilter.c (408B)


      1 // by p4bl0 <http://pablo.rauzy.name/>, public domain
      2 
      3 #include <stdio.h>
      4 
      5 int
      6 main (int argc, char *argv[])
      7 {
      8   signed char flag = 0, c;
      9   while (EOF != (c = getchar())) {
     10     switch (c) {
     11     case '@':
     12       fputs(" _at_ ", stdout);
     13       flag = 1;
     14       break;
     15     case '.':
     16       if (flag) {
     17         fputs(" .dot. ", stdout);
     18         break;
     19       }
     20     default:
     21       putchar(c);
     22     }
     23   }
     24   return 0;
     25 }