head 1.1; access; symbols; locks; strict; comment @ * @; 1.1 date 97.03.01.12.28.45; author alexis; state Exp; branches; next ; desc @@ 1.1 log @Initial revision @ text @#include #define USAGE "Usage: %s [ -n tabsize ]\n" #define DEFAULT_TABSIZE 8 char *progname; main(argc, argv) int argc; char *argv[]; { char linbuf[1024]; int i, o, j; char c; int tabsize; int inc; progname = argv[0]; tabsize = DEFAULT_TABSIZE; while (argc > 1 && argv[1][0] == '-') { switch (argv[1][1]) { case 'n': if (argc < 3 || sscanf(argv[2], "%d", &tabsize) != 1) { fprintf(stderr, USAGE, progname); exit(1); } break; default: fprintf(stderr, USAGE, progname); exit(1); } } while (fgets(linbuf, sizeof(linbuf), stdin) != NULL) { for (i=0, o=0; i