< prev index next >
src/java.base/share/native/libjli/jli_util.h
Print this page
*** 1,7 ****
/*
! * Copyright (c) 2005, 2017, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
--- 1,7 ----
/*
! * Copyright (c) 2005, 2018, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
*** 38,61 ****
#define JNI_FALSE 0
#endif
#define JLDEBUG_ENV_ENTRY "_JAVA_LAUNCHER_DEBUG"
! void *JLI_MemAlloc(size_t size);
void *JLI_MemRealloc(void *ptr, size_t size);
! char *JLI_StringDup(const char *s1);
! void JLI_MemFree(void *ptr);
int JLI_StrCCmp(const char *s1, const char* s2);
typedef struct {
char *arg;
jboolean has_wildcard;
} StdArg;
! StdArg *JLI_GetStdArgs();
! int JLI_GetStdArgc();
! int JLI_GetAppArgIndex();
#define JLI_StrLen(p1) strlen((p1))
#define JLI_StrChr(p1, p2) strchr((p1), (p2))
#define JLI_StrRChr(p1, p2) strrchr((p1), (p2))
#define JLI_StrCmp(p1, p2) strcmp((p1), (p2))
--- 38,73 ----
#define JNI_FALSE 0
#endif
#define JLDEBUG_ENV_ENTRY "_JAVA_LAUNCHER_DEBUG"
! JNIEXPORT void * JNICALL
! JLI_MemAlloc(size_t size);
!
void *JLI_MemRealloc(void *ptr, size_t size);
!
! JNIEXPORT char * JNICALL
! JLI_StringDup(const char *s1);
!
! JNIEXPORT void JNICALL
! JLI_MemFree(void *ptr);
!
int JLI_StrCCmp(const char *s1, const char* s2);
typedef struct {
char *arg;
jboolean has_wildcard;
} StdArg;
! JNIEXPORT StdArg * JNICALL
! JLI_GetStdArgs();
!
! JNIEXPORT int JNICALL
! JLI_GetStdArgc();
!
! JNIEXPORT int JNICALL
! JLI_GetAppArgIndex();
#define JLI_StrLen(p1) strlen((p1))
#define JLI_StrChr(p1, p2) strchr((p1), (p2))
#define JLI_StrRChr(p1, p2) strrchr((p1), (p2))
#define JLI_StrCmp(p1, p2) strcmp((p1), (p2))
*** 75,85 ****
#include <io.h>
#include <process.h>
#define JLI_StrCaseCmp(p1, p2) stricmp((p1), (p2))
#define JLI_StrNCaseCmp(p1, p2, p3) strnicmp((p1), (p2), (p3))
int JLI_Snprintf(char *buffer, size_t size, const char *format, ...);
! void JLI_CmdToArgs(char *cmdline);
#define JLI_Lseek _lseeki64
#define JLI_PutEnv _putenv
#define JLI_GetPid _getpid
#else /* NIXES */
#include <unistd.h>
--- 87,98 ----
#include <io.h>
#include <process.h>
#define JLI_StrCaseCmp(p1, p2) stricmp((p1), (p2))
#define JLI_StrNCaseCmp(p1, p2, p3) strnicmp((p1), (p2), (p3))
int JLI_Snprintf(char *buffer, size_t size, const char *format, ...);
! JNIEXPORT void JNICALL
! JLI_CmdToArgs(char *cmdline);
#define JLI_Lseek _lseeki64
#define JLI_PutEnv _putenv
#define JLI_GetPid _getpid
#else /* NIXES */
#include <unistd.h>
*** 106,116 ****
/*
* Make launcher spit debug output.
*/
void JLI_TraceLauncher(const char* fmt, ...);
! void JLI_SetTraceLauncher();
jboolean JLI_IsTraceLauncher();
/*
* JLI_List - a dynamic list of char*
*/
--- 119,132 ----
/*
* Make launcher spit debug output.
*/
void JLI_TraceLauncher(const char* fmt, ...);
!
! JNIEXPORT void JNICALL
! JLI_SetTraceLauncher();
!
jboolean JLI_IsTraceLauncher();
/*
* JLI_List - a dynamic list of char*
*/
*** 120,140 ****
size_t size;
size_t capacity;
};
typedef struct JLI_List_ *JLI_List;
! JLI_List JLI_List_new(size_t capacity);
void JLI_List_free(JLI_List l);
void JLI_List_ensureCapacity(JLI_List l, size_t capacity);
/* e must be JLI_MemFree-able */
! void JLI_List_add(JLI_List l, char *e);
/* a copy is made out of beg */
void JLI_List_addSubstring(JLI_List l, const char *beg, size_t len);
char *JLI_List_combine(JLI_List sl);
char *JLI_List_join(JLI_List l, char sep);
JLI_List JLI_List_split(const char *str, char sep);
! void JLI_InitArgProcessing(jboolean hasJavaArgs, jboolean disableArgFile);
! JLI_List JLI_PreprocessArg(const char *arg);
! jboolean JLI_AddArgsFromEnvVar(JLI_List args, const char *var_name);
#endif /* _JLI_UTIL_H */
--- 136,166 ----
size_t size;
size_t capacity;
};
typedef struct JLI_List_ *JLI_List;
! JNIEXPORT JLI_List JNICALL
! JLI_List_new(size_t capacity);
!
void JLI_List_free(JLI_List l);
void JLI_List_ensureCapacity(JLI_List l, size_t capacity);
+
/* e must be JLI_MemFree-able */
! JNIEXPORT void JNICALL
! JLI_List_add(JLI_List l, char *e);
!
/* a copy is made out of beg */
void JLI_List_addSubstring(JLI_List l, const char *beg, size_t len);
char *JLI_List_combine(JLI_List sl);
char *JLI_List_join(JLI_List l, char sep);
JLI_List JLI_List_split(const char *str, char sep);
! JNIEXPORT void JNICALL
! JLI_InitArgProcessing(jboolean hasJavaArgs, jboolean disableArgFile);
!
! JNIEXPORT JLI_List JNICALL
! JLI_PreprocessArg(const char *arg);
!
! JNIEXPORT jboolean JNICALL
! JLI_AddArgsFromEnvVar(JLI_List args, const char *var_name);
#endif /* _JLI_UTIL_H */
< prev index next >