Merged with recent changes from trunk.
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/gsoc2008-maciekd@11187 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
da5ade3143
commit
8c74fa0f46
703 changed files with 21126 additions and 9266 deletions
|
|
@ -1,8 +1,8 @@
|
|||
This example runs the entire gifplot.h header file through SWIG without
|
||||
any changes. The program 'main.java' does something a little more
|
||||
interesting. After doing a make, run it using 'java main'. You'll have to go
|
||||
any changes. The program 'runme.java' does something a little more
|
||||
interesting. After doing a make, run it using 'java runme'. You'll have to go
|
||||
look at the header file to get a complete listing of the functions.
|
||||
|
||||
Note the differences in the main.java files between this example and the
|
||||
Note the differences in the runme.java files between this example and the
|
||||
'full' example. This example does not use shadow classes.
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
// Plot a 3D function
|
||||
import java.lang.Math;
|
||||
|
||||
public class main {
|
||||
public class runme {
|
||||
|
||||
static {
|
||||
try {
|
||||
|
|
@ -1,8 +1,9 @@
|
|||
TOP = ../../..
|
||||
SWIG = $(TOP)/../swig
|
||||
SWIGOPT = -I../../Interface
|
||||
SWIGOPT = -outcurrentdir
|
||||
SRCS =
|
||||
TARGET = gifplot
|
||||
INTERFACEDIR = ../../Interface/
|
||||
INTERFACE = gifplot.i
|
||||
LIBS = -L../.. -lgifplot
|
||||
INCLUDES = -I../../Include
|
||||
|
|
@ -10,7 +11,7 @@ INCLUDES = -I../../Include
|
|||
all::
|
||||
$(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
|
||||
INCLUDES='$(INCLUDES)' LIBS='$(LIBS)' SWIGOPT='$(SWIGOPT)' \
|
||||
TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' java
|
||||
TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' INTERFACEDIR='$(INTERFACEDIR)' java
|
||||
javac *.java
|
||||
|
||||
clean::
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
This example uses the file in ../../Interface/gifplot.i to build
|
||||
an interface with shadow classes. After doing a make, run the program main, ie: 'java main'.
|
||||
an interface with shadow classes. After doing a make, run the program runme, ie: 'java runme'.
|
||||
|
||||
Note the differences in the main.java files between this example and the
|
||||
Note the differences in the runme.java files between this example and the
|
||||
'full' example. This example uses the shadow classes.
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
import java.lang.Math;
|
||||
|
||||
public class main {
|
||||
public class runme {
|
||||
|
||||
static {
|
||||
try {
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
This is a very minimalistic example in which just a few functions
|
||||
and constants from library are wrapped and used to draw some simple
|
||||
shapes. After doing a make, run the java program, ie 'java main'.
|
||||
shapes. After doing a make, run the java program, ie 'java runme'.
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
|
||||
public class main {
|
||||
public class runme {
|
||||
|
||||
static {
|
||||
try {
|
||||
|
|
@ -132,7 +132,10 @@ int ColorMap_write(ColorMap *cm, char *filename) {
|
|||
|
||||
f = fopen(filename,"w");
|
||||
|
||||
fwrite(cm->cmap,768,1,f);
|
||||
if (fwrite(cm->cmap,768,1,f) != 1) {
|
||||
fclose(f);
|
||||
return -1;
|
||||
}
|
||||
fclose(f);
|
||||
return 0;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -268,7 +268,7 @@ static int maxmaxcode = 1 << GP_BITS; /* NEVER generate this */
|
|||
|
||||
static count_int *htab;
|
||||
static unsigned short *codetab;
|
||||
static GIFOutBufSize;
|
||||
static int GIFOutBufSize;
|
||||
|
||||
/* static count_int htab [HSIZE];
|
||||
static unsigned short codetab [HSIZE]; */
|
||||
|
|
@ -656,7 +656,11 @@ int FrameBuffer_writeGIF(FrameBuffer *f, ColorMap *c, char *filename) {
|
|||
fclose(file);
|
||||
return -1;
|
||||
}
|
||||
fwrite(buffer,nbytes,1,file);
|
||||
if (fwrite(buffer,nbytes,1,file) != 1) {
|
||||
free(buffer);
|
||||
fclose(file);
|
||||
return -1;
|
||||
}
|
||||
fclose(file);
|
||||
free(buffer);
|
||||
return 0;
|
||||
|
|
|
|||
|
|
@ -1,8 +1,9 @@
|
|||
TOP = ../../..
|
||||
SWIG = $(TOP)/../swig
|
||||
SWIGOPT = -I../../Interface
|
||||
SWIGOPT = -outcurrentdir
|
||||
SRCS =
|
||||
TARGET = gifplot
|
||||
INTERFACEDIR = ../../Interface/
|
||||
INTERFACE = gifplot.i
|
||||
LIBS = -L../.. -lgifplot -lm
|
||||
INCLUDES = -I../../Include
|
||||
|
|
@ -10,12 +11,12 @@ INCLUDES = -I../../Include
|
|||
all::
|
||||
$(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
|
||||
INCLUDES='$(INCLUDES)' LIBS='$(LIBS)' SWIGOPT='$(SWIGOPT)' \
|
||||
TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' perl5
|
||||
TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' INTERFACEDIR='$(INTERFACEDIR)' perl5
|
||||
|
||||
static::
|
||||
$(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
|
||||
INCLUDES='$(INCLUDES)' LIBS='$(LIBS)' SWIGOPT='$(SWIGOPT)' \
|
||||
TARGET='myperl' INTERFACE='$(INTERFACE)' perl5_static
|
||||
TARGET='myperl' INTERFACE='$(INTERFACE)' INTERFACEDIR='$(INTERFACEDIR)' perl5_static
|
||||
|
||||
clean::
|
||||
$(MAKE) -f $(TOP)/Makefile perl5_clean
|
||||
|
|
|
|||
|
|
@ -10,10 +10,10 @@ INCLUDES = -I../../Include
|
|||
all::
|
||||
$(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
|
||||
INCLUDES='$(INCLUDES)' LIBS='$(LIBS)' SWIGOPT='$(SWIGOPT)' \
|
||||
TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' php4
|
||||
TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' php
|
||||
|
||||
clean::
|
||||
$(MAKE) -f $(TOP)/Makefile php4_clean
|
||||
$(MAKE) -f $(TOP)/Makefile php_clean
|
||||
rm -f *.gif
|
||||
rm -f php_gifplot.h
|
||||
|
||||
|
|
@ -10,10 +10,10 @@ INCLUDES = -I../../Include
|
|||
all::
|
||||
$(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
|
||||
INCLUDES='$(INCLUDES)' LIBS='$(LIBS)' SWIGOPT='$(SWIGOPT)' \
|
||||
TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' php4
|
||||
TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' php
|
||||
|
||||
clean::
|
||||
$(MAKE) -f $(TOP)/Makefile php4_clean
|
||||
$(MAKE) -f $(TOP)/Makefile php_clean
|
||||
rm -f *.gif
|
||||
|
||||
check: all
|
||||
|
|
@ -10,10 +10,10 @@ INCLUDES = -I../../Include
|
|||
all::
|
||||
$(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
|
||||
INCLUDES='$(INCLUDES)' LIBS='$(LIBS)' SWIGOPT='$(SWIGOPT)' \
|
||||
TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' php4
|
||||
TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' php
|
||||
|
||||
clean::
|
||||
$(MAKE) -f $(TOP)/Makefile php4_clean
|
||||
$(MAKE) -f $(TOP)/Makefile php_clean
|
||||
rm -f *.gif
|
||||
rm -f php_simple.h
|
||||
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
TOP = ../../..
|
||||
SWIG = $(TOP)/../swig
|
||||
SWIG = $(TOP)/../preinst-swig
|
||||
SWIGOPT = -I../../Include
|
||||
SRCS =
|
||||
TARGET = gifplot
|
||||
|
|
@ -23,3 +23,4 @@ clean::
|
|||
rm -f *.gif
|
||||
|
||||
check: all
|
||||
$(MAKE) -f $(TOP)/Makefile python_run
|
||||
|
|
|
|||
|
|
@ -1,8 +1,9 @@
|
|||
TOP = ../../..
|
||||
SWIG = $(TOP)/../swig
|
||||
SWIGOPT = -I../../Interface
|
||||
SWIG = $(TOP)/../preinst-swig
|
||||
SWIGOPT = -outcurrentdir
|
||||
SRCS =
|
||||
TARGET = gifplot
|
||||
INTERFACEDIR = ../../Interface/
|
||||
INTERFACE = gifplot.i
|
||||
LIBS = -L../.. -lgifplot
|
||||
INCLUDES = -I../../Include
|
||||
|
|
@ -10,12 +11,12 @@ INCLUDES = -I../../Include
|
|||
all::
|
||||
$(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
|
||||
INCLUDES='$(INCLUDES)' LIBS='$(LIBS)' SWIGOPT='$(SWIGOPT)' \
|
||||
TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' python
|
||||
TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' INTERFACEDIR='$(INTERFACEDIR)' python
|
||||
|
||||
static::
|
||||
$(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
|
||||
INCLUDES='$(INCLUDES)' LIBS='$(LIBS)' SWIGOPT='$(SWIGOPT)' \
|
||||
TARGET='mypython' INTERFACE='$(INTERFACE)' python_static
|
||||
TARGET='mypython' INTERFACE='$(INTERFACE)' INTERFACEDIR='$(INTERFACEDIR)' python_static
|
||||
|
||||
clean::
|
||||
$(MAKE) -f $(TOP)/Makefile python_clean
|
||||
|
|
@ -23,3 +24,4 @@ clean::
|
|||
rm -f *.gif
|
||||
|
||||
check: all
|
||||
$(MAKE) -f $(TOP)/Makefile python_run
|
||||
|
|
|
|||
|
|
@ -1,5 +1,5 @@
|
|||
TOP = ../../..
|
||||
SWIG = $(TOP)/../swig
|
||||
SWIG = $(TOP)/../preinst-swig
|
||||
SWIGOPT =
|
||||
SRCS =
|
||||
TARGET = simple
|
||||
|
|
@ -23,3 +23,4 @@ clean::
|
|||
rm -f *.gif
|
||||
|
||||
check: all
|
||||
$(MAKE) -f $(TOP)/Makefile python_run
|
||||
|
|
|
|||
|
|
@ -1,8 +1,9 @@
|
|||
TOP = ../../..
|
||||
SWIG = $(TOP)/../swig
|
||||
SWIGOPT = -I../../Interface
|
||||
SWIGOPT = -outcurrentdir
|
||||
SRCS =
|
||||
TARGET = gifplot
|
||||
INTERFACEDIR = ../../Interface/
|
||||
INTERFACE = gifplot.i
|
||||
LIBS = -L../.. -lgifplot
|
||||
INCLUDES = -I../../Include
|
||||
|
|
@ -10,12 +11,12 @@ INCLUDES = -I../../Include
|
|||
all::
|
||||
$(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
|
||||
INCLUDES='$(INCLUDES)' LIBS='$(LIBS)' SWIGOPT='$(SWIGOPT)' \
|
||||
TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' ruby
|
||||
TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' INTERFACEDIR='$(INTERFACEDIR)' ruby
|
||||
|
||||
static::
|
||||
$(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
|
||||
INCLUDES='$(INCLUDES)' LIBS='$(LIBS)' SWIGOPT='$(SWIGOPT)' \
|
||||
TARGET='myruby' INTERFACE='$(INTERFACE)' ruby_static
|
||||
TARGET='myruby' INTERFACE='$(INTERFACE)' INTERFACEDIR='$(INTERFACEDIR)' ruby_static
|
||||
|
||||
clean::
|
||||
$(MAKE) -f $(TOP)/Makefile ruby_clean
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue