This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB 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 RFC] Character set support


On Sep 19,  5:36pm, Kevin Buettner wrote:

> I ended up with a conflict when I updated c-lang.c.  I'm reposting
> that portion of the patch since it is somewhat different than what I
> originally posted.  The conflict was due to Tom Tromey's additon of
> the embedded \0 disambiguation code in c_emit_char().  I'd appreciate
> it if both Tom and Jim would look over this patch to see if it looks
> sensible.  I've run the testsuite and have done some testing by hand and
> the results look good to me...

BTW, the portion to look at is:

> +      if (quoter == '"' && strcmp (escape, "0") == 0)
> +	/* Print nulls embedded in double quoted strings as \000 to
> +	   prevent ambiguity.  */
> +	fprintf_filtered (stream, "\\000");
> +      else
> +	fprintf_filtered (stream, "\\%s", escape);

vs.

> -	case '\0':
> -	  if (quoter == '\'')
> -	    fputs_filtered ("\\0", stream);
> -	  else
> -	    fprintf_filtered (stream, "\\%.3o", (unsigned int) c);
> -	  break;

Kevin


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