Index: raster/Makefile
===================================================================
--- raster/Makefile	(revision 36200)
+++ raster/Makefile	(working copy)
@@ -40,7 +40,6 @@
 	r.kappa \
 	r.lake \
 	r.le \
-	r.li \
 	r.los \
 	r.mapcalc \
 	r.median \
@@ -128,7 +127,7 @@
 
 include $(MODULE_TOPDIR)/include/Make/Platform.make
 
-ifneq ($(MINGW),)
+ifeq ($(MINGW),)
     SUBDIRS += r.li
 endif
 
Index: package.sh
===================================================================
--- package.sh	(revision 0)
+++ package.sh	(revision 0)
@@ -0,0 +1,50 @@
+set -e
+
+(
+echo
+echo
+echo
+
+if ! [ -f configure-stamp ]; then
+	echo $(date): STARTING configure
+
+	./configure \
+		--with-libs="/c/OSGeo4W/lib /c/MinGW/lib" \
+		--with-includes="/c/OSGeo4W/include /c/MinGW/include" \
+		--exec-prefix=/c/OSGeo4W/bin \
+		--libexecdir=/c/OSGeo4W/bin \
+		--prefix=/c/OSGeo4W/apps/grass \
+		--includedir=/c/OSGeo4W/include \
+		--disable-x --without-x \
+		--with-cxx \
+		--enable-shared \
+		--enable-largefile \
+		--with-opengl=windows \
+		--with-fftw \
+		--with-freetype \
+		--with-proj-share=/c/OSGeo4W/share/proj \
+		--with-gdal=/C/OSGeo4W/bin/gdal-config \
+		--with-tcltk \
+		--with-sqlite \
+		--with-postgres \
+		--with-curses \
+		--with-regex \
+		--with-nls \
+		--without-swig \
+		--with-freetype-includes=/c/OSGeo4W/include/freetype2
+
+	echo $(date): STARTING make clean
+	make clean
+
+	touch configure-stamp
+fi
+
+
+echo $(date): STARTING make
+make || make
+
+echo $(date): STARTING make install
+make install
+echo $(date): END
+
+) | tee -a package.log

Property changes on: package.sh
___________________________________________________________________
Added: svn:executable
   + *

Index: lib/vector/vedit/snap.c
===================================================================
--- lib/vector/vedit/snap.c	(revision 36200)
+++ lib/vector/vedit/snap.c	(working copy)
@@ -180,7 +180,7 @@
 		     int to_vertex)
 {
     int i, line, type;
-    int nlines_modified;
+    int nlines_modified = 0;
 
     struct line_pnts *Points;
     struct line_cats *Cats;
Index: lib/vector/vedit/select.c
===================================================================
--- lib/vector/vedit/select.c	(revision 36200)
+++ lib/vector/vedit/select.c	(working copy)
@@ -138,6 +138,12 @@
 {
     int ltype;
     double length;
+    int i, cat_curr;
+    int node1, node2, node;	/* nodes */
+    int nnode1, nnode2;	/* number of line in node */
+    double nx, ny, nz;	/* node coordinates */
+    struct ilist *exclude, *found;	/* line id of nearest lines */
+    struct line_cats *Cats_curr;
 
     if (!Vect_line_alive(Map, line))
 	return -1;
@@ -171,13 +177,6 @@
 	    return -1;
 	/* check if line is dangle */
 
-	int i, cat_curr;
-	int node1, node2, node;	/* nodes */
-	int nnode1, nnode2;	/* number of line in node */
-	double nx, ny, nz;	/* node coordinates */
-	struct ilist *exclude, *found;	/* line id of nearest lines */
-	struct line_cats *Cats_curr;
-
 	Vect_get_line_nodes(Map, line, &node1, &node2);
 
 	node = -1;
Index: lib/g3d/g3dcache.c
===================================================================
--- lib/g3d/g3dcache.c	(revision 36200)
+++ lib/g3d/g3dcache.c	(working copy)
@@ -121,7 +121,7 @@
 	return 0;
     }
 
-    index = *((int *)(xdr + nBytes));
+    index = *((int *)((unsigned char *)xdr + nBytes));
     map->index[index] = -pos - 2;
 
     map->cachePosLast--;
Index: lib/g3d/g3dmask.c
===================================================================
--- lib/g3d/g3dmask.c	(revision 36200)
+++ lib/g3d/g3dmask.c	(working copy)
@@ -309,12 +309,12 @@
 	for (dy = y; dy < rows; dy++) {
 	    for (dx = x; dx < cols; dx++) {
 		G3D_MASKNUM(map, dx, dy, dz, tile, type);
-		tile += length;
+		(unsigned char *)tile += length;
 	    }
 
-	    tile += xLength;
+	    (unsigned char *)tile += xLength;
 	}
-	tile += yLength;
+	(unsigned char *)tile += yLength;
     }
 }
 

