src/java.base/windows/native/libjli/cmdtoargs.c
changeset 49440 396ea30afbd5
parent 47216 71c04702a3d5
child 50453 f91927a2c8d3
equal deleted inserted replaced
49439:bf53d82a51e5 49440:396ea30afbd5
     1 /*
     1 /*
     2  * Copyright (c) 2012, 2017, Oracle and/or its affiliates. All rights reserved.
     2  * Copyright (c) 2012, 2018, Oracle and/or its affiliates. All rights reserved.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4  *
     4  *
     5  * This code is free software; you can redistribute it and/or modify it
     5  * This code is free software; you can redistribute it and/or modify it
     6  * under the terms of the GNU General Public License version 2 only, as
     6  * under the terms of the GNU General Public License version 2 only, as
     7  * published by the Free Software Foundation.  Oracle designates this
     7  * published by the Free Software Foundation.  Oracle designates this
    33 
    33 
    34 #include <assert.h>
    34 #include <assert.h>
    35 
    35 
    36 #ifndef IDE_STANDALONE
    36 #ifndef IDE_STANDALONE
    37 #include "java.h"
    37 #include "java.h"
       
    38 #include "jni.h"
    38 #include "jli_util.h"
    39 #include "jli_util.h"
    39 #else /* IDE_STANDALONE */
    40 #else /* IDE_STANDALONE */
    40 // The defines we need for stand alone testing
    41 // The defines we need for stand alone testing
    41 #include <stdio.h>
    42 #include <stdio.h>
    42 #include <stdlib.h>
    43 #include <stdlib.h>
   186     }
   187     }
   187     *dest = 0;
   188     *dest = 0;
   188     return done ? src : NULL;
   189     return done ? src : NULL;
   189 }
   190 }
   190 
   191 
   191 int JLI_GetStdArgc() {
   192 JNIEXPORT int JNICALL
       
   193 JLI_GetStdArgc() {
   192     return stdargc;
   194     return stdargc;
   193 }
   195 }
   194 
   196 
   195 StdArg* JLI_GetStdArgs() {
   197 JNIEXPORT StdArg* JNICALL
       
   198 JLI_GetStdArgs() {
   196     return stdargs;
   199     return stdargs;
   197 }
   200 }
   198 
   201 
   199 void JLI_CmdToArgs(char* cmdline) {
   202 JNIEXPORT void JNICALL
       
   203 JLI_CmdToArgs(char* cmdline) {
   200     int nargs = 0;
   204     int nargs = 0;
   201     StdArg* argv = NULL;
   205     StdArg* argv = NULL;
   202     jboolean wildcard = JNI_FALSE;
   206     jboolean wildcard = JNI_FALSE;
   203     char* src = cmdline, *arg = NULL;
   207     char* src = cmdline, *arg = NULL;
   204     JLI_List argsInFile;
   208     JLI_List argsInFile;