From 4164d778d189709b702d0ce2f85045c674fecf31 Mon Sep 17 00:00:00 2001 From: johanknol Date: Mon, 21 May 2001 09:40:05 +0000 Subject: [PATCH] fixed a small bug with large effects git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@842 4a8a32a2-be11-0410-ad9d-d568d2c75423 --- src/avr/gen.c | 2 +- src/ds390/gen.c | 2 +- src/mcs51/gen.c | 8 ++++++-- src/pic/gen.c | 2 +- src/z80/gen.c | 2 +- 5 files changed, 10 insertions(+), 6 deletions(-) diff --git a/src/avr/gen.c b/src/avr/gen.c index b16ce954..0a9bd9a3 100644 --- a/src/avr/gen.c +++ b/src/avr/gen.c @@ -2890,7 +2890,7 @@ genInline (iCode * ic) _G.inLine += (!options.asmpeep); - buffer = bp = bp1 = Safe_calloc(1, strlen(IC_INLINE(ic)+1)); + buffer = bp = bp1 = Safe_calloc(1, strlen(IC_INLINE(ic))+1); strcpy (buffer, IC_INLINE (ic)); /* emit each line as a code */ diff --git a/src/ds390/gen.c b/src/ds390/gen.c index 0f1df711..cc326219 100644 --- a/src/ds390/gen.c +++ b/src/ds390/gen.c @@ -5784,7 +5784,7 @@ genInline (iCode * ic) _G.inLine += (!options.asmpeep); - buffer = bp = bp1 = Safe_calloc(1, strlen(IC_INLINE(ic)+1)); + buffer = bp = bp1 = Safe_calloc(1, strlen(IC_INLINE(ic))+1); strcpy (buffer, IC_INLINE (ic)); /* emit each line as a code */ diff --git a/src/mcs51/gen.c b/src/mcs51/gen.c index 8fe501ba..6ad7a2a2 100644 --- a/src/mcs51/gen.c +++ b/src/mcs51/gen.c @@ -1,3 +1,4 @@ +void CatchMe() {} /*------------------------------------------------------------------------- SDCCgen51.c - source file for code generation for 8051 @@ -1618,7 +1619,7 @@ genIpush (iCode * ic) int size, offset = 0; char *l; - + CatchMe(); /* if this is not a parm push : ie. it is spill push and spill push is always done on the local stack */ if (!ic->parmPush) @@ -4991,6 +4992,7 @@ release: /*-----------------------------------------------------------------*/ /* genInline - write the inline code out */ /*-----------------------------------------------------------------*/ +char *johan; static void genInline (iCode * ic) { @@ -4998,7 +5000,7 @@ genInline (iCode * ic) _G.inLine += (!options.asmpeep); - buffer = bp = bp1 = Safe_calloc(1, strlen(IC_INLINE(ic)+1)); + buffer = bp = bp1 = Safe_calloc(1, strlen(IC_INLINE(ic))+1); strcpy (buffer, IC_INLINE (ic)); /* emit each line as a code */ @@ -5007,6 +5009,7 @@ genInline (iCode * ic) if (*bp == '\n') { *bp++ = '\0'; + johan=bp; emitcode (bp1, ""); bp1 = bp; } @@ -5017,6 +5020,7 @@ genInline (iCode * ic) bp++; *bp = '\0'; bp++; + johan=bp; emitcode (bp1, ""); bp1 = bp; } diff --git a/src/pic/gen.c b/src/pic/gen.c index 20f57a1b..52826154 100644 --- a/src/pic/gen.c +++ b/src/pic/gen.c @@ -4950,7 +4950,7 @@ static void genInline (iCode *ic) _G.inLine += (!options.asmpeep); - buffer = bp = bp1 = Safe_calloc(1, strlen(IC_INLINE(ic)+1)); + buffer = bp = bp1 = Safe_calloc(1, strlen(IC_INLINE(ic))+1); strcpy(buffer,IC_INLINE(ic)); /* emit each line as a code */ diff --git a/src/z80/gen.c b/src/z80/gen.c index 3e6d40a4..db850172 100644 --- a/src/z80/gen.c +++ b/src/z80/gen.c @@ -4086,7 +4086,7 @@ genInline (iCode * ic) inLine += (!options.asmpeep); - buffer = bp = bp1 = Safe_calloc(1, strlen(IC_INLINE(ic)+1)); + buffer = bp = bp1 = Safe_calloc(1, strlen(IC_INLINE(ic))+1); strcpy (buffer, IC_INLINE (ic)); /* emit each line as a code */ -- 2.30.2