diff options
author | johnvg | 2015-07-09 10:53:56 +0000 |
---|---|---|
committer | johnvg | 2015-07-09 10:53:56 +0000 |
commit | 9250ffc7cb8c862e9acb58887d7801c21dbd05d7 (patch) | |
tree | 3b62ab290a1451d4b2bb9e421916e0bbc58fd5a8 | |
parent | atop compiling after a kind error, because this may cause a crash in the type... (diff) |
fix printing of symbols starting with a _ (characters after ; were printed twice)
git-svn-id: https://svn.cs.ru.nl/repos/clean-compiler/trunk@2568 1f8540f1-abd5-4d5b-9d24-4c5ce8603e2d
-rw-r--r-- | backendC/CleanCompilerSources/checksupport.c | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/backendC/CleanCompilerSources/checksupport.c b/backendC/CleanCompilerSources/checksupport.c index e8e776d..524764d 100644 --- a/backendC/CleanCompilerSources/checksupport.c +++ b/backendC/CleanCompilerSources/checksupport.c @@ -136,11 +136,11 @@ static int string_and_string_begin_equal (char *s1,char *s2_begin,char *s2_passe #ifdef CLEAN2 static char *print_compiler_generated_function_name (char *name, char *name_end, unsigned line_nr, File file) { - char *passed_digits; + char *parsed_digits; FPutS (name,file); - passed_digits=NULL; + parsed_digits=NULL; if (name_end[0]==';' && isdigit (name_end[1])){ char *s; @@ -148,23 +148,23 @@ static char *print_compiler_generated_function_name (char *name, char *name_end, while (isdigit (*s)) ++s; if (*s==';') - passed_digits=s; + parsed_digits=s; } if (line_nr>0){ FPrintF (file,"[line: %u]", line_nr); - if (passed_digits) - name_end=passed_digits; + if (parsed_digits) + name_end=parsed_digits; } else - if (passed_digits){ + if (parsed_digits){ char *d_p; FPutS ("[line:",file); - for (d_p=name_end+1; d_p<passed_digits; ++d_p) + for (d_p=name_end+1; d_p<parsed_digits; ++d_p) FPutC (*d_p,file); FPutC (']',file); - name_end=passed_digits; + name_end=parsed_digits; } FPutS (name_end,file); @@ -203,6 +203,8 @@ static char *PrintName (char *name, char *name_end, unsigned line_nr, File file) FPutS ("<array comprehension>", file); else { FPutS (name, file); + while (*name_end!='\0') + ++name_end; return name_end; } FPrintF (file, " [line: %u]", line_nr); |