Thread View: gnu.utils.bug
1 messages
1 total messages
Started by peter
Wed, 12 Aug 1992 20:53
Bug in shellutils-1.6/printf
Author: peter
Date: Wed, 12 Aug 1992 20:53
Date: Wed, 12 Aug 1992 20:53
52 lines
1698 bytes
1698 bytes
Here is the bug report:
bash$ printf \07
HOME=/users3/peterbash$ # beeps then prints first env variable in envp
bash$ printf \07cello # beeps then no output, treats c as \c
Thanks,
Pete.
Sorry if it's already been fixed, but here's my patch:
---------8<---------------------8<-----------------------
*** printf.c.orig Wed Aug 12 21:04:16 1992
--- printf.c Wed Aug 12 21:37:56 1992
***************
*** 197,202 ****
--- 197,203 ----
if (esc_length == 0)
error (1, 0, "missing hexadecimal number in escape");
putchar (esc_value);
+ --p;
}
else if (*p == '0')
{
***************
*** 205,214 ****
++esc_length, ++p)
esc_value = esc_value * 8 + octtobin (*p);
putchar (esc_value);
}
! else if (!index ("\"\\abcfnrtv", *p))
! error (1, 0, "\\%c: invalid escape", *p);
! print_esc_char (*p);
return p - escstart;
}
--- 206,219 ----
++esc_length, ++p)
esc_value = esc_value * 8 + octtobin (*p);
putchar (esc_value);
+ --p;
}
! else if (index ("\"\\abcfnrtv", *p))
! print_esc_char (*p);
! else
! error (1, 0, "\\%c: invalid escape", *p);
!
! /* return position of end of esc-sequence relative to start */
return p - escstart;
}
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads