On Thu, 2002-03-07 at 12:32, Petter Reinholdtsen wrote: > > [Philip Blundell] > > No, I thought the sense of the test was backwards, but maybe I was > > mistaken. What is LOAD_TRMFILE's return value? > > In the present code, 0 reports an error. Yes, it is strange, but I > did not write that code. :-)
Right, yeah, that's what I thought. So that code looks to me like it will print the error message if any catalog loading is successful, rather than if they all fail. Surely that's exactly the opposite of what's wanted? p. + /* Try to load english, and the backup catalogs as well*/ + if ( LOAD_TRMFILE("/etc/messages.en") != 0 || + LOAD_TRMFILE("/etc/messages.trm") != 0 || + LOAD_TRMFILE(TRMBACKUP) != 0 ) + { + char message[255]; + + snprintf (message, sizeof (message), + "An error occured while loading localized application messages from '%s'. English messages will be used instead.", + lang->msgcat); + message[254] = '\0'; /* Just in case */ + + problemBoxEn (message, "Problem"); + return 0; + } -- To UNSUBSCRIBE, email to [EMAIL PROTECTED] with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]