Hush up warnings by defining away functions/macros. This should be fixed if

actual functionality is wanted (by including the proper headers and making
sure rockbox provides these functions). pow(), floor(), log() and exp() just
feel veeeery floatish...


git-svn-id: svn://svn.rockbox.org/rockbox/trunk@6417 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Daniel Stenberg 2005-05-07 22:10:35 +00:00
parent 2505e7bf04
commit 4cc0b97609
5 changed files with 52 additions and 20 deletions

View file

@ -83,6 +83,9 @@
#define ABS(x) (((x) >= 0) ? (x) : (-(x)))
#if 0 /* This code serves no useful purpose for Rockbox. Possibly the trace
thing could be defined for simulator... */
#ifdef DEBUGMODE
#ifndef ASSERT
@ -105,6 +108,17 @@
#endif
#else /* 0 */
/* disable TRACE() and ASSERT() calls */
#define TRACE(...)
#define ASSERT(...)
/* now fake float function to hush the compiler */
#define pow(x,y) ((x)+(y))
#define floor(x) x
#define log(x) (x)
#define exp(x) (x)
#endif /* 0 */
#define DUMB_ID(a,b,c,d) (((unsigned int)(a) << 24) | \
((unsigned int)(b) << 16) | \

View file

@ -15,20 +15,26 @@ $(ALLEGRO_LIB_FILE): CFLAGS := $(CFLAGS)
$(OBJDIR)/%.o: src/core/%.c include/dumb.h include/internal/dumb.h
$(CC) -c -o $@ $< $(CFLAGS)
@echo "(dumb) CC $<"
@$(CC) -c -o $@ $< $(CFLAGS)
$(OBJDIR)/%.o: src/helpers/%.c include/dumb.h
$(CC) -c -o $@ $< $(CFLAGS)
@echo "(dumb) CC $<"
@$(CC) -c -o $@ $< $(CFLAGS)
$(OBJDIR)/%.o: src/it/%.c include/dumb.h include/internal/it.h
$(CC) -c -o $@ $< $(CFLAGS)
@echo "(dumb) CC $<"
@$(CC) -c -o $@ $< $(CFLAGS)
$(OBJDIR)/%.o: src/allegro/%.c include/aldumb.h include/dumb.h \
include/internal/aldumb.h include/internal/dumb.h
$(CC) -c -o $@ $< $(CFLAGS) $(WFLAGS_ALLEGRO)
@echo "(dumb) CC $<"
@$(CC) -c -o $@ $< $(CFLAGS) $(WFLAGS_ALLEGRO)
$(CORE_LIB_FILE): $(CORE_OBJECTS)
$(AR) rs $@ $^
@echo "(dumb) AR $<"
@$(AR) rs $@ $^
$(ALLEGRO_LIB_FILE): $(ALLEGRO_OBJECTS)
$(AR) rs $@ $^
@echo "(dumb) AR $<"
@$(AR) rs $@ $^

View file

@ -141,16 +141,18 @@ void duh_sigrenderer_set_sigparam(
if (!sigrenderer) return;
proc = sigrenderer->desc->sigrenderer_set_sigparam;
if (proc)
(*proc)(sigrenderer->sigrenderer, id, value);
else
TRACE("Parameter #%d = %ld for signal %c%c%c%c, which does not take parameters.\n",
(int)id,
value,
(int)(sigrenderer->desc->type >> 24),
(int)(sigrenderer->desc->type >> 16),
(int)(sigrenderer->desc->type >> 8),
(int)(sigrenderer->desc->type));
if (proc) {
(*proc)(sigrenderer->sigrenderer, id, value);
return;
}
TRACE("Parameter #%d = %ld for signal %c%c%c%c, which does not take parameters.\n",
(int)id,
value,
(int)(sigrenderer->desc->type >> 24),
(int)(sigrenderer->desc->type >> 16),
(int)(sigrenderer->desc->type >> 8),
(int)(sigrenderer->desc->type));
}

View file

@ -555,8 +555,8 @@ static long it_read_sample_data(int cmwt, IT_SAMPLE *sample, unsigned char conve
/** WARNING - unresolved business here... test with ModPlug? */
if (sample->flags & IT_SAMPLE_STEREO)
exit(37);
return -1;
/*
//#ifndef STEREO_SAMPLES_COUNT_AS_TWO
ASSERT(!(sample->flags & IT_SAMPLE_STEREO));

View file

@ -78,12 +78,16 @@ static const char xm_has_memory[] = {
/* Effects marked with 'special' are handled specifically in itrender.c */
void _dumb_it_xm_convert_effect(int effect, int value, IT_ENTRY *entry)
{
#ifdef SIMULATOR
const int log = 0;
#endif
if ((!effect && !value) || (effect >= XM_N_EFFECTS))
return;
#ifdef SIMULATOR
if (log) printf("%c%02X", (effect<10)?('0'+effect):('A'+effect-10), value);
#endif
/* Linearisation of the effect number... */
if (effect == XM_E) {
@ -94,7 +98,9 @@ if (log) printf("%c%02X", (effect<10)?('0'+effect):('A'+effect-10), value);
value = LOW(value);
}
#ifdef SIMULATOR
if (log) printf(" - %2d %02X", effect, value);
#endif
#if 0 // This should be handled in itrender.c!
/* update effect memory */
@ -227,16 +233,20 @@ if (log) printf(" - %2d %02X", effect, value);
entry->mask &= ~IT_ENTRY_EFFECT;
}
#ifdef SIMULATOR
if (log) printf(" - %2d %02X", effect, value);
#endif
/* Inverse linearisation... */
if (effect >= SBASE && effect < SBASE+16) {
value = EFFECT_VALUE(effect-SBASE, value);
effect = IT_S;
}
#ifdef SIMULATOR
if (log) printf(" - %c%02X\n", 'A'+effect-1, value);
#endif
entry->effect = effect;
entry->effectvalue = value;
}