(fname, complain)
| 708 | } |
| 709 | |
| 710 | void |
| 711 | Gem_display_file(fname, complain) |
| 712 | const char *fname; |
| 713 | boolean complain; |
| 714 | { |
| 715 | dlb *f; |
| 716 | char buf[BUFSZ]; |
| 717 | char *cr; |
| 718 | |
| 719 | f = dlb_fopen(fname, "r"); |
| 720 | if (!f) { |
| 721 | if (complain) |
| 722 | pline("Cannot open \"%s\".", fname); |
| 723 | } else { |
| 724 | winid datawin; |
| 725 | |
| 726 | datawin = Gem_create_nhwindow(NHW_TEXT); |
| 727 | while (dlb_fgets(buf, BUFSZ, f)) { |
| 728 | if ((cr = strchr(buf, '\n')) != 0) |
| 729 | *cr = 0; |
| 730 | if (strchr(buf, '\t') != 0) |
| 731 | (void) tabexpand(buf); |
| 732 | Gem_putstr(datawin, 0, buf); |
| 733 | } |
| 734 | (void) dlb_fclose(f); |
| 735 | Gem_display_nhwindow(datawin, FALSE); |
| 736 | Gem_destroy_nhwindow(datawin); |
| 737 | } |
| 738 | } |
| 739 | |
| 740 | /*ARGSUSED*/ |
| 741 | /* |
nothing calls this directly
no test coverage detected