Re: [hatari-devel] Switching from SDL_types.h to inttypes.h ?

[ Thread Index | Date Index | More lists.tuxfamily.org/hatari-devel Archives ]


Le 29/09/2022 à 00:25, Eero Tamminen a écrit :

Btw. Following files are using WinUAE functions from maccess.h, which take uae_u* types and give them to SDL functions:
-----------------------------------------------
$ git grep -l -e do_put_mem_ -e do_get_mem_ -e do_byteswap_ | grep -v src/cpu/
src/debug/68kDisass.c
src/gemdos.c
src/includes/ioMem.h
src/msa.c
src/stMemory.c
src/video.c
-----------------------------------------------

But only these use the intended uae_u* types:
-----------------------------------------------
$ git grep -l uae_u | grep -v src/cpu
src/ide.c
src/includes/ide.h
src/includes/ioMem.h
src/includes/m68000.h
src/includes/stMemory.h
src/ioMem.c
src/m68000.c
src/memorySnapShot.c
src/ncr5380.c
-----------------------------------------------

In case of WinUAE CPU core functions, using its own types could make more sense, because unlike SDL ones, those functions are lacking a prefix that could be used to easily find them all.

But I think Hatari is unlikely to change from WinUAE to something else, so IMHO using C99 stdint.h types for those is fine too.

Hi

we should not change any type inside the cpu/ directory, except those that are part of Hatari's specific code.
Else it will make merging with WinUAE very more complicated.

so, if some variables/types are coming from WinUAE and using uae_u* types (for examples in m68000.c), I'd rather keep the uae_u* types instead of switching to uint_xxt, to give a "visual" hint that the variable is refering to the CPU part.

Nicolas



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/