Re: [AD] Patch to change the logfile name (4.3.10) |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
- To: Coordination of admins/developers of th <alleg-developers@xxxxxxxxxx>
- Subject: Re: [AD] Patch to change the logfile name (4.3.10)
- From: Colin Ward <lists@xxxxxxxxxx>
- Date: Sun, 26 Oct 2008 06:51:59 +0000
- Organization: Code HQ
On 24/10/2008, you wrote:
>
[snip]
>> So I added a #define in include/allegro/internal/aintern.h thus:
>>
>> #define ALLEGRO_LOGFILE_NAME "allegro.log"
>>
>> And changed src/allegro.c to use it. So if a platform wants to change
>> the log file name they can simply #undef and then re#define it in
>> their platform specific header file (the one defined by
>> ALLEGRO_INTERNAL_HEADER in the platform's *cfg.h file).
>
> I don't think it needs to be that complicated. In src/allegro.c you
> could just have:
>
> #ifdef ALLEGRO_AMIGA
> #define LOGFILE "blahblah"
> #else
> #define LOGFILE "allegro.log"
> #endif
Well I could do that, sure. But I would have thought that you would want to
reduce platform specific #ifdefs in generic code, or else you could end up
with dozens of them. My method is more complex but it keeps things more
generic.
--
/-------------------------------------------------------------------\
[Hitman/Code HQ - 6502/z80/68000/604e/80x86/ARM coder - Amiga rulez!]
[VZ-200/VIC-20/MZ-700/c16/c64*10/c128*8/Plus-4/CPC464/CD32/500*2 ]
[600/1000/1200*2/A4000/SNES/N64/Dreamcast/Athlon 1100/AmigaOne ]
[Assembly Language: The most fun you can have with your clothes on! ]
\-------------------------------------------------------------------/