Property changes on: lib/gis/dllmain.c
___________________________________________________________________
Added: svn:mergeinfo

Index: lib/gis/spawn.c
===================================================================
--- lib/gis/spawn.c	(revision 36200)
+++ lib/gis/spawn.c	(working copy)
@@ -204,7 +204,7 @@
 
 #ifdef __MINGW32__
 
-static int do_redirects(struct redirect *redirects, int num_redirects)
+static void do_redirects(struct redirect *redirects, int num_redirects)
 {
     if (num_redirects > 0)
 	G_fatal_error
Index: lib/gis/Makefile
===================================================================
--- lib/gis/Makefile	(revision 36200)
+++ lib/gis/Makefile	(working copy)
@@ -1,5 +1,7 @@
 MODULE_TOPDIR = ../..
 
+NOFILTEROUT=1
+
 GDAL_LINK = $(USE_GDAL)
 GDAL_DYNAMIC = 1
 
@@ -8,8 +10,10 @@
 DATASRC = ellipse.table datum.table datumtransform.table FIPS.code state27 state83 projections gui.tcl
 EXTRA_INC = $(ZLIBINCPATH)
 
+ifdef MinGW
 LIB_OBJS := $(subst .c,.o,$(wildcard *.c))
 LIB_OBJS := $(filter-out fmode.o dllmain.o,$(LIB_OBJS))
+endif
 
 include $(MODULE_TOPDIR)/include/Make/Lib.make
 include $(MODULE_TOPDIR)/include/Make/Doxygen.make
@@ -40,7 +44,7 @@
 
 endif
 
-default: $(DLLMAIN_OBJ) lib $(FMODE_OBJ) $(DATAFILES) $(COLORFILES) $(ETC)/colors.desc $(ETC)/element_list
+default: lib $(DATAFILES) $(COLORFILES) $(ETC)/colors.desc $(ETC)/element_list
 
 $(ETC)/colors:
 	$(MKDIR) $@
Index: lib/gis/gdal.c
===================================================================
--- lib/gis/gdal.c	(revision 36200)
+++ lib/gis/gdal.c	(working copy)
@@ -19,6 +19,8 @@
 # ifdef _WIN32
 #  include <windows.h>
 # endif
+# undef CPL_STDCALL
+# define CPL_STDCALL
 #endif
 
 static void CPL_STDCALL (*pGDALAllRegister)(void);
@@ -77,6 +79,8 @@
 	"libgdal.so",
 # endif
 # ifdef _WIN32
+  "gdal16.dll",
+  "gdal15.dll",
 	"gdal11.dll",
 	"gdal.1.0.dll",
 	"gdal.dll",
Index: include/Make/Lib.make
===================================================================
--- include/Make/Lib.make	(revision 36200)
+++ include/Make/Lib.make	(working copy)
@@ -11,6 +11,11 @@
 LIB_OBJS = $(subst .c,.o,$(wildcard *.c))
 endif
 
+ifndef NOFILTEROUT
+LIB_OBJS := $(filter-out fmode.o,$(LIB_OBJS))
+LIB_OBJS := $(filter-out dllmain.o,$(LIB_OBJS))
+endif
+
 ARCH_LIB_OBJS := $(foreach obj,$(LIB_OBJS),$(OBJDIR)/$(obj))
 
 STLIB_NAME = $(LIB_NAME)
Index: include/Make/Shlib.make
===================================================================
--- include/Make/Shlib.make	(revision 36200)
+++ include/Make/Shlib.make	(working copy)
@@ -3,9 +3,11 @@
 SHLIB = $(ARCH_LIBDIR)/$(SHLIB_PREFIX)$(SHLIB_NAME).$(GRASS_VERSION_NUMBER)$(SHLIB_SUFFIX)
 
 # Object that calls _setfmode(_O_BINARY) which must be linked to each DLL on Windows
+ifndef NOFILTEROUT
 ifdef MINGW
   DLLMAIN_OBJ = $(MODULE_TOPDIR)/lib/gis/$(OBJDIR)/dllmain.o
 endif
+endif
 
 CFLAGS += $(SHLIB_CFLAGS) $(NLS_CFLAGS)
 LDFLAGS += $(SHLIB_LDFLAGS)
Index: gui/wxpython/vdigit/digit.cpp
===================================================================
--- gui/wxpython/vdigit/digit.cpp	(revision 36200)
+++ gui/wxpython/vdigit/digit.cpp	(working copy)
@@ -15,6 +15,10 @@
 #include "driver.h"
 #include "digit.h"
 
+#ifndef _CPPRTTI
+#error "compile with /GR!"
+#endif
+
 /**
    \brief Initialize digit interface used by SWIG
 
Index: gui/wxpython/vdigit/driver.h
===================================================================
--- gui/wxpython/vdigit/driver.h	(revision 36200)
+++ gui/wxpython/vdigit/driver.h	(working copy)
@@ -24,6 +24,7 @@
 
 #include <Python.h>
 #include "pseudodc.h"
+#include <wx/gdicmn.h>
 
 extern "C" {
 #include <grass/gis.h>
Index: gui/wxpython/vdigit/setup.py
===================================================================
--- gui/wxpython/vdigit/setup.py	(revision 0)
+++ gui/wxpython/vdigit/setup.py	(revision 0)
@@ -0,0 +1,25 @@
+from distutils.core import setup, Extension
+
+setup(
+	ext_modules= [
+		Extension(
+			'_grass6_wxvdigit',
+			sources=[
+				"grass6_wxvdigit.i",
+				"cats.cpp",
+				"driver.cpp",
+				"driver_draw.cpp",
+				"driver_select.cpp",
+				"line.cpp",
+				"message.cpp",
+				"select.cpp",
+				"undo.cpp",
+				"vertex.cpp",
+				"pseudodc.cpp",
+				"digit.cpp"
+				],
+			swig_opts=['-c++','-shadow'],
+			libraries=['grass_dbmibase', 'grass_dbmiclient', 'grass_vect','grass_gis','grass_vedit','gdal_i', 'wxbase28u', 'wxmsw28u_core']
+		)
+	]
+)

Property changes on: gui/wxpython/vdigit/setup.py
___________________________________________________________________
Added: svn:executable
   + *

Index: gui/wxpython/vdigit/driver_draw.cpp
===================================================================
--- gui/wxpython/vdigit/driver_draw.cpp	(revision 36200)
+++ gui/wxpython/vdigit/driver_draw.cpp	(working copy)
@@ -19,6 +19,7 @@
 
 #include "driver.h"
 
+
 /**
    \brief Draw content of the vector map to device
    
@@ -193,7 +194,7 @@
     double x, y, z;
 
     // convert EN -> xy
-    wxPoint wxPoints[points->n_points];
+    wxPoint *wxPoints = new wxPoint[points->n_points];
 
     for (int i = 0; i < points->n_points; i++) {
 	Cell2Pixel(points->x[i], points->y[i], points->z[i],
@@ -204,6 +205,8 @@
     // draw polygon
     dc->DrawPolygon(points->n_points, wxPoints);
 
+    delete [] wxPoints;
+
     return 1;
 }
 
@@ -352,7 +355,7 @@
 		}
 	    }
 	    else {
-		wxPoint wxPoints[pointsScreen->GetCount()];
+		wxPoint *wxPoints = new wxPoint[pointsScreen->GetCount()];
 		for (size_t i = 0; i < pointsScreen->GetCount(); i++) {
 		    wxPoint *point_beg = (wxPoint *) pointsScreen->Item(i)->GetData();
 		    wxPoints[i] = *point_beg;
@@ -360,6 +363,8 @@
 		
 		pdc->DrawLines(pointsScreen->GetCount(), wxPoints);
 
+		delete [] wxPoints;
+
 		if (!IsSelected(line) && settings.direction.enabled) {
 		    DrawDirectionArrow();
 		    // restore pen
@@ -679,13 +684,13 @@
     double angle_symb;
 
     angle_symb = angle - M_PI / 2.;
-    x = x1 + size * std::cos(angle_symb);
-    y = y1 - size * std::sin(angle_symb);
+    x = x1 + size * cos(angle_symb);
+    y = y1 - size * sin(angle_symb);
     dc->DrawLine((wxCoord) x, (wxCoord) y, (wxCoord) x0, (wxCoord) y0);
     
     angle_symb = M_PI / 2. + angle;
-    x = x1 + size * std::cos(angle_symb);
-    y = y1 - size * std::sin(angle_symb);
+    x = x1 + size * cos(angle_symb);
+    y = y1 - size * sin(angle_symb);
     dc->DrawLine((wxCoord) x0, (wxCoord) y0, (wxCoord) x, (wxCoord) y);
 
     return 1;
Index: gui/wxpython/vdigit/message.cpp
===================================================================
--- gui/wxpython/vdigit/message.cpp	(revision 36200)
+++ gui/wxpython/vdigit/message.cpp	(working copy)
@@ -91,8 +91,7 @@
 void DisplayDriver::BackgroundMapMsg(const char *bgmap)
 {
     wxString msg;
-    msg.Printf(_("Unable to open background vector map <%s>. "
-		 "Please check digitizer settings."),
+    msg.Printf(_("Unable to open background vector map <%s>. Please check digitizer settings."),
 	       wxString (bgmap, wxConvUTF8).c_str());
     wxMessageDialog dlg(parentWin, msg,
 			msgCaption, wxOK | wxICON_ERROR | wxCENTRE);
Index: gui/wxpython/vdigit/driver.cpp
===================================================================
--- gui/wxpython/vdigit/driver.cpp	(revision 36200)
+++ gui/wxpython/vdigit/driver.cpp	(working copy)
@@ -234,7 +234,7 @@
     
     Cell2Pixel(region.map_west + dist, region.map_north, 0.0, &x, NULL, NULL);
 
-    return std::sqrt(x * x);
+    return sqrt(x * x);
 }
 
 /**
Index: gui/wxpython/nviz/setup.py
===================================================================
--- gui/wxpython/nviz/setup.py	(revision 0)
+++ gui/wxpython/nviz/setup.py	(revision 0)
@@ -0,0 +1,22 @@
+from distutils.core import setup, Extension
+
+setup(
+	ext_modules= [
+		Extension(
+			'_grass6_wxnviz',
+			sources=[
+				"grass6_wxnviz.i",
+				"change_view.cpp",
+				"draw.cpp",
+				"init.cpp",
+				"lights.cpp",
+				"load.cpp",
+				"surface.cpp",
+				"vector.cpp",
+				"volume.cpp",
+				],
+			swig_opts=['-c++','-shadow'],
+			libraries=['grass_gis','grass_nviz','grass_ogsf','grass_g3d']
+		)
+	]
+)

Property changes on: gui/wxpython/nviz/setup.py
___________________________________________________________________
Added: svn:executable
   + *

Index: gui/wxpython/nviz/nviz.h
===================================================================
--- gui/wxpython/nviz/nviz.h	(revision 36200)
+++ gui/wxpython/nviz/nviz.h	(working copy)
@@ -1,6 +1,9 @@
 #ifndef WXNVIZ_H
 #define WXNVIZ_H
 
+// For compilers that support precompilation, includes "wx.h".
+#include <wx/wxprec.h>
+
 #include <vector>
 
 extern "C" {
@@ -10,8 +13,6 @@
 #include <grass/gstypes.h>
 }
 
-// For compilers that support precompilation, includes "wx.h".
-#include <wx/wxprec.h>
 
 #ifdef __BORLANDC__
 #pragma hdrstop
Index: package.cmd
===================================================================
--- package.cmd	(revision 0)
+++ package.cmd	(revision 0)
@@ -0,0 +1,38 @@
+path %PATH%;%OSGEO4W_ROOT%\apps\swig
+set WXWIN=h:\windows\wxPython-src-2.8.9.1
+
+set GRASS_HOME=%OSGEO4W_ROOT%\apps\grass\grass-6.4.0RC3
+set GRASS_INC=%GRASS_HOME%\include
+set GRASS_LPATH=%GRASS_HOME%\lib
+
+set WX_INC=%WXWIN%\lib\vc_dll\mswud;%WXWIN%\lib\vc_dll\mswu;%WXWIN%\include
+set WXPY_INC=%WXWIN%\wxPython\include 
+set WX_LPATH=%OSGEO4W_ROOT%\lib;%WXWIN%\lib\vc_dll
+
+set OLD=%CD%
+cd %OLD%\gui\wxpython\nviz
+python setup.py build_ext -I %OSGEO4W_ROOT%\include;%GRASS_INC%;%WX_INC% -L %GRASS_LPATH%
+copy grass6_wxnviz.py                       %GRASS_HOME%\etc\wxpython\nviz
+copy build\lib.win32-2.5\_grass6_wxnviz.pyd %GRASS_HOME%\etc\wxpython\nviz
+if exist build\lib.win32-2.5\_grass6_wxnviz.pdb copy build\lib.win32-2.5\_grass6_wxnviz.pdb %GRASS_HOME%\etc\wxpython\nviz
+
+cd %OLD%\gui\wxpython\vdigit
+python setup.py build_ext -D WXUSINGDLL -I %OSGEO4W_ROOT%\include;%GRASS_INC%;%WX_INC%;%WXPY_INC% -L %GRASS_LPATH%;%WX_LPATH%
+copy grass6_wxvdigit.py                       %GRASS_HOME%\etc\wxpython\vdigit
+copy build\lib.win32-2.5\_grass6_wxvdigit.pyd %GRASS_HOME%\etc\wxpython\vdigit
+if exist build\lib.win32-2.5\_grass6_wxvdigit.pdb copy build\lib.win32-2.5\_grass6_wxvdigit.pdb %GRASS_HOME%\etc\wxpython\vdigit
+
+goto skip
+
+cd %OLD%\swig\python
+python setup.py build_ext -I %GRASS_INC%;%OSGEO4W_ROOT%\include -L %OSGEO4W_ROOT%\lib;%GRASS_LPATH%
+copy grass6_wxvdigit.py %GRASS_HOME%\etc\wxpython\
+copy build\lib.win32-2.5\_grass6_wxvdigit.pyd %GRASS_HOME%\etc\wxpython\vdigit
+
+cd %OLD%\swig\python\NumPtr
+python setup.py build_ext
+
+
+:skip
+
+cd %OLD%

