The great merge
git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/trunk@4141 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
parent
6fcc22a1f8
commit
516036631c
1508 changed files with 125983 additions and 44037 deletions
|
|
@ -1,4 +1,3 @@
|
|||
CC = gcc
|
||||
SRCS = matrix.c vector.c
|
||||
TARGET = matrix
|
||||
IFILE = package.i
|
||||
|
|
@ -10,11 +9,10 @@ all::
|
|||
SRCS='$(SRCS)' \
|
||||
TARGET=$(TARGET) \
|
||||
IFILE=$(IFILE) \
|
||||
CC=$(CC) \
|
||||
MODULE=$(MODULE) \
|
||||
sub-all
|
||||
|
||||
clean::
|
||||
rm -f matrix *_wrap* *~ .~* core
|
||||
$(MAKE) -f $(MKDIR)/Makefile TARGET='$(TARGET)' guile_clean
|
||||
|
||||
check: all
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
Matrix example. To run the example, execute the program 'matrix' and
|
||||
type the following :
|
||||
|
||||
(load 'matrix.scm)
|
||||
(load "matrix.scm")
|
||||
(do-test 0)
|
||||
|
||||
Alternatively, use the command-line:
|
||||
|
|
|
|||
|
|
@ -1,4 +1,6 @@
|
|||
/* FILE : matrix.c : some simple 4x4 matrix operations */
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
|
||||
double **new_matrix() {
|
||||
|
||||
|
|
|
|||
|
|
@ -12,7 +12,8 @@ double get_m(double **M, int i, int j) {
|
|||
}
|
||||
%}
|
||||
|
||||
%section "Matrix Operations"
|
||||
/*** Matrix Operations ***/
|
||||
|
||||
extern double **new_matrix();
|
||||
/* Creates a new matrix and returns a pointer to it */
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,8 @@
|
|||
// FILE : package.i
|
||||
// See the SWIG users manual
|
||||
|
||||
%title "Matrix and vector package"
|
||||
/*** Matrix and vector package ***/
|
||||
|
||||
%module Matrix
|
||||
%{
|
||||
#include <math.h>
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
/* File : vector.c */
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include "vector.h"
|
||||
|
||||
Vector *createv(double x, double y, double z, double w) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue