home *** CD-ROM | disk | FTP | other *** search
- 38a39,40
- > #include <ctype.h> /* only needed on some systems to include toupper(), */
- > /* it can be commented out if compile problems arise */
- 42a45
- > int quiet = 0;
- 46a50
- > "hp150",
- 55c59,60
- < int i, fd, termok = 0;
- ---
- > int i, fd, args, file_ok = 0, termok = 0;
- >
- 63,69c68,69
- < if (termok != 1) {
- < fprintf(stderr, "%s: Inadequate terminal type '%s'\n", argv[0], getenv("TERM"));
- < exit(1);
- < }
- <
- < if (argc == 2) {
- < if (strcmp(argv[1], "-") == 0) { /* hook stdin to fd */
- ---
- > for (args = 1; args <= argc-1; args++) {
- > if (strcmp(argv[args], "-") == 0) { /* hook stdin to fd */
- 72c72,75
- < } else { /* open normal file */
- ---
- > file_ok = 1;
- > } else if (strcmp(argv[args], "-q") == 0) { /* quiet mode */
- > quiet = 1;
- > } else { /* open normal file */
- 73a77
- > file_ok = 1;
- 75c79,87
- < } else {
- ---
- > }
- >
- > if (termok != 1) {
- > if (quiet == 0)
- > fprintf(stderr, "%s: Inadequate terminal type '%s'\n", argv[0], getenv("TERM"));
- > exit(1);
- > }
- >
- > if (file_ok == 0) { /* open default file if needed */
- 77a90
- >
- 79c92,93
- < fprintf(stderr, "%s: Cannot open any source file\n", argv[0]);
- ---
- > if (quiet == 0)
- > fprintf(stderr, "%s: Cannot open any source file\n", argv[0]);
- 128a143
- > int i, j;
- 139a155,163
- > i = 0;
- > do {
- > if (string[i] == '%') {
- > for (j=strlen(string)+1; j != i; j--)
- > string[j] = string[j-1];
- > i++;
- > }
- > i++;
- > } while (i < strlen(string));
- 156c180,181
- < fprintf(stderr, "%s: Invalid entry for key '%s'\n", pgname, k);
- ---
- > if (quiet == 0)
- > fprintf(stderr, "%s: Invalid entry for key '%s'\n", pgname, k);
- 275d299
- <
-