home *** CD-ROM | disk | FTP | other *** search
- #include <stdio.h>
- #include <string.h>
- #include <stdlib.h>
-
-
- int my_cmp(char **a, char **b)
- {
- return stricmp(*a, *b);
- }
-
- void main(void)
- {
- static char names[3000];
- static char *pointers[300];
-
- int count;
- int i;
-
- count = getfnl("#?", names, sizeof(names), 0);
- if(count > 0)
- {
- if(strbpl(pointers, 300, names) != count)
- exit(10);
-
- qsort((char *)pointers, count, sizeof(*pointers), my_cmp);
-
- i = 0;
-
- while(i < count)
- fprintf(stdout, "%s\n", pointers[i++]);
- }
- }
-