src/java.base/windows/native/libjli/cmdtoargs.c
branchihse-remove-mapfiles-branch
changeset 56106 40e61db323c2
parent 47216 71c04702a3d5
child 56721 01b558efd286
equal deleted inserted replaced
56105:749e0ffa206f 56106:40e61db323c2
     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 JLI_GetStdArgc() {
   192     return stdargc;
   193     return stdargc;
   193 }
   194 }
   194 
   195 
   195 StdArg* JLI_GetStdArgs() {
   196 JNIEXPORT StdArg* JLI_GetStdArgs() {
   196     return stdargs;
   197     return stdargs;
   197 }
   198 }
   198 
   199 
   199 void JLI_CmdToArgs(char* cmdline) {
   200 JNIEXPORT void JLI_CmdToArgs(char* cmdline) {
   200     int nargs = 0;
   201     int nargs = 0;
   201     StdArg* argv = NULL;
   202     StdArg* argv = NULL;
   202     jboolean wildcard = JNI_FALSE;
   203     jboolean wildcard = JNI_FALSE;
   203     char* src = cmdline, *arg = NULL;
   204     char* src = cmdline, *arg = NULL;
   204     JLI_List argsInFile;
   205     JLI_List argsInFile;