mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-09-11 13:01:28 +02:00
23086: printf should handle octal escapes in the \0NNN form
This commit is contained in:
parent
f7476178bc
commit
cfbcd2dbe0
3 changed files with 12 additions and 2 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
2007-01-04 Peter Stephenson <pws@csr.com>
|
||||||
|
|
||||||
|
* 20386: Src/zsh.h, Test/B03print.ztst: printf should handle
|
||||||
|
octal escapes in the '\0NNN' form.
|
||||||
|
|
||||||
2007-01-02 Clint Adams <clint@zsh.org>
|
2007-01-02 Clint Adams <clint@zsh.org>
|
||||||
|
|
||||||
* 22817: Frank Terbeck: Completion/Debian/Command/_aptitude:
|
* 22817: Frank Terbeck: Completion/Debian/Command/_aptitude:
|
||||||
|
|
|
@ -1955,7 +1955,8 @@ enum {
|
||||||
enum {
|
enum {
|
||||||
/*
|
/*
|
||||||
* Handle octal where the first digit is non-zero e.g. \3, \33, \333
|
* Handle octal where the first digit is non-zero e.g. \3, \33, \333
|
||||||
* \0333 etc. is always handled.
|
* Otherwise \0333 etc. is handled, i.e. one of \0123 or \123 will
|
||||||
|
* work, but not both.
|
||||||
*/
|
*/
|
||||||
GETKEY_OCTAL_ESC = (1 << 0),
|
GETKEY_OCTAL_ESC = (1 << 0),
|
||||||
/*
|
/*
|
||||||
|
@ -1990,7 +1991,7 @@ enum {
|
||||||
/* echo builtin */
|
/* echo builtin */
|
||||||
#define GETKEYS_ECHO (GETKEY_BACKSLASH_C)
|
#define GETKEYS_ECHO (GETKEY_BACKSLASH_C)
|
||||||
/* printf format string */
|
/* printf format string */
|
||||||
#define GETKEYS_PRINTF (GETKEY_OCTAL_ESC|GETKEY_BACKSLASH_C)
|
#define GETKEYS_PRINTF (GETKEY_BACKSLASH_C)
|
||||||
/* Full print without -e */
|
/* Full print without -e */
|
||||||
#define GETKEYS_PRINT (GETKEY_OCTAL_ESC|GETKEY_BACKSLASH_C|GETKEY_EMACS)
|
#define GETKEYS_PRINT (GETKEY_OCTAL_ESC|GETKEY_BACKSLASH_C|GETKEY_EMACS)
|
||||||
/* bindkey */
|
/* bindkey */
|
||||||
|
|
|
@ -259,3 +259,7 @@
|
||||||
printf $'%\0'
|
printf $'%\0'
|
||||||
1:explicit null after % in format specifier
|
1:explicit null after % in format specifier
|
||||||
?(eval):printf:1: %: invalid directive
|
?(eval):printf:1: %: invalid directive
|
||||||
|
|
||||||
|
printf '%b\n' '\0123'
|
||||||
|
0:printf handles \0... octal escapes in replacement text
|
||||||
|
>S
|
||||||
|
|
Loading…
Reference in a new issue