summaryrefslogtreecommitdiff
path: root/Examples/modula3/reference
diff options
context:
space:
mode:
Diffstat (limited to 'Examples/modula3/reference')
-rw-r--r--Examples/modula3/reference/Makefile6
-rw-r--r--Examples/modula3/reference/example.cxx2
-rw-r--r--Examples/modula3/reference/example.h4
3 files changed, 6 insertions, 6 deletions
diff --git a/Examples/modula3/reference/Makefile b/Examples/modula3/reference/Makefile
index 1a5fdeb30..3b68fe822 100644
--- a/Examples/modula3/reference/Makefile
+++ b/Examples/modula3/reference/Makefile
@@ -7,14 +7,14 @@ SWIGOPT = -c++
MODULA3SRCS = *.[im]3
check: build
- $(MAKE) -f $(TOP)/Makefile modula3_run
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' modula3_run
build:
- $(MAKE) -f $(TOP)/Makefile SRCS='$(SRCS)' SWIG='$(SWIG)' \
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' SRCS='$(SRCS)' SWIG='$(SWIG)' \
SWIGOPT='$(SWIGOPT)' TARGET='$(TARGET)' INTERFACE='$(INTERFACE)' modula3
m3ppinplace $(MODULA3SRCS)
mv m3makefile $(MODULA3SRCS) src/
cm3
clean:
- $(MAKE) -f $(TOP)/Makefile modula3_clean
+ $(MAKE) -f $(TOP)/Makefile SRCDIR='$(SRCDIR)' modula3_clean
diff --git a/Examples/modula3/reference/example.cxx b/Examples/modula3/reference/example.cxx
index 649b0169c..9dbaed2ee 100644
--- a/Examples/modula3/reference/example.cxx
+++ b/Examples/modula3/reference/example.cxx
@@ -19,7 +19,7 @@ Vector operator+(const Vector &a, const Vector &b) {
char *Vector::print() {
static char temp[512];
- sprintf(temp,"Vector %x (%g,%g,%g)", (int)this, x,y,z);
+ sprintf(temp,"Vector %p (%g,%g,%g)", (void *)this, x,y,z);
return temp;
}
diff --git a/Examples/modula3/reference/example.h b/Examples/modula3/reference/example.h
index 0a9cd447f..7b4ba8fb8 100644
--- a/Examples/modula3/reference/example.h
+++ b/Examples/modula3/reference/example.h
@@ -4,8 +4,8 @@ struct Vector {
private:
double x,y,z;
public:
- Vector() : x(0), y(0), z(0) { };
- Vector(double x, double y, double z) : x(x), y(y), z(z) { };
+ Vector() : x(0), y(0), z(0) { }
+ Vector(double x, double y, double z) : x(x), y(y), z(z) { }
Vector operator+(const Vector &b) const;
char *print();
};