Mercurial > hg > CbC > old > device
changeset 636:72c4a8137fff intel-mac
String concatenation fix
author | kono |
---|---|
date | Wed, 11 Oct 2006 18:38:15 +0900 |
parents | e4fffa4bf9cf |
children | 140b65f8ff03 |
files | mc-code-powerpc.c mc-parse.c |
diffstat | 2 files changed, 14 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/mc-code-powerpc.c Wed Oct 11 17:09:48 2006 +0900 +++ b/mc-code-powerpc.c Wed Oct 11 18:38:15 2006 +0900 @@ -46,7 +46,11 @@ #define __FLT_MIN__ 1.17549435e-38F\n\ #define __DBL_MIN__ 2.2250738585072014e-308\n\ #define __LDBL_MIN__ 2.00416836000897277799610805135016e-292L\n\ -"; +" +#ifdef __APPLE__ +"#define __APPLE__ 1\n" +#endif +; #define TEXT_EMIT_MODE 0 #define DATA_EMIT_MODE 1
--- a/mc-parse.c Wed Oct 11 17:09:48 2006 +0900 +++ b/mc-parse.c Wed Oct 11 18:38:15 2006 +0900 @@ -4368,6 +4368,7 @@ { char *name = cheap->ptr; int i= 0; + int c; unsigned int hash = 0; struct cheap scheap; @@ -4378,13 +4379,19 @@ getch(); while (ch != '"') { if (i>STRSIZE) error(STRERR); - hash_value(hash, *cheap->ptr = escape()); + if ((c = escape())==0 && ch=='"') { + in_quote = 0; + getch(); + goto possible_string_concatenate; + } + hash_value(hash, *cheap->ptr = c); cheap = increment_cheap(cheap,&name); i++; } in_quote = 0; getch(); } +possible_string_concatenate: skipspc(); } while (ch=='"'); *cheap->ptr = 0; @@ -4392,6 +4399,7 @@ i++; nptr = name_space_search(hash_search(name,&scheap,i,hash,DEF),STRING); // if we already have this, hash_search will reset cheap + // should do the same thing for float/double constant nptr->dsp = i; symval = i; }