jvm.h: (_Jv_GetNbArgs) added (_Jv_GetSafeArg) added (_Jv_SetArgs) added

2003-03-29  Mohan Embar  <gnustuff@thisiscool.com>

        * include/jvm.h: (_Jv_GetNbArgs) added
        (_Jv_GetSafeArg) added
        (_Jv_SetArgs) added
        * prims.cc: (_Jv_GetNbArgs) implemented
        (_Jv_GetSafeArg) implemented
        (_Jv_SetArgs) implemented
        (_Jv_RunMain) use _Jv_SetArgs() instead of explicitly
        setting _Jv_argc and _Jv_argv
        * posix.cc: (_Jv_ThisExecutable) use _Jv_GetSafeArg()
        instead of _Jv_argv
        * java/lang/natRuntime.cc: (insertSystemProperties) use
        _Jv_GetSafeArg() instead of _Jv_argv

From-SVN: r66067
This commit is contained in:
Mohan Embar 2003-04-25 16:48:13 +00:00 committed by Andrew Haley
parent ad4a34f0b9
commit c4519773ca
5 changed files with 56 additions and 12 deletions

View file

@ -352,7 +352,20 @@ extern "C"
jlong _Jv_remJ (jlong, jlong);
}
/* Get the name of the running executable. */
/* Get the number of arguments (cf. argc) or 0 if our argument
list was never initialized. */
extern int _Jv_GetNbArgs (void);
/* Get the specified argument (cf. argv[index]) or "" if either
our argument list was never initialized or the specified index
is out of bounds. */
extern const char * _Jv_GetSafeArg (int index);
/* Sets our argument list. Can be used by programs with non-standard
entry points. */
extern void _Jv_SetArgs (int argc, const char **argv);
/* Get the name of the running executable. */
extern const char *_Jv_ThisExecutable (void);
/* Return a pointer to a symbol in executable or loaded library. */