< prev index next >

src/java.base/share/native/libjli/args.c

Print this page

        

*** 1,7 **** /* ! * Copyright (c) 2015, 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) 2015, 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
*** 36,45 **** --- 36,46 ---- #define JLI_ReportMessage(...) printf(__VA_ARGS__) #define JDK_JAVA_OPTIONS "JDK_JAVA_OPTIONS" int IsWhiteSpaceOption(const char* name) { return 1; } #else #include "java.h" + #include "jni.h" #endif #include "jli_util.h" #include "emessages.h"
*** 76,86 **** // Initialize to 1, as the first argument is the app name and not preprocessed static size_t argsCount = 1; static jboolean stopExpansion = JNI_FALSE; static jboolean relaunch = JNI_FALSE; ! void JLI_InitArgProcessing(jboolean hasJavaArgs, jboolean disableArgFile) { // No expansion for relaunch if (argsCount != 1) { relaunch = JNI_TRUE; stopExpansion = JNI_TRUE; argsCount = 1; --- 77,88 ---- // Initialize to 1, as the first argument is the app name and not preprocessed static size_t argsCount = 1; static jboolean stopExpansion = JNI_FALSE; static jboolean relaunch = JNI_FALSE; ! JNIEXPORT void JNICALL ! JLI_InitArgProcessing(jboolean hasJavaArgs, jboolean disableArgFile) { // No expansion for relaunch if (argsCount != 1) { relaunch = JNI_TRUE; stopExpansion = JNI_TRUE; argsCount = 1;
*** 92,102 **** // for tools, this value remains 0 all the time. firstAppArgIndex = hasJavaArgs ? 0: NOT_FOUND; } ! int JLI_GetAppArgIndex() { // Will be 0 for tools return firstAppArgIndex; } static void checkArg(const char *arg) { --- 94,105 ---- // for tools, this value remains 0 all the time. firstAppArgIndex = hasJavaArgs ? 0: NOT_FOUND; } ! JNIEXPORT int JNICALL ! JLI_GetAppArgIndex() { // Will be 0 for tools return firstAppArgIndex; } static void checkArg(const char *arg) {
*** 371,381 **** } return rv; } ! JLI_List JLI_PreprocessArg(const char *arg) { JLI_List rv; if (firstAppArgIndex > 0) { // In user application arg, no more work. --- 374,385 ---- } return rv; } ! JNIEXPORT JLI_List JNICALL ! JLI_PreprocessArg(const char *arg) { JLI_List rv; if (firstAppArgIndex > 0) { // In user application arg, no more work.
*** 426,436 **** JLI_StrCmp(arg, "--version") == 0 || JLI_StrCmp(arg, "-fullversion") == 0 || JLI_StrCmp(arg, "--full-version") == 0; } ! jboolean JLI_AddArgsFromEnvVar(JLI_List args, const char *var_name) { char *env = getenv(var_name); char *p, *arg; char quote; JLI_List argsInFile; --- 430,441 ---- JLI_StrCmp(arg, "--version") == 0 || JLI_StrCmp(arg, "-fullversion") == 0 || JLI_StrCmp(arg, "--full-version") == 0; } ! JNIEXPORT jboolean JNICALL ! JLI_AddArgsFromEnvVar(JLI_List args, const char *var_name) { char *env = getenv(var_name); char *p, *arg; char quote; JLI_List argsInFile;
< prev index next >