I'm not sure how the other platforms handle this, but in CW 7.2 the following code still uses 24 bytes of ram, as verified by the xMAP file.
const CHAR *cMimeTable[] = { // keep the ordering in the table to match the MIME type defines below!!
(const CHAR *)"HTM", // HTML file - will be interpreted by web server
(const CHAR *)"JPG", // JPG image
(const CHAR *)"GIF", // GIF image
(const CHAR *)"CSS", // CSS Cascading Style Sheets
(const CHAR *)"JS", // Java script
(const CHAR *)"BIN", // binary data file
(const CHAR *)"TXT", // text data file
(const CHAR *)"ICO", // icon
(const CHAR *)"???", // all other types will be displayed as unknown
};
Adding const after the *, not only forces the pointers into flash, but also the values being pointed to:
const CHAR * const cMimeTable[] = { // keep the ordering in the table to match the MIME type defines below!!
(const CHAR *)"HTM", // HTML file - will be interpreted by web server
(const CHAR *)"JPG", // JPG image
(const CHAR *)"GIF", // GIF image
(const CHAR *)"CSS", // CSS Cascading Style Sheets
(const CHAR *)"JS", // Java script
(const CHAR *)"BIN", // binary data file
(const CHAR *)"TXT", // text data file
(const CHAR *)"ICO", // icon
(const CHAR *)"???", // all other types will be displayed as unknown
};
Be sure to update the externs for this also.
Aaron