1
0
mirror of https://github.com/adtools/clib2.git synced 2025-12-08 14:59:05 +00:00

- Added some extra documentation on the WBStartup variable.

git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@14825 87f5fb63-7c3d-0410-a384-fd976d0f7a62
This commit is contained in:
Olaf Barthel
2005-02-03 17:33:54 +00:00
parent 91028c63bc
commit 2ddfeab0cf

View File

@ -1,5 +1,5 @@
/* /*
* $Id: dos.h,v 1.6 2005-02-03 16:56:20 obarthel Exp $ * $Id: dos.h,v 1.7 2005-02-03 17:33:54 obarthel Exp $
* *
* :ts=4 * :ts=4
* *
@ -66,6 +66,26 @@ extern "C" {
* ISO 'C' standard context. It is redefined to WBenchMsg to make it * ISO 'C' standard context. It is redefined to WBenchMsg to make it
* compatible with the original Amiga program startup code which would * compatible with the original Amiga program startup code which would
* refer to the variable under that name. * refer to the variable under that name.
*
* It is recommended to access the Workbench startup message as part of your
* program's main() function, like this:
*
* int
* main(int argc,char ** argv)
* {
* struct WBStartup * wb_startup_message;
*
* if(argc == 0)
* wb_startup_message = (struct WBStartup *)argv;
* else
* wb_startup_message = NULL;
*
* ...
* }
*
* This approach has the advantage that your program does not rely upon a
* global variable initialized by the startup code, whose name you might
* not even know exactly.
*/ */
extern struct WBStartup * __WBenchMsg; extern struct WBStartup * __WBenchMsg;
#define WBenchMsg __WBenchMsg #define WBenchMsg __WBenchMsg