From b533b536900c63140ad1acc5288454783c574e63 Mon Sep 17 00:00:00 2001 From: ceriel Date: Thu, 22 Sep 1988 16:09:18 +0000 Subject: [PATCH] some improvements to manual page and interface --- modules/src/input/inp_pkg.body | 2 +- modules/src/input/input.3 | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/modules/src/input/inp_pkg.body b/modules/src/input/inp_pkg.body index ce2f5969c..257de494e 100644 --- a/modules/src/input/inp_pkg.body +++ b/modules/src/input/inp_pkg.body @@ -306,7 +306,7 @@ InsertFile(filnam, table, result) } #endif INP_READ_IN_ONE bh->bh_fd = fd; /* this is a file */ - *result = filnam; + if (result) *result = filnam; return 1; } return 0; diff --git a/modules/src/input/input.3 b/modules/src/input/input.3 index 8342beb75..8397edeba 100644 --- a/modules/src/input/input.3 +++ b/modules/src/input/input.3 @@ -106,15 +106,20 @@ The next input characters will be obtained from the specified file \fIfilename\fR. This file will be looked for in the directories, mentioned in the null-terminated list \fItable\fR. +When \fItable\fR is 0, only the current directory is searched. When it is not, +perhaps it is wise to include "." in the table ... +When \fIfilename\fR starts with a "/", \fItable\fR is not used. If \fIfilename\fR is a null pointer, standard input is used. In this case, the package may not have been instantiated with INP_READ_IN_ONE defined. \fIInsertFile\fR returns 1 if it succeeds, 0 if it fails. -When it succeeds, it stores the file name in the \fIresult\fR parameter. +When it succeeds, and \fIresult\fR is not 0, it stores the file name in the \fIresult\fR parameter. .PP The routine \fIInsertText\fR also suspends input from the current input stream. The next input characters will be obtained from the string \fItext\fR, which is \fIlength\fR characters long. \fIInsertText\fR returns 1 if it succeeds, 0 if it fails. +The \fItext\fR string is not copied, so it should not be changed until the +corresponding \fIAtEoIT\fR isd called. .PP The routine \fIAtEoIF\fR is called at the end of the input stream inserted by \fIInsertFile\fR.