Hi, the attached diff output shows what I did to get the parts to work.
Can it be applied? cheers, Rich
diff -c4 -r grafix_orig/calc.c grafix/calc.c *** grafix_orig/calc.c 2003-11-11 21:37:04.000000000 +0000 --- grafix/calc.c 2003-11-11 20:58:43.000000000 +0000 *************** *** 82,102 **** static void divi(int &x, int y) { if (y == 0) y = 1; x /= y; } static void divq(int &x, int y) { if (y == 0) y = 1; x %= y; } static void eq(int &x, int y) { x = y; } ! static void and(int &x, int y) { x &= y; } ! static void or(int &x, int y) { x |= y; } ! static void xor(int &x, int y) { x ^= y; } ! static void shl(int &x, int y) { x <<= y; } ! static void shr(int &x, int y) { x >>= y; } struct op_struct {char *Name; OP opf; }; op_struct arith[] = { {"+",plus}, {"-",minus}, {"*",mult}, {"/",divi}, {"%",divq}, {"=",eq} }; ! op_struct bitops[] = { {"&",and }, {"|",or }, { "^", xor}, ! {"<<",shl}, {">>",shr} }; class operator_button : public button { op_struct *opp; public: --- 82,102 ---- static void divi(int &x, int y) { if (y == 0) y = 1; x /= y; } static void divq(int &x, int y) { if (y == 0) y = 1; x %= y; } static void eq(int &x, int y) { x = y; } ! static void oand(int &x, int y) { x &= y; } ! static void oor(int &x, int y) { x |= y; } ! static void oxor(int &x, int y) { x ^= y; } ! static void oshl(int &x, int y) { x <<= y; } ! static void oshr(int &x, int y) { x >>= y; } struct op_struct {char *Name; OP opf; }; op_struct arith[] = { {"+",plus}, {"-",minus}, {"*",mult}, {"/",divi}, {"%",divq}, {"=",eq} }; ! op_struct bitops[] = { {"&",oand }, {"|",oor }, { "^", oxor}, ! {"<<",oshl}, {">>",oshr} }; class operator_button : public button { op_struct *opp; public: diff -c4 -r grafix_orig/clock-demo.c grafix/clock-demo.c *** grafix_orig/clock-demo.c 2003-11-11 21:37:04.000000000 +0000 --- grafix/clock-demo.c 2003-11-11 20:58:58.000000000 +0000 *************** *** 5,12 **** --- 5,13 ---- #include "window.h" #include <sys/types.h> #include <sys/time.h> + #include <time.h> clock_win *clck1, *clck2; extern "C" void sleep(int); Only in grafix: cscope.out diff -c4 -r grafix_orig/earth.c grafix/earth.c *** grafix_orig/earth.c 2003-11-11 21:37:04.000000000 +0000 --- grafix/earth.c 2003-11-11 21:26:35.000000000 +0000 *************** *** 8,16 **** #define MAP_DATA_SCALE (30000) extern short map_data[]; // the data #undef Complex // this is defined in the Xlib (included by window.h) !! ! #include <Complex.h> double grd2rad = 180./M_PI; extern int button_fg_pix; // from window.c struct pos3 { // 3-dim position --- 8,17 ---- #define MAP_DATA_SCALE (30000) extern short map_data[]; // the data #undef Complex // this is defined in the Xlib (included by window.h) !! ! #include <complex> ! #define Complex std::complex<double> double grd2rad = 180./M_PI; extern int button_fg_pix; // from window.c struct pos3 { // 3-dim position diff -c4 -r grafix_orig/mandel.c grafix/mandel.c *** grafix_orig/mandel.c 2003-11-11 21:37:04.000000000 +0000 --- grafix/mandel.c 2003-11-11 21:26:26.000000000 +0000 *************** *** 2,15 **** // wolf 1/97 - 3/00 #include "window.h" #undef Complex ! #include <Complex.h> static int itmax = 256, limit = 100; static char *itmenue = "itmax", *limenue = "limit"; ! inline int iterate(const Complex& c) { int it = 0; // Complex z = 0; // do { z = z*z + c; if (++it == itmax) break; } while (norm(z) < limit); return it; double cx = real(c), cy = imag(c); --- 2,16 ---- // wolf 1/97 - 3/00 #include "window.h" #undef Complex ! #include <complex> ! #define Complex std::complex<double> static int itmax = 256, limit = 100; static char *itmenue = "itmax", *limenue = "limit"; ! inline int iterate(Complex c) { int it = 0; // Complex z = 0; // do { z = z*z + c; if (++it == itmax) break; } while (norm(z) < limit); return it; double cx = real(c), cy = imag(c); Only in grafix: three-dim.video
-- rich walker | Shadow Robot Company | [EMAIL PROTECTED] technical director 251 Liverpool Road | need a Hand? London N1 1LX | +UK 20 7700 2487 www.shadow.org.uk/products/newhand.shtml