// Path: src/cn/com/tcc/TCC.java
// public static interface ErrorFunction extends Callback {
// 	public void callback(Pointer opaque, String msg);
// }
// 
// Path: src/cn/com/tcc/TCC.java
// protected static interface TCCLibrary extends Library {
// 	/* create a new TCC compilation context */
// 	public Pointer tcc_new();
// 
// 	/* free a TCC compilation context */
// 	public void tcc_delete(Pointer tccState);
// 
// 	/* set CONFIG_TCCDIR at runtime */
// 	public void tcc_set_lib_path(Pointer tccState, String path);
// 
// 	/* set error/warning display callback */
// 	public void tcc_set_error_func(Pointer tccState, Pointer error_opaque,
// 			Callback error_func);
// 
// 	public void tcc_set_error_func(Pointer tccState, Callback error_opaque,
// 			Callback error_func);
// 
// 	/* set options as from command line (multiple supported) */
// 	public int tcc_set_options(Pointer tccState, String str);
// 
// 	/*****************************/
// 	/* preprocessor */
// 
// 	/* add include path */
// 	public int tcc_add_include_path(Pointer tccState, String pathname);
// 
// 	/* add in system include path */
// 	public int tcc_add_sysinclude_path(Pointer tccState, String pathname);
// 
// 	/* define preprocessor symbol 'sym'. Can put optional value */
// 	public void tcc_define_symbol(Pointer tccState, String sym, String val);
// 
// 	/* undefine preprocess symbol 'sym' */
// 	public void tcc_undefine_symbol(Pointer tccState, String sym);
// 
// 	/*****************************/
// 	/* compiling */
// 
// 	/*
// 	 * add a file (C file, dll, object, library, ld script). Return -1 if
// 	 * error.
// 	 */
// 	public int tcc_add_file(Pointer tccState, String filename);
// 
// 	/* compile a string containing a C source. Return -1 if error. */
// 	public int tcc_compile_string(Pointer tccState, String buf);
// 
// 	/*****************************/
// 	/* linking commands */
// 
// 	/* set output type. MUST BE CALLED before any compilation */
// 	public int tcc_set_output_type(Pointer tccState, int type);
// 
// 	/* equivalent to -Lpath option */
// 	public int tcc_add_library_path(Pointer tccState, String pathname);
// 
// 	/* the library name is the same as the argument of the '-l' option */
// 	public int tcc_add_library(Pointer tccState, String libraryname);
// 
// 	/* add a symbol to the compiled program */
// 	public int tcc_add_symbol(Pointer tccState, String name, Pointer val);
// 
// 	public int tcc_add_symbol(Pointer tccState, String name, Callback val);
// 
// 	/*
// 	 * output an executable, library or object file. DO NOT call
// 	 * tcc_relocate() before.
// 	 */
// 	public int tcc_output_file(Pointer tccState, String filename);
// 
// 	/*
// 	 * link and run main() function and return its value. DO NOT call
// 	 * tcc_relocate() before.
// 	 */
// 	public int tcc_run(Pointer tccState, int argc, String[] argv);
// 
// 	/**
// 	 * do all relocations (needed before using tcc_get_symbol())
// 	 * 
// 	 * possible values for 'ptr':<br/>
// 	 * - TCC_RELOCATE_AUTO : Allocate and manage memory internally<br/>
// 	 * - NULL : return required memory size for the step below<br/>
// 	 * - memory address : copy code to memory passed by the caller<br/>
// 	 * returns -1 if error.
// 	 */
// 	public int tcc_relocate(Pointer tccState, Pointer ptr);
// 
// 	/* return symbol value or NULL if not found */
// 	public Pointer tcc_get_symbol(Pointer tccState, String name);
// 
// }


import java.io.File;
import java.io.IOException;
import org.apache.commons.io.FileUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import cn.com.tcc.TCC.ErrorFunction;
import cn.com.tcc.TCC.TCCLibrary;
import com.sun.jna.Callback;
import com.sun.jna.Function;
import com.sun.jna.NativeLong;
import com.sun.jna.Pointer;

package cn.com.tcc;





