From c4519773ca573ca457b32014bd40c2cb9a1e7257 Mon Sep 17 00:00:00 2001 From: Mohan Embar Date: Fri, 25 Apr 2003 16:48:13 +0000 Subject: jvm.h: (_Jv_GetNbArgs) added (_Jv_GetSafeArg) added (_Jv_SetArgs) added 2003-03-29 Mohan Embar * 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 --- libjava/include/jvm.h | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'libjava/include') diff --git a/libjava/include/jvm.h b/libjava/include/jvm.h index 38f675a..9395feb 100644 --- a/libjava/include/jvm.h +++ b/libjava/include/jvm.h @@ -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. */ -- cgit v1.1