diff options
Diffstat (limited to 'mbbsd/stuff.c')
-rw-r--r-- | mbbsd/stuff.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/mbbsd/stuff.c b/mbbsd/stuff.c index fdc5cdc2..1381d61f 100644 --- a/mbbsd/stuff.c +++ b/mbbsd/stuff.c @@ -489,6 +489,23 @@ vmsg(const char *fmt,...) return vmsg_lines(b_lines, msg); } +int +show_file(char *filename, int y, int lines, int mode) +{ + FILE *fp; + char buf[256]; + + if (y >= 0) + move(y, 0); + clrtoline(lines + y); + if ((fp = fopen(filename, "r"))) { + while (fgets(buf, sizeof(buf), fp) && lines--) + outs(Ptt_prints(buf, mode)); + fclose(fp); + } else + return 0; + return 1; +} void bell() |