+2008-12-30 Raphael Neider <rneider AT web.de>
+
+ * as/link/hc08/lkelf.c, as/link/lkaomf51.c, as/link/lklibr.c,
+ as/link/z80/lkgb.c, debugger/mcs51/cmd.c, sim/ucsim/utils.cc,
+ src/SDCCasm.c, support/Util/dbuf_string.c, support/cpp/c-ppoutput.c,
+ support/cpp/libcpp/lex.c, support/cpp/libcpp/macro.c,
+ support/librarian/sdcclib.c, support/makebin/makebin.c:
+ partially revert changes from r5293..r5295
+
2008-12-29 Philipp Klaus Krause <pkk AT spth.de>
* src/z80/peeph-z80.def:
Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-------------------------------------------------------------------------*/
-#include <assert.h>
#include <ctype.h>
#include <stdio.h>
#include <string.h>
Elf32_Word size;
Elf32_Phdr * phdrp;
Elf32_Shdr * shdrp;
- size_t res;
if (!ap->a_image)
{
shdrp->sh_entsize = 0;
listAdd (sections, shdrp);
- res = fwrite (&ap->a_image[addr-ap->a_addr], 1, size, ofp);
- assert(res == size);
+ fwrite (&ap->a_image[addr-ap->a_addr], 1, size, ofp);
}
}
{
Elf32_Phdr * phdrp;
Elf32_Shdr * shdrp;
- size_t res;
if (!ap->a_image)
{
shdrp->sh_entsize = 0;
listAdd (sections, shdrp);
- res = fwrite (ap->a_image, 1, ap->a_size, ofp);
- assert(res == ap->a_size);
+ fwrite (ap->a_image, 1, ap->a_size, ofp);
}
/*--------------------------------------------------------------------------*/
Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
-------------------------------------------------------------------------*/
-#include <assert.h>
#include <ctype.h>
#include <stdio.h>
#include <string.h>
void OutputByte(unsigned char value)
{
- size_t res;
GlobalChkSum+=value;
- res = fwrite( &value, 1, 1, aomf51out );
- assert(res == 1);
+ fwrite( &value, 1, 1, aomf51out );
}
void OutputWord(int value)
CurrentModule=0; /*Set the active module as the first one*/
while(!feof(CDBin))
{
- char *res;
- res = fgets(buff, sizeof(buff)-1, CDBin);
- assert(res == buff);
+ fgets(buff, sizeof(buff)-1, CDBin);
if(!feof(CDBin)) switch(buff[0])
{
#define EQ(A,B) !strcmp((A),(B))
#define MAXLINE 254 /*when using fgets*/
-#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
{
char str[NINPUT+2];
int state=0;
- char *res;
while (fgets(str, NINPUT, libfp) != NULL)
{
case 0:
if(EQ(str, "<FILE>"))
{
- res = fgets(str, NINPUT, libfp);
- assert(res == str);
+ fgets(str, NINPUT, libfp);
str[NINPUT+1] = '\0';
chop_crlf(str);
if(EQ(str, ModName)) state=1;
while (fgets(str, MAXLINE, libfp) != NULL)
{
- if (NINPUT < MAXLINE)
- str[NINPUT+1] = '\0';
-
+ str[NINPUT+1] = '\0';
chop_crlf(str);
switch(state)
{
char FLine[MAXLINE+1];
int state=0;
long IndexOffset=0, FileOffset;
- char *res;
while(!feof(libfp))
{
FLine[0]=0;
- res = fgets(FLine, MAXLINE, libfp);
- assert(res == FLine);
+ fgets(FLine, MAXLINE, libfp);
chop_crlf(FLine);
switch(state)
{
/*The next line has the size of the index*/
FLine[0]=0;
- res = fgets(FLine, MAXLINE, libfp);
- assert(res == FLine);
+ fgets(FLine, MAXLINE, libfp);
chop_crlf(FLine);
IndexOffset=atol(FLine);
state=1;
/*The next line has the name of the module and the offset
of the corresponding embedded file in the library*/
FLine[0]=0;
- res = fgets(FLine, MAXLINE, libfp);
- assert(res == FLine);
+ fgets(FLine, MAXLINE, libfp);
chop_crlf(FLine);
sscanf(FLine, "%s %ld", ModName, &FileOffset);
state=2;
for(j=0; absPath1[j]!=0; j++) absPath1[j]=tolower((unsigned char)absPath1[j]);
for(j=0; absPath2[j]!=0; j++) absPath2[j]=tolower((unsigned char)absPath2[j]);
#else
- char *res;
- res = realpath(FirstFound->libspc, absPath1);
- assert(res == absPath1);
- res = realpath(ThisLibr->libspc, absPath2);
- assert(res == absPath2);
+ realpath(FirstFound->libspc, absPath1);
+ realpath(ThisLibr->libspc, absPath2);
#endif
if( !( EQ(absPath1, absPath2) && EQ(FirstFound->relfil, ThisLibr->relfil) ) )
{
int state=0;
long IndexOffset=0, FileOffset;
pmlibrarysymbol ThisSym = NULL;
- char *res;
while(!feof(libfp))
{
FLine[0]=0;
- res = fgets(FLine, MAXLINE, libfp);
- assert(res == FLine);
+ fgets(FLine, MAXLINE, libfp);
chop_crlf(FLine);
switch(state)
{
/*The next line has the size of the index*/
FLine[0]=0;
- res = fgets(FLine, MAXLINE, libfp);
- assert(res == FLine);
+ fgets(FLine, MAXLINE, libfp);
chop_crlf(FLine);
IndexOffset=atol(FLine);
state=1;
/*The next line has the name of the module and the offset
of the corresponding embedded file in the library*/
FLine[0]=0;
- res = fgets(FLine, MAXLINE, libfp);
- assert(res == FLine);
+ fgets(FLine, MAXLINE, libfp);
chop_crlf(FLine);
sscanf(FLine, "%s %ld", ModName, &FileOffset);
state=2;
#ifdef GAMEBOY
-#include <assert.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
cart[0x014E/SEGSIZE][0x014E%SEGSIZE] = (unsigned char)((chk>>8)&0xFF);
cart[0x014F/SEGSIZE][0x014F%SEGSIZE] = (unsigned char)(chk&0xFF);
- for(i = 0; i < NBSEG; i++) {
- size_t res;
- res = fwrite(cart[i], 1, SEGSIZE, ofp);
- assert(res == SEGSIZE);
- }
+ for(i = 0; i < NBSEG; i++)
+ fwrite(cart[i], 1, SEGSIZE, ofp);
}
}
what you give them. Help stamp out software-hoarding!
-------------------------------------------------------------------------*/
-#include <assert.h>
#include "sdcdb.h"
#include "symtab.h"
#include "simi.h"
if (!*s ) {
if (userBpPresent) {
char buffer[10];
- char *res;
-
fprintf (stdout,"Delete all breakpoints? (y or n) ");
fflush(stdout);
- res = fgets(buffer,sizeof(buffer),stdin);
- assert(res == &buffer[0]);
+ fgets(buffer,sizeof(buffer),stdin);
if (toupper(buffer[0]) == 'Y')
deleteUSERbp(-1);
}
resetHitCount();
simGo(0);
} else {
- char *res;
fprintf(stdout,
"The program being debugged has been started already.\n");
fprintf(stdout,"Start it from the beginning? (y or n) ");
fflush(stdout);
- res = fgets(buff,sizeof(buff),stdin);
- assert(res == &buff[0]);
+ fgets(buff,sizeof(buff),stdin);
if (toupper(buff[0]) == 'Y') {
simReset();
resetHitCount();
va_start(ap, format);
#ifdef HAVE_VASPRINTF
- int res;
char *msg= NULL;
- res = vasprintf(&msg, format, ap);
+ vasprintf(&msg, format, ap);
return(msg);
#elif defined HAVE_VSNPRINTF
- int res;
char *msg= (char*)malloc(80*25);
- res = vsnprintf(msg, 80*25, format, ap);
+ vsnprintf(msg, 80*25, format, ap);
return(msg);
#elif defined HAVE__VSNPRINTF
char *msg= (char*)malloc(80*25);
va_list ap;
struct dbuf_s dbuf;
size_t len;
- size_t res;
dbuf_init (&dbuf, INITIAL_INLINEASM);
va_end (ap);
len = dbuf_get_length (&dbuf);
- res = fwrite(dbuf_get_buf (&dbuf), 1, len, fp);
- assert(res == len);
+ fwrite(dbuf_get_buf (&dbuf), 1, len, fp);
dbuf_destroy (&dbuf);
}
void
dbuf_write (struct dbuf_s *dbuf, FILE *dest)
{
- size_t res;
- size_t len = dbuf_get_length (dbuf);
- res = fwrite (dbuf_get_buf (dbuf), 1, len, dest);
- assert(res == len);
+ fwrite (dbuf_get_buf (dbuf), 1, dbuf_get_length (dbuf), dest);
}
along with this program; if not, write to the Free Software
Foundation, 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. */
-#include <assert.h>
#include "config.h"
#include "system.h"
#include "cpplib.h"
{
while (_cpp_read_logical_line_trad (pfile))
{
- size_t res;
size_t len = pfile->out.cur - pfile->out.base;
maybe_print_line (pfile->out.first_line);
- res = fwrite (pfile->out.base, 1, len, print.outf);
- assert(res == len);
+ fwrite (pfile->out.base, 1, len, print.outf);
print.printed = 1;
if (!CPP_OPTION (pfile, discard_comments))
account_for_newlines (pfile->out.base, len);
void
cpp_output_token (const cpp_token *token, FILE *fp)
{
- size_t res;
-
switch (TOKEN_SPELL (token))
{
case SPELL_OPERATOR:
{
unsigned char buffer[10];
i += utf8_to_ucn (buffer, name + i) - 1;
- res = fwrite (buffer, 1, 10, fp);
- assert (10 == res);
+ fwrite (buffer, 1, 10, fp);
}
else
fputc (NODE_NAME (token->val.node)[i], fp);
break;
case SPELL_LITERAL:
- res = fwrite (token->val.str.text, 1, token->val.str.len, fp);
- assert (token->val.str.len == res);
+ fwrite (token->val.str.text, 1, token->val.str.len, fp);
break;
case SPELL_NONE:
function-like macros, but not at the end. */
if (following_paste_op)
{
- cpp_error (pfile, CPP_DL_ERROR, "%s", paste_op_error_msg);
+ cpp_error (pfile, CPP_DL_ERROR, paste_op_error_msg);
return false;
}
break;
function-like macros, but not at the beginning. */
if (macro->count == 1)
{
- cpp_error (pfile, CPP_DL_ERROR, "%s", paste_op_error_msg);
+ cpp_error (pfile, CPP_DL_ERROR, paste_op_error_msg);
return false;
}
#define EQ(A,B) !strcmp((A),(B))
#define NEQ(A,B) strcmp((A),(B))
-#if 1
-#include <assert.h>
-
-#define system(CMD) do { \
- int __res4568 = system(CMD); \
- assert(-1 != __res4568); \
-} while (0)
-#endif
-
int action=OPT_NONE;
FILE *lib, *newlib, *rel, *adb, *libindex;
char FLine[MAXLINE+1];
/** @name makebin - turn a .ihx file into a binary image.
*/
-#include <assert.h>
#include <stdio.h>
#include <unistd.h>
#include <stdlib.h>
{
int size = 32768, pack = 0, real_size = 0;
BYTE *rom;
- size_t res;
char line[256];
char *p;
real_size = addr;
}
- if (pack) {
- res = fwrite(rom, 1, real_size, stdout);
- assert(res == real_size);
- } else {
- res = fwrite(rom, 1, size, stdout);
- assert(res == size);
- }
+ if (pack)
+ fwrite(rom, 1, real_size, stdout);
+ else
+ fwrite(rom, 1, size, stdout);
return 0;
}