]> git.eshelyaron.com Git - emacs.git/commitdiff
doprnt %X support
authorPaul Eggert <eggert@cs.ucla.edu>
Mon, 27 Jan 2025 21:01:47 +0000 (13:01 -0800)
committerEshel Yaron <me@eshelyaron.com>
Thu, 30 Jan 2025 18:08:46 +0000 (19:08 +0100)
* src/doprnt.c (doprnt): Also support %X, since callers
now use %X.

(cherry picked from commit 9b2e230c063f3e716c08a31685e16dff91130f4d)

src/doprnt.c

index 335223f972a0a9e33a012a35f86c95875888c523..421c4f4d15f095257206f4ae09b16796156a9137 100644 (file)
@@ -61,7 +61,8 @@ along with GNU Emacs.  If not, see <https://www.gnu.org/licenses/>.  */
    %d means print a 'signed int' argument in decimal.
    %o means print an 'unsigned int' argument in octal.
    %u means print an 'unsigned int' argument in decimal.
-   %x means print an 'unsigned int' argument in hex.
+   %x means print an 'unsigned int' argument in lower-case hex.
+   %X means print an 'unsigned int' argument in upper-case hex.
    %e means print a 'double' argument in exponential notation.
    %f means print a 'double' argument in decimal-point notation.
    %g means print a 'double' argument in exponential notation
@@ -350,7 +351,7 @@ doprnt (char *buffer, ptrdiff_t bufsize, const char *format,
 
            case 'o':
            case 'u':
-           case 'x':
+           case 'x': case 'X':
              switch (length_modifier)
                {
                case no_modifier: