* DevNotes: Add entry cgf-000009.
* smallprint.cc (__small_vsprintf): Always treat '%c' and '%C' as characters. Don't decode them if they are > 127. (__small_vswprintf): Ditto.
This commit is contained in:
parent
53b7c465ed
commit
fe66a97ae4
|
@ -1,3 +1,10 @@
|
||||||
|
2012-05-16 Christopher Faylor <me.cygwin2012@cgf.cx>
|
||||||
|
|
||||||
|
* DevNotes: Add entry cgf-000009.
|
||||||
|
* smallprint.cc (__small_vsprintf): Always treat '%c' and '%C' as
|
||||||
|
characters. Don't decode them if they are > 127.
|
||||||
|
(__small_vswprintf): Ditto.
|
||||||
|
|
||||||
2012-05-15 Christopher Faylor <me.cygwin2012@cgf.cx>
|
2012-05-15 Christopher Faylor <me.cygwin2012@cgf.cx>
|
||||||
|
|
||||||
* DevNotes: Add entry cgf-000008.
|
* DevNotes: Add entry cgf-000008.
|
||||||
|
|
|
@ -1,3 +1,21 @@
|
||||||
|
2012-05-16 cgf-000009
|
||||||
|
|
||||||
|
<1.7.16>
|
||||||
|
- Fix broken console mouse handling. Reported here:
|
||||||
|
http://cygwin.com/ml/cygwin/2012-05/msg00360.html
|
||||||
|
</1.7.16>
|
||||||
|
|
||||||
|
I did a cvs annotate on smallprint.cc and see that the code to translate
|
||||||
|
%characters > 127 to 0x notation was in the 1.1 revision. Then I
|
||||||
|
checked the smallprint.c predecessor. It was in the 1.1 version of that
|
||||||
|
program too, which means that this odd change has probably been around
|
||||||
|
since <= 2000.
|
||||||
|
|
||||||
|
Since __small_sprintf is supposed to emulate sprintf, I got rid of the
|
||||||
|
special case handling. This may affect fhandler_socket::bind. If so, we
|
||||||
|
should work around this problem there rather than keeping this strange
|
||||||
|
hack in __small_printf.
|
||||||
|
|
||||||
2012-05-14 cgf-000008
|
2012-05-14 cgf-000008
|
||||||
|
|
||||||
<1.7.16>
|
<1.7.16>
|
||||||
|
|
|
@ -146,17 +146,7 @@ __small_vsprintf (char *dst, const char *fmt, va_list ap)
|
||||||
l_opt = true;
|
l_opt = true;
|
||||||
continue;
|
continue;
|
||||||
case 'c':
|
case 'c':
|
||||||
{
|
*dst++ = (char) (va_arg (ap, int) & 0xff);
|
||||||
int c = va_arg (ap, int);
|
|
||||||
if (c > ' ' && c <= 127)
|
|
||||||
*dst++ = c;
|
|
||||||
else
|
|
||||||
{
|
|
||||||
*dst++ = '0';
|
|
||||||
*dst++ = 'x';
|
|
||||||
dst = __rn (dst, 16, 0, c, len, pad, LMASK);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
case 'C':
|
case 'C':
|
||||||
{
|
{
|
||||||
|
@ -164,14 +154,7 @@ __small_vsprintf (char *dst, const char *fmt, va_list ap)
|
||||||
char buf[4], *c;
|
char buf[4], *c;
|
||||||
sys_wcstombs (buf, 4, &wc, 1);
|
sys_wcstombs (buf, 4, &wc, 1);
|
||||||
for (c = buf; *c; ++c)
|
for (c = buf; *c; ++c)
|
||||||
if (isprint (*c))
|
*dst++ = *c;
|
||||||
*dst++ = *c;
|
|
||||||
else
|
|
||||||
{
|
|
||||||
*dst++ = '0';
|
|
||||||
*dst++ = 'x';
|
|
||||||
dst = __rn (dst, 16, 0, *c, len, pad, LMASK);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
case 'E':
|
case 'E':
|
||||||
strcpy (dst, "Win32 error ");
|
strcpy (dst, "Win32 error ");
|
||||||
|
@ -445,17 +428,7 @@ __small_vswprintf (PWCHAR dst, const WCHAR *fmt, va_list ap)
|
||||||
continue;
|
continue;
|
||||||
case L'c':
|
case L'c':
|
||||||
case L'C':
|
case L'C':
|
||||||
{
|
*dst++ = va_arg (ap, unsigned);
|
||||||
unsigned int c = va_arg (ap, unsigned int);
|
|
||||||
if (c > L' ' && c <= 127)
|
|
||||||
*dst++ = c;
|
|
||||||
else
|
|
||||||
{
|
|
||||||
*dst++ = L'0';
|
|
||||||
*dst++ = L'x';
|
|
||||||
dst = __wrn (dst, 16, 0, c, len, pad, LMASK);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
break;
|
break;
|
||||||
case L'E':
|
case L'E':
|
||||||
wcscpy (dst, L"Win32 error ");
|
wcscpy (dst, L"Win32 error ");
|
||||||
|
|
Loading…
Reference in New Issue