[interfacekit] Re: some questions on BApplication
- From: Ingo Weinhold <bonefish@xxxxxxxxxxxxxxx>
- To: interfacekit <interfacekit@xxxxxxxxxxxxx>
- Date: Thu, 18 Dec 2003 15:57:18 +0100 (MET)
On Thu, 18 Dec 2003, burton666@xxxxxxxxx wrote:
> I have this patch for BApplication, anyway:
[...]
> @@ -863,6 +878,7 @@
> void BApplication::do_argv(BMessage* message)
> {
> if (message) {
> + // TODO: Isn't this implementation specific ?
> int32 argc = __libc_argc;
> const char * const *argv = __libc_argv;
> // add argc
That's how it is done in glibc, and AFAIK there is no standard how the C
library should provide the application's argc/argv (in fact there's little
reason, why the C library should provide them as variables at all, since
they are already passed to main() anyway), we have no chance other than to
use them.
We might choose to implement a global private function that returns the
command line arguments to have only one central point that would need to
be changed. Though it's definitely nothing we'll overlook, if we switch to
another C library implementation, since the linker will kindly remind us.
;-)
CU, Ingo
- References:
- [interfacekit] Re: some questions on BApplication
- From: burton666@xxxxxxxxx
Other related posts:
- » [interfacekit] some questions on BApplication
- » [interfacekit] Re: some questions on BApplication
- » [interfacekit] Re: some questions on BApplication
- » [interfacekit] Re: some questions on BApplication
- » [interfacekit] Re: some questions on BApplication
- » [interfacekit] Re: some questions on BApplication
- » [interfacekit] Re: some questions on BApplication
- [interfacekit] Re: some questions on BApplication
- From: burton666@xxxxxxxxx