12Fermer14
hibouLe 16/03/2005 à 01:55
No it doesn't.
test.c:33: error: conflicting types for `graphlib__0000'
graphlib.h:4: error: previous declaration of `graphlib__0000'
test.c:33: warning: extern declaration of `graphlib__0000' doesn't match global one
test.c:42: error: conflicting types for `graphlib__0000'
test.c:33: error: previous declaration of `graphlib__0000'


the undef doesn't do the job you intend to do. It only undefine macros, not function prototype.

But if I add the argument void *dest asm("%a1") in the header file (the "kernel.h"), it works correctly.

When I was thinking about a macro, I was thinking about something like that :

#undef graphlib_fill
#define graphlib_fill(x1,x2,y1,y2,color,screen)   asm("move.l screen,%a1");graphlib__0000(x1,x2,y1,y2,color);