1 /*
2 * Copyright (c) 2005, 2014, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
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
7 * published by the Free Software Foundation. Oracle designates this
8 * particular file as subject to the "Classpath" exception as provided
9 * by Oracle in the LICENSE file that accompanied this code.
10 *
11 * This code is distributed in the hope that it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 * version 2 for more details (a copy is included in the LICENSE file that
15 * accompanied this code).
16 *
17 * You should have received a copy of the GNU General Public License version
18 * 2 along with this work; if not, write to the Free Software Foundation,
19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 *
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 * or visit www.oracle.com if you need additional information or have any
116 */
117 struct JLI_List_
118 {
119 char **elements;
120 size_t size;
121 size_t capacity;
122 };
123 typedef struct JLI_List_ *JLI_List;
124
125 JLI_List JLI_List_new(size_t capacity);
126 void JLI_List_free(JLI_List l);
127 void JLI_List_ensureCapacity(JLI_List l, size_t capacity);
128 /* e must be JLI_MemFree-able */
129 void JLI_List_add(JLI_List l, char *e);
130 /* a copy is made out of beg */
131 void JLI_List_addSubstring(JLI_List l, const char *beg, size_t len);
132 char *JLI_List_combine(JLI_List sl);
133 char *JLI_List_join(JLI_List l, char sep);
134 JLI_List JLI_List_split(const char *str, char sep);
135
136 void JLI_InitArgProcessing(jboolean isJava, jboolean disableArgFile);
137 JLI_List JLI_PreprocessArg(const char *arg);
138 jboolean JLI_AddArgsFromEnvVar(JLI_List args, const char *var_name);
139
140 #endif /* _JLI_UTIL_H */
|
1 /*
2 * Copyright (c) 2005, 2017, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
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
7 * published by the Free Software Foundation. Oracle designates this
8 * particular file as subject to the "Classpath" exception as provided
9 * by Oracle in the LICENSE file that accompanied this code.
10 *
11 * This code is distributed in the hope that it will be useful, but WITHOUT
12 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
13 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
14 * version 2 for more details (a copy is included in the LICENSE file that
15 * accompanied this code).
16 *
17 * You should have received a copy of the GNU General Public License version
18 * 2 along with this work; if not, write to the Free Software Foundation,
19 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
20 *
21 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
22 * or visit www.oracle.com if you need additional information or have any
116 */
117 struct JLI_List_
118 {
119 char **elements;
120 size_t size;
121 size_t capacity;
122 };
123 typedef struct JLI_List_ *JLI_List;
124
125 JLI_List JLI_List_new(size_t capacity);
126 void JLI_List_free(JLI_List l);
127 void JLI_List_ensureCapacity(JLI_List l, size_t capacity);
128 /* e must be JLI_MemFree-able */
129 void JLI_List_add(JLI_List l, char *e);
130 /* a copy is made out of beg */
131 void JLI_List_addSubstring(JLI_List l, const char *beg, size_t len);
132 char *JLI_List_combine(JLI_List sl);
133 char *JLI_List_join(JLI_List l, char sep);
134 JLI_List JLI_List_split(const char *str, char sep);
135
136 void JLI_InitArgProcessing(jboolean hasJavaArgs, jboolean disableArgFile);
137 JLI_List JLI_PreprocessArg(const char *arg);
138 jboolean JLI_AddArgsFromEnvVar(JLI_List args, const char *var_name);
139
140 #endif /* _JLI_UTIL_H */
|