Merge branch 'master' into gwin

This commit is contained in:
Joel Bodenmann 2014-02-02 13:00:25 +01:00
commit e178b08549
9 changed files with 11 additions and 11 deletions

View File

@ -66,7 +66,7 @@ int I_GetHeapSize (void)
byte* I_ZoneBase (int* size)
{
*size = mb_used*1024*1024;
return (byte *) gfxAlloc (*size);
return gfxAlloc (*size);
}
@ -124,7 +124,7 @@ byte* I_Malloc(int length)
{
byte* mem;
mem = (byte *)gfxAlloc (length);
mem = gfxAlloc (length);
memset (mem,0,length);
return mem;
}

View File

@ -70,9 +70,9 @@ GHandle gwinGScopeCreate(GDisplay *g, GScopeObject *gs, GWindowInit *pInit, uint
return 0;
gfxSemInit(&gs->bsem, 0, 1);
gs->nextx = 0;
if (!(gs->lastscopetrace = (coord_t *)gfxAlloc(gs->g.width * sizeof(coord_t))))
if (!(gs->lastscopetrace = gfxAlloc(gs->g.width * sizeof(coord_t))))
return 0;
if (!(gs->audiobuf = (adcsample_t *)gfxAlloc(AUDIOBUFSZ * sizeof(adcsample_t))))
if (!(gs->audiobuf = gfxAlloc(AUDIOBUFSZ * sizeof(adcsample_t))))
return 0;
#if TRIGGER_METHOD == TRIGGER_POSITIVERAMP
gs->lasty = gs->g.height/2;

View File

@ -139,7 +139,7 @@ void gaudin_lld_init(const gaudin_params *paud) {
/* We need to allocate a wave header for each buffer */
nBuffers = (paud->bufcount + paud->samplesPerEvent - 1) / paud->samplesPerEvent;
if (!(pWaveHdrs = (WAVEHDR *)gfxAlloc(nBuffers * sizeof(WAVEHDR)))) {
if (!(pWaveHdrs = gfxAlloc(nBuffers * sizeof(WAVEHDR)))) {
fprintf(stderr, "GAUDIN: Buffer header allocation failed\n");
return;
}

View File

@ -458,7 +458,7 @@ LLDSPEC bool_t gdisp_lld_init(GDisplay *g) {
#endif
// Create a private area for this window
priv = (winPriv *)gfxAlloc(sizeof(winPriv));
priv = gfxAlloc(sizeof(winPriv));
assert(priv != 0);
memset(priv, 0, sizeof(winPriv));
g->priv = priv;

View File

@ -433,7 +433,7 @@ LLDSPEC bool_t gdisp_lld_init(GDisplay *g) {
#endif
// Create a private area for this window
if (!(priv = (netPriv *)gfxAlloc(sizeof(netPriv))))
if (!(priv = gfxAlloc(sizeof(netPriv))))
gfxHalt("GDISP: uGFXnet - Memory allocation failed");
memset(priv, 0, sizeof(netPriv));
g->priv = priv;

View File

@ -542,7 +542,7 @@ static void _gosThreadsInit(void) {
char * framebase;
// Allocate a buffer to store our test data
pframeinfo = (saveloc *)gfxAlloc(sizeof(saveloc)*2);
pframeinfo = gfxAlloc(sizeof(saveloc)*2);
// Get details of the stack frame from within a function
get_stack_state_in_fn();

View File

@ -285,7 +285,7 @@ GHandle gwinGConsoleCreate(GDisplay *g, GConsoleObject *gc, const GWindowInit *p
gcw->bufsize *= gh->height / gdispGetFontMetric(gh->font, fontHeight);
// Allocate the buffer
if (!(gcw->buffer = (char*)gfxAlloc(gcw->bufsize)))
if (!(gcw->buffer = gfxAlloc(gcw->bufsize)))
return FALSE;
// All good!

View File

@ -338,7 +338,7 @@ void gwinSetText(GHandle gh, const char *text, bool_t useAlloc) {
else if (useAlloc) {
char *str;
if ((str = (char *)gfxAlloc(strlen(text)+1))) {
if ((str = gfxAlloc(strlen(text)+1))) {
gh->flags |= GWIN_FLG_ALLOCTXT;
strcpy(str, text);
}

View File

@ -102,7 +102,7 @@ void _gwinInit(void) {
GHandle _gwindowCreate(GDisplay *g, GWindowObject *pgw, const GWindowInit *pInit, const gwinVMT *vmt, uint16_t flags) {
// Allocate the structure if necessary
if (!pgw) {
if (!(pgw = (GWindowObject *)gfxAlloc(vmt->size)))
if (!(pgw = gfxAlloc(vmt->size)))
return 0;
pgw->flags = flags|GWIN_FLG_DYNAMIC;
} else