[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[avr-libc-commit] [2302] As Dmitry added scanf() support for the 'hh' co
From: |
Joerg Wunsch |
Subject: |
[avr-libc-commit] [2302] As Dmitry added scanf() support for the 'hh' conversion modifier |
Date: |
Mon, 26 Nov 2012 10:52:02 +0000 |
Revision: 2302
http://svn.sv.gnu.org/viewvc/?view=rev&root=avr-libc&revision=2302
Author: joerg_wunsch
Date: 2012-11-26 10:52:01 +0000 (Mon, 26 Nov 2012)
Log Message:
-----------
As Dmitry added scanf() support for the 'hh' conversion modifier
almost 5 years ago, also add support for scanf() conversion macros for
8-bit data types to <inttypes.h>: SCNd8, SCNdLEAST8, SCNdFAST8, SCNi8,
SCNiLEAST8, SCNiFAST8, SCNo8, SCNoLEAST8, SCNoFAST8, SCNu8,
SCNuLEAST8, SCNuFAST8, SCNx8, SCNxLEAST8, SCNxFAST8
Modified Paths:
--------------
trunk/avr-libc/ChangeLog
trunk/avr-libc/NEWS
trunk/avr-libc/include/inttypes.h
Modified: trunk/avr-libc/ChangeLog
===================================================================
--- trunk/avr-libc/ChangeLog 2012-11-16 21:06:44 UTC (rev 2301)
+++ trunk/avr-libc/ChangeLog 2012-11-26 10:52:01 UTC (rev 2302)
@@ -1,3 +1,11 @@
+2012-11-26 Joerg Wunsch <address@hidden>
+
+ Standard scanf() conversion macros for 8-bit data types:
+ * include/inttypes.h (SCNd8, SCNdLEAST8, SCNdFAST8, SCNi8,
+ SCNiLEAST8, SCNiFAST8, SCNo8, SCNoLEAST8, SCNoFAST8, SCNu8,
+ SCNuLEAST8, SCNuFAST8, SCNx8, SCNxLEAST8, SCNxFAST8): New
+ macros.
+
2012-11-16 Eric B. Weddington <address@hidden>
Fix for bug #35539. Thanks to Georg-Johann Lay for fix.
Modified: trunk/avr-libc/NEWS
===================================================================
--- trunk/avr-libc/NEWS 2012-11-16 21:06:44 UTC (rev 2301)
+++ trunk/avr-libc/NEWS 2012-11-26 10:52:01 UTC (rev 2302)
@@ -22,6 +22,10 @@
- New macro _PROTECTED_WRITE(): write to Xmega IO registers that are
protected through the CCP mechanism
+ - Add support for scanf() conversion macros for 8-bit data types to
+ <inttypes.h>: SCNd8, SCNdLEAST8, SCNdFAST8, SCNi8, SCNiLEAST8,
+ SCNiFAST8, SCNo8, SCNoLEAST8, SCNoFAST8, SCNu8, SCNuLEAST8,
+ SCNuFAST8, SCNx8, SCNxLEAST8, SCNxFAST8
*** Changes in avr-libc-1.8.0:
Modified: trunk/avr-libc/include/inttypes.h
===================================================================
--- trunk/avr-libc/include/inttypes.h 2012-11-16 21:06:44 UTC (rev 2301)
+++ trunk/avr-libc/include/inttypes.h 2012-11-26 10:52:01 UTC (rev 2302)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2004,2005,2007 Joerg Wunsch
+/* Copyright (c) 2004,2005,2007,2012 Joerg Wunsch
Copyright (c) 2005, Carlos Lamas
All rights reserved.
@@ -339,19 +339,27 @@
#define PRIXPTR PRIX16
-#ifdef __avr_libc_does_not_implement_hh_in_scanf
-
+/** \ingroup avr_inttypes
+ decimal scanf format for int8_t */
#define SCNd8 "hhd"
+/** \ingroup avr_inttypes
+ decimal scanf format for int_least8_t */
#define SCNdLEAST8 "hhd"
+/** \ingroup avr_inttypes
+ decimal scanf format for int_fast8_t */
#define SCNdFAST8 "hhd"
+/** \ingroup avr_inttypes
+ generic-integer scanf format for int8_t */
#define SCNi8 "hhi"
+/** \ingroup avr_inttypes
+ generic-integer scanf format for int_least8_t */
#define SCNiLEAST8 "hhi"
+/** \ingroup avr_inttypes
+ generic-integer scanf format for int_fast8_t */
#define SCNiFAST8 "hhi"
-#endif
-
/** \ingroup avr_inttypes
decimal scanf format for int16_t */
#define SCNd16 "d"
@@ -416,22 +424,36 @@
generic-integer scanf format for intptr_t */
#define SCNiPTR SCNi16
-#ifdef __avr_libc_does_not_implement_hh_in_scanf
-
+/** \ingroup avr_inttypes
+ octal scanf format for uint8_t */
#define SCNo8 "hho"
+/** \ingroup avr_inttypes
+ octal scanf format for uint_least8_t */
#define SCNoLEAST8 "hho"
+/** \ingroup avr_inttypes
+ octal scanf format for uint_fast8_t */
#define SCNoFAST8 "hho"
+/** \ingroup avr_inttypes
+ decimal scanf format for uint8_t */
#define SCNu8 "hhu"
+/** \ingroup avr_inttypes
+ decimal scanf format for uint_least8_t */
#define SCNuLEAST8 "hhu"
+/** \ingroup avr_inttypes
+ decimal scanf format for uint_fast8_t */
#define SCNuFAST8 "hhu"
+/** \ingroup avr_inttypes
+ hexadecimal scanf format for uint8_t */
#define SCNx8 "hhx"
+/** \ingroup avr_inttypes
+ hexadecimal scanf format for uint_least8_t */
#define SCNxLEAST8 "hhx"
+/** \ingroup avr_inttypes
+ hexadecimal scanf format for uint_fast8_t */
#define SCNxFAST8 "hhx"
-#endif
-
/** \ingroup avr_inttypes
octal scanf format for uint16_t */
#define SCNo16 "o"
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [avr-libc-commit] [2302] As Dmitry added scanf() support for the 'hh' conversion modifier,
Joerg Wunsch <=