fix for race condition with process creation and terminal process group; changes to printf builtin for multibyte characters

This commit is contained in:
Chet Ramey
2023-09-11 10:09:22 -04:00
parent aab2c1fb1d
commit 32826f717d
19 changed files with 9543 additions and 9559 deletions
+4 -8
View File
@@ -1,6 +1,6 @@
/* fmtulong.c -- Convert unsigned long int to string. */
/* Copyright (C) 1998-2011 Free Software Foundation, Inc.
/* Copyright (C) 1998-2011,2023 Free Software Foundation, Inc.
This file is part of GNU Bash, the Bourne Again SHell.
@@ -57,13 +57,9 @@ extern int errno;
#define x_digs "0123456789abcdef"
#define X_digs "0123456789ABCDEF"
/* XXX -- assumes uppercase letters, lowercase letters, and digits are
contiguous */
#define FMTCHAR(x) \
((x) < 10) ? (x) + '0' \
: (((x) < 36) ? (x) - 10 + 'a' \
: (((x) < 62) ? (x) - 36 + 'A' \
: (((x) == 62) ? '@' : '_')))
static char * const all_digs = "0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ@_";
#define FMTCHAR(x) all_digs[(x)]
#ifndef FL_PREFIX
# define FL_PREFIX 0x01 /* add 0x, 0X, or 0 prefix as appropriate */