This is the mail archive of the cygwin-apps@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Re: [setup] Inaccurate message: See /setup.log.full


On Sat, 1 Feb 2003, Max Bowsher wrote:

> Igor Pechtchanski wrote:
> > On Sat, 1 Feb 2003, Max Bowsher wrote:
> >> What advantage do resources give us over string literals, for
> >> messages that are only used once in setup?
> >
> > Resources have the advantage that whole resource tables can be
> > substituted at once.  If we ever want to internationalize setup, for
> > example, all
> > that'd be needed is translating the resource file.  Having hard-coded
> > string constants sprinkled all over the code makes translation
> > impossible. Not that anyone has any plans to translate setup any time
> > soon...  Again,
> > I guess it's a question of programming style.
>
> Fair enough. The thing I *really* hate, is that any change to resource.h,
> and you end up recompiling *everything*.
>
> Anyway...
>
> I just tried it out, and was told "Check (null) for details".
> I don't think you want to call cygpath at all. LogFile::getFile already
> returns a Windows path.
> (With rather ugly looking mixed slashes. backslash()-ing the path might be
> nice.
>
> One other point - it might be more informative for the fallback text to be
> "setup.log.full" rather than "log file".
>
> Max.

Yes, it does recompile everything when resource.h is modified, but that
only happens once.  A necessary evil...

Sorry about the (null) bit.  Should be fixed now.  I also took your
suggestion regarding "log file".  The third iteration of the patch is
attached...

Incidentally, there are two backslash() functions defined: one in
filemanip.h, and another in concat.h.  This is the only function defined
in concat.h, and it doesn't seem to be used anywhere anymore.  Is concat.h
dead?  Should it be removed?  Ditto for concat.cc?
	Igor
========================================================================
ChangeLog:
2002-10-17  Igor Pechtchanski <pechtcha@cs.nyu.edu>

	* res.rc (IDS_INSTALL_INCOMPLETE): Change hard-coded
	log filename to %s.
	(IDS_MISSING_LOG): New string resource.
	* resource.h (IDS_MISSING_LOG): New resource.
	* LogFile.cc (LogFile::exit): Pass log filename for
	LOG_BABBLE to note().
	(LogFile::getFile): New function.
	* LogFile.h (LogFile::getFile): New function.

-- 
				http://cs.nyu.edu/~pechtcha/
      |\      _,,,---,,_		pechtcha@cs.nyu.edu
ZZZzz /,`.-'`'    -.  ;-;;,_		igor@watson.ibm.com
     |,4-  ) )-,_. ,\ (  `'-'		Igor Pechtchanski
    '---''(_/--'  `-'\_) fL	a.k.a JaguaR-R-R-r-r-r-.-.-.  Meow!

Oh, boy, virtual memory! Now I'm gonna make myself a really *big* RAMdisk!
  -- /usr/games/fortune

Attachment: setup-incomplete-message.patch
Description: Text document


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]