public
Description: personal scripts
Homepage:
Clone URL: git://github.com/mackstann/bin.git
bin / Fat32Filter
100755 28 lines (25 sloc) 0.456 kb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#!/usr/bin/tcc -run
#include <stdio.h>
 
int main(void)
{
    for(;;)
    {
        int c = getc(stdin);
        if(c == EOF)
            return 0;
        switch(c)
        {
            case ':':
            case ';':
            case '*':
            case '?':
            case '"':
            case '<':
            case '>':
            case '|':
                putc('_', stdout);
                continue;
        }
        putc(c, stdout);
    }
}