aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/com/sun/gluegen/JavaConfiguration.java
diff options
context:
space:
mode:
authorKenneth Russel <[email protected]>2008-07-06 01:03:35 +0000
committerKenneth Russel <[email protected]>2008-07-06 01:03:35 +0000
commit9df128e4eae30352d2ff440554ef067eef3ca793 (patch)
tree6e5b65a30e81998c5e76bf81a75314c4c6adae15 /src/java/com/sun/gluegen/JavaConfiguration.java
parent649888422631e3bec8fa0f60afa99bc690992d71 (diff)
Fixed Windows-specific problem with locally generated function pointer
typedefs where the calling convention was not specified. Provided new LocalProcAddressCallingConvention directive to allow developer to specify the calling convention on a per-function basis; used this in gl-es1.cfg and gl-es2.cfg. Changed GLEmitter to force the calling convention of the locally typedefed function pointers for OpenGL function name unification to GL_APIENTRY, compatible with OpenGL ES 1 and OpenGL ES 2. Changed generated native glue code to #define GL_APIENTRY appropriately on the desktop. Refactored custom C code. git-svn-id: file:///usr/local/projects/SUN/JOGL/git-svn/../svn-server-sync/gluegen/branches/JOGL_2_SANDBOX@96 a78bb65f-1512-4460-ba86-f6dc96a7bf27
Diffstat (limited to 'src/java/com/sun/gluegen/JavaConfiguration.java')
-rw-r--r--src/java/com/sun/gluegen/JavaConfiguration.java11
1 files changed, 7 insertions, 4 deletions
diff --git a/src/java/com/sun/gluegen/JavaConfiguration.java b/src/java/com/sun/gluegen/JavaConfiguration.java
index e7787fc..8cde267 100644
--- a/src/java/com/sun/gluegen/JavaConfiguration.java
+++ b/src/java/com/sun/gluegen/JavaConfiguration.java
@@ -1018,8 +1018,12 @@ public class JavaConfiguration {
protected void readCustomJavaCode(StringTokenizer tok, String filename, int lineNo) {
try {
String className = tok.nextToken();
- String restOfLine = tok.nextToken("\n\r\f");
- addCustomJavaCode(className, restOfLine);
+ try {
+ String restOfLine = tok.nextToken("\n\r\f");
+ addCustomJavaCode(className, restOfLine);
+ } catch (NoSuchElementException e) {
+ addCustomJavaCode(className, "");
+ }
} catch (NoSuchElementException e) {
throw new RuntimeException("Error parsing \"CustomJavaCode\" command at line " + lineNo +
" in file \"" + filename + "\"", e);
@@ -1036,8 +1040,7 @@ public class JavaConfiguration {
String restOfLine = tok.nextToken("\n\r\f");
customCCode.add(restOfLine);
} catch (NoSuchElementException e) {
- throw new RuntimeException("Error parsing \"CustomCCode\" command at line " + lineNo +
- " in file \"" + filename + "\"", e);
+ customCCode.add("");
}
}