Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.1 6/24/83; site wjh12.UUCP Path: utzoo!linus!vaxine!wjh12!kendall From: kendall@wjh12.UUCP (Sam Kendall) Newsgroups: net.unix,net.sources Subject: Re: file include follower Message-ID: <477@wjh12.UUCP> Date: Wed, 30-May-84 10:40:06 EDT Article-I.D.: wjh12.477 Posted: Wed May 30 10:40:06 1984 Date-Received: Fri, 1-Jun-84 21:00:16 EDT References: <855@ulysses.UUCP> Organization: Delft Consulting Corp., New York Lines: 24 The posted "#include follower" has the following bugs: (1) The path specified in #include should be interpreted relative to the directory in which the file containing the #include resides. In the posted program, all paths are interpreted relative to the current directory. This makes a difference for commands like cc dir/file.c where file.c includes files in its own directory, and for nested #includes. (2) Include lines like #include "stdio.h" (with "" rather than <>) should scan /usr/include after the includer file's directory, but they do not (I think; I didn't test the program). (3) It does not handle -I options. (4) It should exit(0) but does not. (5) Error messages are posted to stdout rather than stderr. Since #includes inside #ifdefs may legitimately fail, the error message will mess up any automatic use of this program. A program to do all these things right is considerably longer. Probably one was posted in the past, but if not, I can dig mine up. Sam Kendall {allegra,ihnp4,ima,amd70}!wjh12!kendall Delft Consulting Corp. decvax!genrad!wjh12!kendall