1: char lbuf[100];
2: char buf[128];
3:
4: int num;
5: main(argc, argv)
6: char *argv[];
7: {
8: register char *p1, *p2;
9: register int j;
10: int i;
11:
12: num = 1;
13: if(argc > 1 && *argv[1] == '-') {
14: num = argv[1][1] - '0';
15: if(num < 1 || num > 9)
16: num = 1;
17: argv++;
18: argc--;
19: }
20:
21: p1 = argv[1];
22: while(*p1) {
23: buf[*p1++]++;
24: }
25: if(num > 1)
26: printf("#n\n");
27: for(i = 1; i < 10; i++) {
28: p2 = lbuf;
29: for(j = 'A'; j <= 'Z'; j++) {
30: if(buf[j] == i) {
31: *p2++ = j;
32: }
33: }
34: for(j = 'a'; j <= 'z'; j++) {
35: if(buf[j] == i) {
36: *p2++ = j;
37: }
38: }
39:
40: if(p2 == lbuf) continue;
41: *p2 = 0;
42: printf("/\\([%s]\\)", lbuf);
43: for(j = 0; j < i; j++)
44: printf(".*\\1");
45: printf("/d\n");
46: }
47: printf("s/-//g\n");
48: printf("/");
49: while(num--)
50: printf(".");
51: printf("/p\n");
52:
53: }
Defined functions
main
defined in line
5;
never used
Defined variables
buf
defined in line
2; used 3 times
lbuf
defined in line
1; used 3 times
num
defined in line
4; used 7 times