mirror of
https://github.com/reactos/reactos.git
synced 2025-08-03 14:56:31 +00:00
Peter Oberndorfer <kumbayo84@arcor.de>
- Implement %p for scanf. svn path=/trunk/; revision=34293
This commit is contained in:
parent
b33ec42e10
commit
c2eaa10731
1 changed files with 3 additions and 1 deletions
|
@ -149,6 +149,8 @@ _FUNCTION_ {
|
||||||
}
|
}
|
||||||
/* read type */
|
/* read type */
|
||||||
switch(*format) {
|
switch(*format) {
|
||||||
|
case 'p':
|
||||||
|
case 'P': /* pointer. */
|
||||||
case 'x':
|
case 'x':
|
||||||
case 'X': /* hexadecimal integer. */
|
case 'X': /* hexadecimal integer. */
|
||||||
base = 16;
|
base = 16;
|
||||||
|
@ -179,7 +181,7 @@ _FUNCTION_ {
|
||||||
if (width>0) width--;
|
if (width>0) width--;
|
||||||
}
|
}
|
||||||
/* look for leading indication of base */
|
/* look for leading indication of base */
|
||||||
if (width!=0 && nch == '0') {
|
if (width!=0 && nch == '0' && *format != 'p' && *format != 'P') {
|
||||||
nch = _GETC_(file);
|
nch = _GETC_(file);
|
||||||
if (width>0) width--;
|
if (width>0) width--;
|
||||||
seendigit=1;
|
seendigit=1;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue