// com.mindprod.JNIexper.Glue.c
#include <windows.h>

/**
 * Must have previously generated the glue.h file with
 * javah.
 * You must have
 * e:\program files\java\jdk1.5.0_04\include\win32
 * and e:\program files\java\jdk1.5.0_04\include\win32
 * in tools | options | directories | include
 * set Options | Project | Directory include path to:
 * Make sure target expert says: DLL, Win32 console, static
 * Project | Options | Linker | General is no debug
 */

// generated by  javah.exe -jni -o glue.h com.mindprod.JNIexper.Glue
#include "Glue.h"

/**
* Wrapper C native method.
* Calculate how many bits wide a number is,
* i.e. position of highest 1 bit.
* @return p where 2**p is first power of two >= n.
* e.g. binary 0001_0101 -> 5, 0xffffffff -> 32,
* 0 -> 0, 1 -> 1, 2 -> 2, 3 -> 2, 4 -> 3
*
* public static native int widthInBits( int n);
*
* Class: com_mindprod_JNIexper_Glue
* Method: widthInBits
* Signature: (I)I
*/
JNIEXPORT jint JNICALL Java_com_mindprod_JNIexper_Glue_widthInBits(JNIEnv *env, jclass thisClass, jint n)
   {
   /* ... */
   return n;
   } // end widthInBits

// end Glue