Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 350109

Summary: config strings with embedded escapes result in uncompilable generated .c
Product: [Technology] RTSC Reporter: Dave Russo <d-russo>
Component: CoreAssignee: Dave Russo <d-russo>
Status: ASSIGNED --- QA Contact:
Severity: normal    
Priority: P3 CC: dfriedland
Version: unspecified   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:

Description Dave Russo CLA 2011-06-22 20:50:59 EDT
A config string with an embedded escape will cause the generated .c configuration file to be uncompilable.  Foe example, "hello world\n" will be translated into a string with \n replaced by a single new line.  When writing to the generated C file, this results in a an illegal C initialization.

We need to "undo" the translation performed by JavaScript and convert into the appropriate C digraphs (where possible).  

The workaround it to always escape the escape sequences interpreted by JavaSctip.  In the case above, "hello world\n" would be written as "hello world\\n".