Path: utzoo!attcan!uunet!lll-winken!ames!ucsd!rutgers!gatech!uflorida!novavax!twwells!bill From: bill@twwells.uucp (T. William Wells) Newsgroups: comp.sources.d Subject: Re: Comments on INSERT.c Message-ID: <327@twwells.uucp> Date: 12 Jan 89 07:39:38 GMT References: <308@twwells.uucp> <313@twwells.uucp> <2692@ficc.uu.net> Reply-To: bill@twwells.UUCP (T. William Wells) Organization: None, Ft. Lauderdale Lines: 27 Summary: Expires: Sender: Followup-To: Distribution: Keywords: In article <2692@ficc.uu.net> peter@ficc.uu.net (Peter da Silva) writes: : In article <313@twwells.uucp>, bill@twwells.uucp (T. William Wells) writes: : > perror("Error 1 : ((fdin = open(argv[1],O_RDONLY)) == -1):"); : : > into (after setting up ProgramName) : : > fprintf(stderr, "%s: error while opening %s for read: ", : > ProgramName, argv[1]); : > perror(""); : : On many, if not all, systems this will eventually produce the error message: : : insert: error while opening foobar.c for read: : Not a typewriter : : Or: : : insert: error ...: : Inappropriate ioctl for device. Damn! You are right. Me, I normally grab the error message from the tables and format it into my own messages, so, when offering this suggestion, it slipped by me that fprintf may futz with errno. Sorry. --- Bill { uunet!proxftl | novavax } !twwells!bill