Browse Source

Promote STRINGIFY to macros.h

Scott Lahteine 8 years ago
parent
commit
9418b4f2f3
2 changed files with 5 additions and 6 deletions
  1. 1
    6
      Marlin/language.h
  2. 4
    0
      Marlin/macros.h

+ 1
- 6
Marlin/language.h View File

@@ -3,8 +3,7 @@
3 3
 
4 4
 #include "Configuration.h"
5 5
 
6
-#define LANGUAGE_CONCAT(M)       #M
7
-#define GENERATE_LANGUAGE_INCLUDE(M)  LANGUAGE_CONCAT(language_##M.h)
6
+#define GENERATE_LANGUAGE_INCLUDE(M)  STRINGIFY_(language_##M.h)
8 7
 
9 8
 
10 9
 // NOTE: IF YOU CHANGE LANGUAGE FILES OR MERGE A FILE WITH CHANGES
@@ -88,10 +87,6 @@
88 87
 #endif
89 88
 
90 89
 
91
-#define STRINGIFY_(n) #n
92
-#define STRINGIFY(n) STRINGIFY_(n)
93
-
94
-
95 90
 // Common LCD messages
96 91
 
97 92
   /* nothing here yet */

+ 4
- 0
Marlin/macros.h View File

@@ -1,6 +1,10 @@
1 1
 #ifndef MACROS_H
2 2
 #define MACROS_H
3 3
 
4
+// Macros to make a string from a macro
5
+#define STRINGIFY_(n) #n
6
+#define STRINGIFY(n) STRINGIFY_(n)
7
+
4 8
 // Macros for bit masks
5 9
 #define TEST(n,b) (((n)&_BV(b))!=0)
6 10
 #define SBI(n,b) (n |= _BV(b))

Loading…
Cancel
Save