Move common strings (#20846)

This commit is contained in:
Scott Lahteine
2021-01-22 15:01:19 -06:00
committed by GitHub
parent 7b9f7d8aba
commit d33fe2378c
38 changed files with 54 additions and 83 deletions

View File

@ -57,6 +57,11 @@
#include "../core/debug_out.h"
#include "../libs/hex_print.h"
// extern
PGMSTR(M23_STR, "M23 %s");
PGMSTR(M24_STR, "M24");
// public:
card_flags_t CardReader::flag;
@ -481,7 +486,6 @@ void CardReader::release() {
*/
void CardReader::openAndPrintFile(const char *name) {
char cmd[4 + strlen(name) + 1 + 3 + 1]; // Room for "M23 ", filename, "\n", "M24", and null
extern const char M23_STR[];
sprintf_P(cmd, M23_STR, name);
for (char *c = &cmd[4]; *c; c++) *c = tolower(*c);
strcat_P(cmd, PSTR("\nM24"));

View File

@ -27,6 +27,8 @@
#if ENABLED(SDSUPPORT)
extern const char M23_STR[], M24_STR[];
#if BOTH(SDCARD_SORT_ALPHA, SDSORT_DYNAMIC_RAM)
#define SD_RESORT 1
#endif