1 /*******************************************************************************
2 * Copyright (c) 2000, 2019 IBM Corporation and others.
4 * This program and the accompanying materials
5 * are made available under the terms of the Eclipse Public License 2.0
6 * which accompanies this distribution, and is available at
7 * https://www.eclipse.org/legal/epl-2.0/
9 * SPDX-License-Identifier: EPL-2.0
12 * IBM Corporation - initial API and implementation
13 *******************************************************************************/
15 /* Note: This file was auto-generated by org.eclipse.swt.tools.internal.JNIGenerator */
16 /* DO NOT EDIT - your changes will be lost. */
19 #include "c_structs.h"
23 #define C_NATIVE(func) Java_org_eclipse_swt_internal_C_##func
26 #ifndef NO_PTR_1sizeof
27 JNIEXPORT jint JNICALL C_NATIVE(PTR_1sizeof)
28 (JNIEnv *env, jclass that)
31 C_NATIVE_ENTER(env, that, PTR_1sizeof_FUNC);
32 rc = (jint)PTR_sizeof();
33 C_NATIVE_EXIT(env, that, PTR_1sizeof_FUNC);
39 JNIEXPORT void JNICALL C_NATIVE(free)
40 (JNIEnv *env, jclass that, jlong arg0)
42 C_NATIVE_ENTER(env, that, free_FUNC);
44 C_NATIVE_EXIT(env, that, free_FUNC);
49 JNIEXPORT jlong JNICALL C_NATIVE(getenv)
50 (JNIEnv *env, jclass that, jbyteArray arg0)
54 C_NATIVE_ENTER(env, that, getenv_FUNC);
55 if (arg0) if ((lparg0 = (*env)->GetByteArrayElements(env, arg0, NULL)) == NULL) goto fail;
56 rc = (jlong)getenv((const char *)lparg0);
58 if (arg0 && lparg0) (*env)->ReleaseByteArrayElements(env, arg0, lparg0, 0);
59 C_NATIVE_EXIT(env, that, getenv_FUNC);
65 JNIEXPORT jlong JNICALL C_NATIVE(malloc)
66 (JNIEnv *env, jclass that, jlong arg0)
69 C_NATIVE_ENTER(env, that, malloc_FUNC);
70 rc = (jlong)malloc(arg0);
71 C_NATIVE_EXIT(env, that, malloc_FUNC);
76 #ifndef NO_memmove__JJJ
77 JNIEXPORT void JNICALL C_NATIVE(memmove__JJJ)
78 (JNIEnv *env, jclass that, jlong arg0, jlong arg1, jlong arg2)
80 C_NATIVE_ENTER(env, that, memmove__JJJ_FUNC);
81 memmove((void *)arg0, (const void *)arg1, (size_t)arg2);
82 C_NATIVE_EXIT(env, that, memmove__JJJ_FUNC);
86 #ifndef NO_memmove__J_3BJ
87 JNIEXPORT void JNICALL C_NATIVE(memmove__J_3BJ)
88 (JNIEnv *env, jclass that, jlong arg0, jbyteArray arg1, jlong arg2)
91 C_NATIVE_ENTER(env, that, memmove__J_3BJ_FUNC);
92 if (arg1) if ((lparg1 = (*env)->GetPrimitiveArrayCritical(env, arg1, NULL)) == NULL) goto fail;
93 memmove((void *)arg0, (const void *)lparg1, (size_t)arg2);
95 if (arg1 && lparg1) (*env)->ReleasePrimitiveArrayCritical(env, arg1, lparg1, JNI_ABORT);
96 C_NATIVE_EXIT(env, that, memmove__J_3BJ_FUNC);
100 #ifndef NO_memmove__J_3CJ
101 JNIEXPORT void JNICALL C_NATIVE(memmove__J_3CJ)
102 (JNIEnv *env, jclass that, jlong arg0, jcharArray arg1, jlong arg2)
105 C_NATIVE_ENTER(env, that, memmove__J_3CJ_FUNC);
106 if (arg1) if ((lparg1 = (*env)->GetPrimitiveArrayCritical(env, arg1, NULL)) == NULL) goto fail;
107 memmove((void *)arg0, (const void *)lparg1, (size_t)arg2);
109 if (arg1 && lparg1) (*env)->ReleasePrimitiveArrayCritical(env, arg1, lparg1, JNI_ABORT);
110 C_NATIVE_EXIT(env, that, memmove__J_3CJ_FUNC);
114 #ifndef NO_memmove__J_3DJ
115 JNIEXPORT void JNICALL C_NATIVE(memmove__J_3DJ)
116 (JNIEnv *env, jclass that, jlong arg0, jdoubleArray arg1, jlong arg2)
118 jdouble *lparg1=NULL;
119 C_NATIVE_ENTER(env, that, memmove__J_3DJ_FUNC);
120 if (arg1) if ((lparg1 = (*env)->GetPrimitiveArrayCritical(env, arg1, NULL)) == NULL) goto fail;
121 memmove((void *)arg0, (const void *)lparg1, (size_t)arg2);
123 if (arg1 && lparg1) (*env)->ReleasePrimitiveArrayCritical(env, arg1, lparg1, JNI_ABORT);
124 C_NATIVE_EXIT(env, that, memmove__J_3DJ_FUNC);
128 #ifndef NO_memmove__J_3FJ
129 JNIEXPORT void JNICALL C_NATIVE(memmove__J_3FJ)
130 (JNIEnv *env, jclass that, jlong arg0, jfloatArray arg1, jlong arg2)
133 C_NATIVE_ENTER(env, that, memmove__J_3FJ_FUNC);
134 if (arg1) if ((lparg1 = (*env)->GetPrimitiveArrayCritical(env, arg1, NULL)) == NULL) goto fail;
135 memmove((void *)arg0, (const void *)lparg1, (size_t)arg2);
137 if (arg1 && lparg1) (*env)->ReleasePrimitiveArrayCritical(env, arg1, lparg1, JNI_ABORT);
138 C_NATIVE_EXIT(env, that, memmove__J_3FJ_FUNC);
142 #ifndef NO_memmove__J_3IJ
143 JNIEXPORT void JNICALL C_NATIVE(memmove__J_3IJ)
144 (JNIEnv *env, jclass that, jlong arg0, jintArray arg1, jlong arg2)
147 C_NATIVE_ENTER(env, that, memmove__J_3IJ_FUNC);
148 if (arg1) if ((lparg1 = (*env)->GetPrimitiveArrayCritical(env, arg1, NULL)) == NULL) goto fail;
149 memmove((void *)arg0, (const void *)lparg1, (size_t)arg2);
151 if (arg1 && lparg1) (*env)->ReleasePrimitiveArrayCritical(env, arg1, lparg1, JNI_ABORT);
152 C_NATIVE_EXIT(env, that, memmove__J_3IJ_FUNC);
156 #ifndef NO_memmove__J_3JJ
157 JNIEXPORT void JNICALL C_NATIVE(memmove__J_3JJ)
158 (JNIEnv *env, jclass that, jlong arg0, jlongArray arg1, jlong arg2)
161 C_NATIVE_ENTER(env, that, memmove__J_3JJ_FUNC);
162 if (arg1) if ((lparg1 = (*env)->GetPrimitiveArrayCritical(env, arg1, NULL)) == NULL) goto fail;
163 memmove((void *)arg0, (const void *)lparg1, (size_t)arg2);
165 if (arg1 && lparg1) (*env)->ReleasePrimitiveArrayCritical(env, arg1, lparg1, JNI_ABORT);
166 C_NATIVE_EXIT(env, that, memmove__J_3JJ_FUNC);
170 #ifndef NO_memmove__J_3SJ
171 JNIEXPORT void JNICALL C_NATIVE(memmove__J_3SJ)
172 (JNIEnv *env, jclass that, jlong arg0, jshortArray arg1, jlong arg2)
175 C_NATIVE_ENTER(env, that, memmove__J_3SJ_FUNC);
176 if (arg1) if ((lparg1 = (*env)->GetPrimitiveArrayCritical(env, arg1, NULL)) == NULL) goto fail;
177 memmove((void *)arg0, (const void *)lparg1, (size_t)arg2);
179 if (arg1 && lparg1) (*env)->ReleasePrimitiveArrayCritical(env, arg1, lparg1, JNI_ABORT);
180 C_NATIVE_EXIT(env, that, memmove__J_3SJ_FUNC);
184 #ifndef NO_memmove___3BJJ
185 JNIEXPORT void JNICALL C_NATIVE(memmove___3BJJ)
186 (JNIEnv *env, jclass that, jbyteArray arg0, jlong arg1, jlong arg2)
189 C_NATIVE_ENTER(env, that, memmove___3BJJ_FUNC);
190 if (arg0) if ((lparg0 = (*env)->GetPrimitiveArrayCritical(env, arg0, NULL)) == NULL) goto fail;
191 memmove((void *)lparg0, (const void *)arg1, (size_t)arg2);
193 if (arg0 && lparg0) (*env)->ReleasePrimitiveArrayCritical(env, arg0, lparg0, 0);
194 C_NATIVE_EXIT(env, that, memmove___3BJJ_FUNC);
198 #ifndef NO_memmove___3B_3CJ
199 JNIEXPORT void JNICALL C_NATIVE(memmove___3B_3CJ)
200 (JNIEnv *env, jclass that, jbyteArray arg0, jcharArray arg1, jlong arg2)
204 C_NATIVE_ENTER(env, that, memmove___3B_3CJ_FUNC);
205 if (arg0) if ((lparg0 = (*env)->GetPrimitiveArrayCritical(env, arg0, NULL)) == NULL) goto fail;
206 if (arg1) if ((lparg1 = (*env)->GetPrimitiveArrayCritical(env, arg1, NULL)) == NULL) goto fail;
207 memmove((void *)lparg0, (const void *)lparg1, (size_t)arg2);
209 if (arg1 && lparg1) (*env)->ReleasePrimitiveArrayCritical(env, arg1, lparg1, JNI_ABORT);
210 if (arg0 && lparg0) (*env)->ReleasePrimitiveArrayCritical(env, arg0, lparg0, 0);
211 C_NATIVE_EXIT(env, that, memmove___3B_3CJ_FUNC);
215 #ifndef NO_memmove___3CJJ
216 JNIEXPORT void JNICALL C_NATIVE(memmove___3CJJ)
217 (JNIEnv *env, jclass that, jcharArray arg0, jlong arg1, jlong arg2)
220 C_NATIVE_ENTER(env, that, memmove___3CJJ_FUNC);
221 if (arg0) if ((lparg0 = (*env)->GetPrimitiveArrayCritical(env, arg0, NULL)) == NULL) goto fail;
222 memmove((void *)lparg0, (const void *)arg1, (size_t)arg2);
224 if (arg0 && lparg0) (*env)->ReleasePrimitiveArrayCritical(env, arg0, lparg0, 0);
225 C_NATIVE_EXIT(env, that, memmove___3CJJ_FUNC);
229 #ifndef NO_memmove___3DJJ
230 JNIEXPORT void JNICALL C_NATIVE(memmove___3DJJ)
231 (JNIEnv *env, jclass that, jdoubleArray arg0, jlong arg1, jlong arg2)
233 jdouble *lparg0=NULL;
234 C_NATIVE_ENTER(env, that, memmove___3DJJ_FUNC);
235 if (arg0) if ((lparg0 = (*env)->GetPrimitiveArrayCritical(env, arg0, NULL)) == NULL) goto fail;
236 memmove((void *)lparg0, (const void *)arg1, (size_t)arg2);
238 if (arg0 && lparg0) (*env)->ReleasePrimitiveArrayCritical(env, arg0, lparg0, 0);
239 C_NATIVE_EXIT(env, that, memmove___3DJJ_FUNC);
243 #ifndef NO_memmove___3FJJ
244 JNIEXPORT void JNICALL C_NATIVE(memmove___3FJJ)
245 (JNIEnv *env, jclass that, jfloatArray arg0, jlong arg1, jlong arg2)
248 C_NATIVE_ENTER(env, that, memmove___3FJJ_FUNC);
249 if (arg0) if ((lparg0 = (*env)->GetPrimitiveArrayCritical(env, arg0, NULL)) == NULL) goto fail;
250 memmove((void *)lparg0, (const void *)arg1, (size_t)arg2);
252 if (arg0 && lparg0) (*env)->ReleasePrimitiveArrayCritical(env, arg0, lparg0, 0);
253 C_NATIVE_EXIT(env, that, memmove___3FJJ_FUNC);
257 #ifndef NO_memmove___3IJJ
258 JNIEXPORT void JNICALL C_NATIVE(memmove___3IJJ)
259 (JNIEnv *env, jclass that, jintArray arg0, jlong arg1, jlong arg2)
262 C_NATIVE_ENTER(env, that, memmove___3IJJ_FUNC);
263 if (arg0) if ((lparg0 = (*env)->GetPrimitiveArrayCritical(env, arg0, NULL)) == NULL) goto fail;
264 memmove((void *)lparg0, (const void *)arg1, (size_t)arg2);
266 if (arg0 && lparg0) (*env)->ReleasePrimitiveArrayCritical(env, arg0, lparg0, 0);
267 C_NATIVE_EXIT(env, that, memmove___3IJJ_FUNC);
271 #ifndef NO_memmove___3I_3BJ
272 JNIEXPORT void JNICALL C_NATIVE(memmove___3I_3BJ)
273 (JNIEnv *env, jclass that, jintArray arg0, jbyteArray arg1, jlong arg2)
277 C_NATIVE_ENTER(env, that, memmove___3I_3BJ_FUNC);
278 if (arg1) if ((lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL)) == NULL) goto fail;
279 if (arg0) if ((lparg0 = (*env)->GetPrimitiveArrayCritical(env, arg0, NULL)) == NULL) goto fail;
280 memmove((void *)lparg0, (const void *)lparg1, (size_t)arg2);
282 if (arg0 && lparg0) (*env)->ReleasePrimitiveArrayCritical(env, arg0, lparg0, 0);
283 if (arg1 && lparg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, 0);
284 C_NATIVE_EXIT(env, that, memmove___3I_3BJ_FUNC);
288 #ifndef NO_memmove___3JJJ
289 JNIEXPORT void JNICALL C_NATIVE(memmove___3JJJ)
290 (JNIEnv *env, jclass that, jlongArray arg0, jlong arg1, jlong arg2)
293 C_NATIVE_ENTER(env, that, memmove___3JJJ_FUNC);
294 if (arg0) if ((lparg0 = (*env)->GetPrimitiveArrayCritical(env, arg0, NULL)) == NULL) goto fail;
295 memmove((void *)lparg0, (const void *)arg1, (size_t)arg2);
297 if (arg0 && lparg0) (*env)->ReleasePrimitiveArrayCritical(env, arg0, lparg0, 0);
298 C_NATIVE_EXIT(env, that, memmove___3JJJ_FUNC);
302 #ifndef NO_memmove___3SJJ
303 JNIEXPORT void JNICALL C_NATIVE(memmove___3SJJ)
304 (JNIEnv *env, jclass that, jshortArray arg0, jlong arg1, jlong arg2)
307 C_NATIVE_ENTER(env, that, memmove___3SJJ_FUNC);
308 if (arg0) if ((lparg0 = (*env)->GetPrimitiveArrayCritical(env, arg0, NULL)) == NULL) goto fail;
309 memmove((void *)lparg0, (const void *)arg1, (size_t)arg2);
311 if (arg0 && lparg0) (*env)->ReleasePrimitiveArrayCritical(env, arg0, lparg0, 0);
312 C_NATIVE_EXIT(env, that, memmove___3SJJ_FUNC);
317 JNIEXPORT jlong JNICALL C_NATIVE(memset)
318 (JNIEnv *env, jclass that, jlong arg0, jint arg1, jlong arg2)
321 C_NATIVE_ENTER(env, that, memset_FUNC);
322 rc = (jlong)memset((void *)arg0, arg1, (size_t)arg2);
323 C_NATIVE_EXIT(env, that, memset_FUNC);
329 JNIEXPORT jint JNICALL C_NATIVE(setenv)
330 (JNIEnv *env, jclass that, jbyteArray arg0, jbyteArray arg1, jint arg2)
335 C_NATIVE_ENTER(env, that, setenv_FUNC);
336 if (arg0) if ((lparg0 = (*env)->GetByteArrayElements(env, arg0, NULL)) == NULL) goto fail;
337 if (arg1) if ((lparg1 = (*env)->GetByteArrayElements(env, arg1, NULL)) == NULL) goto fail;
338 rc = (jint)setenv((const char *)lparg0, (const char *)lparg1, arg2);
340 if (arg1 && lparg1) (*env)->ReleaseByteArrayElements(env, arg1, lparg1, 0);
341 if (arg0 && lparg0) (*env)->ReleaseByteArrayElements(env, arg0, lparg0, 0);
342 C_NATIVE_EXIT(env, that, setenv_FUNC);
348 JNIEXPORT jint JNICALL C_NATIVE(strlen)
349 (JNIEnv *env, jclass that, jlong arg0)
352 C_NATIVE_ENTER(env, that, strlen_FUNC);
353 rc = (jint)strlen((char *)arg0);
354 C_NATIVE_EXIT(env, that, strlen_FUNC);