diff options
author | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2020-03-30 21:30:45 +0200 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2020-03-30 21:30:45 +0200 |
commit | ee770c2346eb37e0dcb8b6cf3eaacf3d8efd6bbc (patch) | |
tree | 58f05092be1a17a939e861f8cadcda1b6ca2ecef /japi/Sane.c | |
parent | 0da9e21872802cfc6e975b1ebaf9efb9e5934d84 (diff) | |
parent | fef76e17ed4c607ea73b81279f9ef1d7121be900 (diff) |
Merge branch 'release/experimental/1.0.29-1_experimental1'experimental/1.0.29-1_experimental1
Diffstat (limited to 'japi/Sane.c')
-rw-r--r-- | japi/Sane.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/japi/Sane.c b/japi/Sane.c index 1ddb4fc..3fd9996 100644 --- a/japi/Sane.c +++ b/japi/Sane.c @@ -104,7 +104,7 @@ JNIEXPORT jint JNICALL Java_Sane_getDevicesNative int i; /* Get the list. */ - status = sane_get_devices(&device_list, localOnly); + status = sane_get_devices(&device_list, localOnly); if (status != SANE_STATUS_GOOD) return (status); /* Get length of Java array. */ @@ -232,13 +232,13 @@ JNIEXPORT void JNICALL Java_Sane_getOptionNative jobject range = (*env)->AllocObject(env, rangeClass); /* Fill in fields. */ fid = (*env)->GetFieldID(env, rangeClass, "min", "I"); - (*env)->SetIntField(env, range, fid, + (*env)->SetIntField(env, range, fid, sopt->constraint.range->min); fid = (*env)->GetFieldID(env, rangeClass, "max", "I"); - (*env)->SetIntField(env, range, fid, + (*env)->SetIntField(env, range, fid, sopt->constraint.range->max); fid = (*env)->GetFieldID(env, rangeClass, "quant", "I"); - (*env)->SetIntField(env, range, fid, + (*env)->SetIntField(env, range, fid, sopt->constraint.range->quant); fid = (*env)->GetFieldID(env, optClass, "rangeConstraint", "LSaneRange;"); @@ -251,7 +251,7 @@ JNIEXPORT void JNICALL Java_Sane_getOptionNative jint *elements; int i; /* First word. is the length. */ - wordList = (*env)->NewIntArray(env, + wordList = (*env)->NewIntArray(env, sopt->constraint.word_list[0]); /* Copy in the integers. */ elements = (*env)->GetIntArrayElements(env, wordList, 0); @@ -272,7 +272,7 @@ JNIEXPORT void JNICALL Java_Sane_getOptionNative for (len = 0; sopt->constraint.string_list[len]; len++) ; - stringList = (*env)->NewObjectArray(env, len + 1, + stringList = (*env)->NewObjectArray(env, len + 1, stringClass, 0); /* Add each string. */ for (i = 0; i < len; i++) @@ -284,7 +284,7 @@ JNIEXPORT void JNICALL Java_Sane_getOptionNative /* 0 at end. */ (*env)->SetObjectArrayElement(env, stringList, len, 0); /* Set the field. */ - fid = (*env)->GetFieldID(env, optClass, + fid = (*env)->GetFieldID(env, optClass, "stringListConstraint", "[Ljava/lang/String;"); (*env)->SetObjectField(env, optObj, fid, stringList); } @@ -296,7 +296,7 @@ JNIEXPORT void JNICALL Java_Sane_getOptionNative * Signature: (II[I[I)I */ JNIEXPORT jint JNICALL Java_Sane_getControlOption__II_3I_3I - (JNIEnv *env, jobject jobj, jint handle, jint option, jintArray value, + (JNIEnv *env, jobject jobj, jint handle, jint option, jintArray value, jintArray info) { SANE_Status status; /* Gets status. */ @@ -318,7 +318,7 @@ JNIEXPORT jint JNICALL Java_Sane_getControlOption__II_3I_3I * Signature: (II[B[I)I */ JNIEXPORT jint JNICALL Java_Sane_getControlOption__II_3B_3I - (JNIEnv *env, jobject jobj, jint handle, jint option, jbyteArray value, + (JNIEnv *env, jobject jobj, jint handle, jint option, jbyteArray value, jintArray info) { SANE_Status status; /* Gets status. */ @@ -340,7 +340,7 @@ JNIEXPORT jint JNICALL Java_Sane_getControlOption__II_3B_3I * Signature: (IIII[I)I */ JNIEXPORT jint JNICALL Java_Sane_setControlOption__IIII_3I - (JNIEnv *env, jobject jobj, jint handle, jint option, jint action, + (JNIEnv *env, jobject jobj, jint handle, jint option, jint action, jint value, jintArray info) { SANE_Status status; /* Gets status. */ @@ -457,7 +457,7 @@ JNIEXPORT jint JNICALL Java_Sane_read /* Get actual data ptr. */ dataElements = (*env)->GetByteArrayElements(env, data, 0); /* Do the read. */ - status = sane_read((SANE_Handle) handle, dataElements, + status = sane_read((SANE_Handle) handle, dataElements, maxLength, &read_len); (*env)->ReleaseByteArrayElements(env, data, dataElements, 0); /* Return # bytes read. */ |