Would it be possible to add a file-existence-checker to groff that works in 
safe mode?

Right now, I use a macro

.de fileexists
.sy test -f \\$1
..

Example use:

.fileexists foo.tmp
.ie !\n[systat] .code_that_uses_foo.tmp
.el .unsafe_code

unsafe_code could set up the conditions for creating foo.tmp that could be used 
in a subsequent pass if not right away (as in the creation of index entries, 
etc).  

The problem with this is that .fileexists itself can only work in unsafe mode.  
Thus, a user who receives the document files with foo.tmp included would still 
have to call groff in unsafe mode, so the file-check would work, even though 
the latter is not a dangerous operation!






      
____________________________________________________________________________________
Be a better friend, newshound, and 
know-it-all with Yahoo! Mobile.  Try it now.  
http://mobile.yahoo.com/;_ylt=Ahu06i62sR8HDtDypao8Wcj9tAcJ 

Reply via email to