![]() |
|
al_set_debug_file [submitting idea and code] |
GullRaDriel
Member #3,861
September 2003
![]() |
[EDIT: COMMENTS ARE WELCOME] Every time I use TRACE I am worried that I can not specify the output file. I did the following modification: AL_FUNC(void, al_set_debug_file, (AL_CONST char *tracefilename , AL_CONST char *assertfilename ) );
As expected, this is working fine, TRACE use the specified filename and ASSERT is keeping default. Everyone, any comments, are you interested by such a feature ? I was thinking that this was laking in Allegro. EDITED: Adding assert_file inside the function. Edited one more time for names conflict && differentiation. "Code is like shit - it only smells if it is not yours" |
BAF
Member #2,981
December 2002
![]() |
Quote: if( tracefile != NULL ) Wouldn't you have to close the file if it wasn't NULL? Also, you only open the file if tracefile is not NULL? I'm not sure I understand that part of the code. |
GullRaDriel
Member #3,861
September 2003
![]() |
Because I do not want to force people to specify both trace output filename and assert output filename. If they want they can just pass NULL and it will let the default. If you only want to have a specific assert file, then pass NULL,"myassertfile" "Code is like shit - it only smells if it is not yours" |
BAF
Member #2,981
December 2002
![]() |
Ah, okay. I see now. I didn't read carefully enough, and assumed tracefile was the actual FILE*. |
GullRaDriel
Member #3,861
September 2003
![]() |
Yeah the name are not goodly choosen ... Sorry EDIT: I edited the firt post for better reading. now tracefile is tracefilename and assertfile is assertfilename. EDIT: Thanks BAF for taking the time to put some comments. "Code is like shit - it only smells if it is not yours" |
|