| 39 | this.report("};"); |
| 40 | } |
| 41 | reportStrings(name, strings) { |
| 42 | let c = strings.length; |
| 43 | this.report(`#define mxStrings_${name} ${c}`); |
| 44 | this.report(`static const txString ICACHE_RODATA_ATTR gxStrings_${name}[mxStrings_${name}] = {`); |
| 45 | let buffer = "\t"; |
| 46 | for (let i = 0; i < c; i++) { |
| 47 | let string = '"'; |
| 48 | string += encodeURI(strings[i].bytes).replaceAll("%", "\\x"); |
| 49 | string += '",'; |
| 50 | if ((buffer.length + string.length) > 160) { |
| 51 | this.report(buffer); |
| 52 | buffer = "\t"; |
| 53 | } |
| 54 | buffer += string; |
| 55 | } |
| 56 | this.report(buffer); |
| 57 | this.report("};"); |
| 58 | } |
| 59 | buildRanges(singles) { |
| 60 | let ranges = []; |
| 61 | let length = singles.length; |