[SDL] I/O problem (stdio and stderr redirection to txt files)

Tom Wilson t.wilson at hazid.com
Thu Mar 17 06:33:33 PST 2005


Petri Latvala wrote:
> On Thu, Mar 17, 2005 at 11:36:09AM +0000, Tom Wilson wrote:
> 
>>>typedef void *SDL_ConsoleHandle;
>>>SDL_ConsoleHandle SDL_OpenConsole(void);
>>>SDL_CloseConsole(SDL_ConsoleHandle handle);
>>>SDL_ConsolePrintF(SDL_ConsoleHandle handle, const char *format, ...);
>>>SDL_ConsoleVPrintF(SDL_ConsoleHandle handle,
>>> const char *format, va_list ap);
>>
>>Sorry, but isn't this overkill?  I always thought SDL was good beacause 
>>it wasn't bloatware.  i.e it lets the devloper make a few choices 
>>him/herself
>>
>>Why not just have;
>>long SDL_GetLastError()
>>SDL_SetLastError(long)
>>const char *SDL_GetSysErrorString(long)
> 
> 
> 
> How about because they do different things?
> 

No, I this is the same issue.

> Functions David proposed handle telling the error etc to the
> _user_. 

Yes, David has now clarified, it should be in an external library.


Your proposal deals with letting the _developer_ query for
> error information.

Yes, it does exactly that.  I think it would be a waste of effort to 
make a library that gathers the stderr info and displays it.  It would 
be better to reform/patch the current way that error information is 
obtained in SDL, and then create a library that displays the information.


Cheers,

- Tom




More information about the SDL mailing list