[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Still problems with boot-floppies



Fumitoshi UKAI wrote:
> At Sat, 6 Nov 1999 23:51:43 +0100,
> Martin Schulze <joey@finlandia.Infodrom.North.DE> wrote:
> 
> > At least one cause of problems is that some tools (like strlen() for
> > example) are failing on NULL pointers.  It's not that the NULL-string
> > gets to newt, the system crashes before that.
> > 
> > Thus, pointerize must NOT return any NULL pointer or we need to
> > check for NULL pointers on our own.  This would be silly as it 
> > would mean that we would have to include all strings in the source
> > again - one reason why pointerize was inveneted, I guess.
> 
> Hmm, I'm afraid that we must maintain translation database, in order to
> make sure that translation[] is not NULL and to keep out original strings 
> from source...
> 
> > Instead of
> > 
> >          msg = (translation[94]);
> > 
> > we would have to use
> > 
> >          msg = (translation[94])?translation[94]:"The original string";
> 
> 
> Well, how about this patch?
> 
> --- pointerize-0.3/src/pointerize.c.orig	Sat Jun 19 19:29:31 1999
> +++ pointerize-0.3/src/pointerize.c	Sun Nov  7 18:07:04 1999
> @@ -899,7 +899,9 @@
>         case token_type_string_literal:
>  	 if (state == 2)
>  	 {
> -	   printf ("("VARNAME"[%d]",getidx(token.string));
> +	   printf ("("VARNAME"[%d]?"VARNAME"[%d]:%s",
> +			getidx(token.string),
> +			getidx(token.string), token.buffer);
>  	   free (token.buffer);
>  	   free (token.string);
>  	 }
> 

You're my hero!  I was about to get this done during the next days.
This fixes the problem, although it's not the proper solution.

If Enrique is listening, please enter strings that weren't found
in the database to the database and reference to them as usual.

Regards,

	Joey

-- 
The good thing about standards is that there are so many to choose from.
	-- Andrew S. Tanenbaum

Please always Cc to me when replying to me on the lists.


Reply to: