groff
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Groff] conditional for file existence?


From: Dorai Sitaram
Subject: Re: [Groff] conditional for file existence?
Date: Tue, 15 Jul 2003 16:58:34 -0400 (EDT)

Werner wrote
> [Dorai wrote]
> 
> > Is there a way to check if a filename names an existent file?
> 
> No.  You are the first one who asks this question here.
> 
> Perhaps we should do the same route as TeX, namely adding .openr,
> .read, and a new operator to .if:
> 
>   .openr <stream> <file>
>   .read <stream> <string variable>
>   .if f <stream>
> 
> `openr' opens a file for reading.  It does *not* produce an error.
> [Use the `close' request to undefine the stream handle.]


My primary motivation was to have the document have
calls to .so that loaded files containing
cross-reference information (much like the TeX way),
except that these files would not exist the first
time groff is run on the document.

But it turns out that .so'ing a non-existent file
does not abort groff -- it just issues an error message
and continues.  So the current situation is ok by me.

--d

reply via email to

[Prev in Thread] Current Thread [Next in Thread]