< prev index next >

src/java.base/share/native/libzip/zip_util.c

Print this page
rev 49551 : 8201226: missing JNIEXPORT / JNICALL at some places in function declarations/implementations

*** 879,889 **** * Opens a zip file for reading. Returns the jzfile object or NULL * if an error occurred. If a zip error occurred then *msg will be * set to the error message text if msg != 0. Otherwise, *msg will be * set to NULL. Caller doesn't need to free the error message. */ ! JNIEXPORT jzfile * JNICALL ZIP_Open(const char *name, char **pmsg) { jzfile *file = ZIP_Open_Generic(name, pmsg, O_RDONLY, 0); if (file == NULL && pmsg != NULL && *pmsg != NULL) { free(*pmsg); --- 879,889 ---- * Opens a zip file for reading. Returns the jzfile object or NULL * if an error occurred. If a zip error occurred then *msg will be * set to the error message text if msg != 0. Otherwise, *msg will be * set to NULL. Caller doesn't need to free the error message. */ ! JNIEXPORT jzfile * ZIP_Open(const char *name, char **pmsg) { jzfile *file = ZIP_Open_Generic(name, pmsg, O_RDONLY, 0); if (file == NULL && pmsg != NULL && *pmsg != NULL) { free(*pmsg);
*** 893,903 **** } /* * Closes the specified zip file object. */ ! JNIEXPORT void JNICALL ZIP_Close(jzfile *zip) { MLOCK(zfiles_lock); if (--zip->refs > 0) { /* Still more references so just return */ --- 893,903 ---- } /* * Closes the specified zip file object. */ ! JNIEXPORT void ZIP_Close(jzfile *zip) { MLOCK(zfiles_lock); if (--zip->refs > 0) { /* Still more references so just return */
*** 1113,1123 **** /* * Returns the zip entry corresponding to the specified name, or * NULL if not found. */ ! JNIEXPORT jzentry * JNICALL ZIP_GetEntry(jzfile *zip, char *name, jint ulen) { if (ulen == 0) { return ZIP_GetEntry2(zip, name, (jint)strlen(name), JNI_FALSE); } --- 1113,1123 ---- /* * Returns the zip entry corresponding to the specified name, or * NULL if not found. */ ! JNIEXPORT jzentry * ZIP_GetEntry(jzfile *zip, char *name, jint ulen) { if (ulen == 0) { return ZIP_GetEntry2(zip, name, (jint)strlen(name), JNI_FALSE); }
*** 1236,1246 **** /* * Returns the n'th (starting at zero) zip file entry, or NULL if the * specified index was out of range. */ ! JNIEXPORT jzentry * JNICALL ZIP_GetNextEntry(jzfile *zip, jint n) { jzentry *result; if (n < 0 || n >= zip->total) { return 0; --- 1236,1246 ---- /* * Returns the n'th (starting at zero) zip file entry, or NULL if the * specified index was out of range. */ ! JNIEXPORT jzentry * ZIP_GetNextEntry(jzfile *zip, jint n) { jzentry *result; if (n < 0 || n >= zip->total) { return 0;
*** 1437,1447 **** /* * The current implementation does not support reading an entry that * has the size bigger than 2**32 bytes in ONE invocation. */ ! JNIEXPORT jzentry * JNICALL ZIP_FindEntry(jzfile *zip, char *name, jint *sizeP, jint *nameLenP) { jzentry *entry = ZIP_GetEntry(zip, name, 0); if (entry) { *sizeP = (jint)entry->size; --- 1437,1447 ---- /* * The current implementation does not support reading an entry that * has the size bigger than 2**32 bytes in ONE invocation. */ ! JNIEXPORT jzentry * ZIP_FindEntry(jzfile *zip, char *name, jint *sizeP, jint *nameLenP) { jzentry *entry = ZIP_GetEntry(zip, name, 0); if (entry) { *sizeP = (jint)entry->size;
*** 1454,1464 **** * Reads a zip file entry into the specified byte array * When the method completes, it releases the jzentry. * Note: this is called from the separately delivered VM (hotspot/classic) * so we have to be careful to maintain the expected behaviour. */ ! JNIEXPORT jboolean JNICALL ZIP_ReadEntry(jzfile *zip, jzentry *entry, unsigned char *buf, char *entryname) { char *msg; char tmpbuf[1024]; --- 1454,1464 ---- * Reads a zip file entry into the specified byte array * When the method completes, it releases the jzentry. * Note: this is called from the separately delivered VM (hotspot/classic) * so we have to be careful to maintain the expected behaviour. */ ! JNIEXPORT jboolean ZIP_ReadEntry(jzfile *zip, jzentry *entry, unsigned char *buf, char *entryname) { char *msg; char tmpbuf[1024];
*** 1513,1523 **** ZIP_FreeEntry(zip, entry); return JNI_TRUE; } ! JNIEXPORT jboolean JNICALL ZIP_InflateFully(void *inBuf, jlong inLen, void *outBuf, jlong outLen, char **pmsg) { z_stream strm; int i = 0; memset(&strm, 0, sizeof(z_stream)); --- 1513,1523 ---- ZIP_FreeEntry(zip, entry); return JNI_TRUE; } ! JNIEXPORT jboolean ZIP_InflateFully(void *inBuf, jlong inLen, void *outBuf, jlong outLen, char **pmsg) { z_stream strm; int i = 0; memset(&strm, 0, sizeof(z_stream));
< prev index next >