/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
* particular file as subject to the "Classpath" exception as provided
* by Oracle in the LICENSE file that accompanied this code.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
/* disable asserts in product mode */
#ifndef DEBUG
#ifndef NDEBUG
#define NDEBUG
#endif
#endif
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <assert.h>
#include <winscard.h>
// #define J2PCSC_DEBUG
#ifdef J2PCSC_DEBUG
#else
#define dprintf(s)
#endif
#include "sun_security_smartcardio_PCSC.h"
#include "pcsc_md.h"
// make the buffers larger than what should be necessary, just in case
}
if (code == SCARD_S_SUCCESS) {
return JNI_FALSE;
} else {
return JNI_TRUE;
}
}
return JNI_VERSION_1_4;
}
{
dprintf("-establishContext\n");
return 0;
}
// note: SCARDCONTEXT is typedef'd as long, so this works
}
/**
* Convert a multi string to a java string array,
*/
int cnt = 0;
while (*cp != 0) {
++cnt;
}
cnt = 0;
while (*cp != 0) {
}
while (cnt-- > 0) {
}
return result;
}
{
return NULL;
}
return NULL;
}
return result;
}
{
return 0;
}
}
{
unsigned char *sbuf;
return NULL;
}
return jOut;
}
{
return NULL;
}
return jArray;
}
{
return;
}
{
int i;
for (i = 0; i < readers; i++) {
readerState[i].cbAtr = 0;
}
for (i = 0; i < readers; i++) {
}
return jEventState;
}
{
return;
}
{
return;
}
{
#ifdef J2PCSC_DEBUG
{
int k;
printf("-send: ");
for (k = 0; k < sendBufferLength; k++) {
}
printf("\n");
}
#endif
return NULL;
}
#ifdef J2PCSC_DEBUG
{
int k;
printf("-recv: ");
for (k = 0; k < returnedLength; k++) {
}
printf("\n");
}
#endif
return jReceiveBuffer;
}