From 796defa86c3e8a756b66937f5c010640eeac2d13 Mon Sep 17 00:00:00 2001 From: tmk Date: Mon, 20 May 2013 22:42:29 +0900 Subject: Fix deprecated 'prog_*' typedef - Issue #34 - Remove prog_char from xpritnf - Remove prog_macro_t from acton_macro avr-libc-1.8 removed 'prog_*' typedef because the usage of the __progmem__ attribute on a type is not supported in GCC. http://www.nongnu.org/avr-libc/changes-1.8.html --- common/action_macro.h | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'common/action_macro.h') diff --git a/common/action_macro.h b/common/action_macro.h index ee5c7c426..eea8ef57d 100644 --- a/common/action_macro.h +++ b/common/action_macro.h @@ -21,15 +21,14 @@ along with this program. If not, see . #define MACRO_NONE 0 -#define MACRO(...) ({ static prog_macro_t _m[] PROGMEM = { __VA_ARGS__ }; _m; }) +#define MACRO(...) ({ static const macro_t __m[] PROGMEM = { __VA_ARGS__ }; &__m[0]; }) typedef uint8_t macro_t; -typedef macro_t prog_macro_t PROGMEM; #ifndef NO_ACTION_MACRO -void action_macro_play(const prog_macro_t *macro); +void action_macro_play(const macro_t *macro_p); #else #define action_macro_play(macro) #endif -- cgit v1.2.3