public class State {
	public static final int ERROR_RETURN_VALUE = -1;
	public final Pointer TCC_RELOCATE_AUTO = Pointer.createConstant(1);
	private final TCCLibrary tcc;
	private final Pointer tccState;
	private boolean deleted = false;
	@SuppressWarnings("unused")
	private Pointer errorOpaque = null;
	@SuppressWarnings("unused")
	private Callback errorOpaqueCallback = null;
	@SuppressWarnings("unused")

// Path: src/cn/com/tcc/TCC.java
// public static interface ErrorFunction extends Callback {
// 	public void callback(Pointer opaque, String msg);
// }
// 
// Path: src/cn/com/tcc/TCC.java
// protected static interface TCCLibrary extends Library {
// 	/* create a new TCC compilation context */
// 	public Pointer tcc_new();
// 
// 	/* free a TCC compilation context */
// 	public void tcc_delete(Pointer tccState);
// 
// 	/* set CONFIG_TCCDIR at runtime */
// 	public void tcc_set_lib_path(Pointer tccState, String path);
// 
// 	/* set error/warning display callback */
// 	public void tcc_set_error_func(Pointer tccState, Pointer error_opaque,
// 			Callback error_func);
// 
// 	public void tcc_set_error_func(Pointer tccState, Callback error_opaque,
// 			Callback error_func);
// 
// 	/* set options as from command line (multiple supported) */
// 	public int tcc_set_options(Pointer tccState, String str);
// 
// 	/*****************************/
// 	/* preprocessor */
// 
// 	/* add include path */
// 	public int tcc_add_include_path(Pointer tccState, String pathname);
// 
// 	/* add in system include path */
// 	public int tcc_add_sysinclude_path(Pointer tccState, String pathname);
// 
// 	/* define preprocessor symbol 'sym'. Can put optional value */
// 	public void tcc_define_symbol(Pointer tccState, String sym, String val);
// 
// 	/* undefine preprocess symbol 'sym' */
// 	public void tcc_undefine_symbol(Pointer tccState, String sym);
// 
// 	/*****************************/
// 	/* compiling */
// 
// 	/*
// 	 * add a file (C file, dll, object, library, ld script). Return -1 if
// 	 * error.
// 	 */
// 	public int tcc_add_file(Pointer tccState, String filename);
// 
// 	/* compile a string containing a C source. Return -1 if error. */
// 	public int tcc_compile_string(Pointer tccState, String buf);
// 
// 	/*****************************/
// 	/* linking commands */
// 
// 	/* set output type. MUST BE CALLED before any compilation */
// 	public int tcc_set_output_type(Pointer tccState, int type);
// 
// 	/* equivalent to -Lpath option */
// 	public int tcc_add_library_path(Pointer tccState, String pathname);
// 
// 	/* the library name is the same as the argument of the '-l' option */
// 	public int tcc_add_library(Pointer tccState, String libraryname);
// 
// 	/* add a symbol to the compiled program */
// 	public int tcc_add_symbol(Pointer tccState, String name, Pointer val);
// 
// 	public int tcc_add_symbol(Pointer tccState, String name, Callback val);
// 
// 	/*
// 	 * output an executable, library or object file. DO NOT call
// 	 * tcc_relocate() before.
// 	 */
// 	public int tcc_output_file(Pointer tccState, String filename);
// 
// 	/*
// 	 * link and run main() function and return its value. DO NOT call
// 	 * tcc_relocate() before.
// 	 */
// 	public int tcc_run(Pointer tccState, int argc, String[] argv);
// 
// 	/**
// 	 * do all relocations (needed before using tcc_get_symbol())
// 	 * 
// 	 * possible values for 'ptr':<br/>
// 	 * - TCC_RELOCATE_AUTO : Allocate and manage memory internally<br/>
// 	 * - NULL : return required memory size for the step below<br/>
// 	 * - memory address : copy code to memory passed by the caller<br/>
// 	 * returns -1 if error.
// 	 */
// 	public int tcc_relocate(Pointer tccState, Pointer ptr);
// 
// 	/* return symbol value or NULL if not found */
// 	public Pointer tcc_get_symbol(Pointer tccState, String name);
// 
// }


// Path: src/cn/com/tcc/State.java
import java.io.File;
import java.io.IOException;
import org.apache.commons.io.FileUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import cn.com.tcc.TCC.ErrorFunction;
import cn.com.tcc.TCC.TCCLibrary;
import com.sun.jna.Callback;
import com.sun.jna.Function;
import com.sun.jna.NativeLong;
import com.sun.jna.Pointer;

package cn.com.tcc;





public class State {
	public static final int ERROR_RETURN_VALUE = -1;
	public final Pointer TCC_RELOCATE_AUTO = Pointer.createConstant(1);
	private final TCCLibrary tcc;
	private final Pointer tccState;
	private boolean deleted = false;
	@SuppressWarnings("unused")
	private Pointer errorOpaque = null;
	@SuppressWarnings("unused")
	private Callback errorOpaqueCallback = null;
	@SuppressWarnings("unused")

	private ErrorFunction errorFunc = null;
