Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ukma!husc6!encore!xylogics!loverso From: loverso@Xylogics.COM (John Robert LoVerso) Newsgroups: comp.mail.mush Subject: Re: Bug that bugs me Message-ID: <1811@xenna.Xylogics.COM> Date: 10 May 89 19:33:36 GMT References: <1709@vicom.COM> Reply-To: loverso@Xylogics.COM (John Robert LoVerso) Distribution: na Organization: Xylogics, Inc., Burlington MA Lines: 34 In article <1709@vicom.COM> lmb@vicom.COM (Larry Blair) writes: > There is a very minor bug in mush that has been there from at least 6.1. > When I do a "mush -C -u news" and there is no mail for news, I get the > message: > > /usr/spool/mail/news: No such file or directory The reason you can't find the "No such file..." message is because its the text of ENOENT, not a string in mush. This error message is generated when switching to the specified folder, in the folder() command called from Main(). folder() calls getpath() who returns the error string, and displays the message as follows: tmp = getpath(newfolder, &n); if (n == -1) { print("%s: %s\n", newfolder, tmp); return -1; } else if (n == 1) { print("%s: is a directory\n", tmp); return -1; } You'll notice the '\n' *is* included there. The reason it gets "lost" is that curses has already been initialized by this point, such that CRMOD has already been turned off. It might suffice to move the initialization of curses to after all the initial processing (including selecting the folder). However, some of that code looks fragile. Perhaps mush should have a routing for aborting that restores screen modes before printing the error message. -- John Robert LoVerso Xylogics, Inc. 617/272-8140 loverso@Xylogics.COM Annex Terminal Server Development Group encore!xylogics!loverso [formerly of Encore Computer Corp]