Browse Source

swig also removed from trunk

git-svn-id: https://svn.osgeo.org/grass/grass/trunk@43247 15284696-431f-4ddb-bdfa-cd5b030d7da7
Martin Landa 14 năm trước cách đây
mục cha
commit
4cfb2dbfaa
80 tập tin đã thay đổi với 0 bổ sung7156 xóa
  1. 0 2
      Makefile
  2. 0 18
      swig/Makefile
  3. 0 8
      swig/include/arraystats.i
  4. 0 8
      swig/include/cluster.i
  5. 0 9
      swig/include/date.i
  6. 0 8
      swig/include/dbmi.i
  7. 0 8
      swig/include/display.i
  8. 0 8
      swig/include/g3d.i
  9. 0 36
      swig/include/grass.i
  10. 0 9
      swig/include/imagery.i
  11. 0 8
      swig/include/math.i
  12. 0 8
      swig/include/proj.i
  13. 0 19
      swig/include/python/common.i
  14. 0 294
      swig/include/python/my_typemaps.i
  15. 0 75
      swig/include/python/utils.i
  16. 0 10
      swig/include/raster.i
  17. 0 9
      swig/include/stats.i
  18. 0 8
      swig/include/trans.i
  19. 0 11
      swig/include/vector.i
  20. 0 8
      swig/include/vedit.i
  21. 0 158
      swig/license.mbox
  22. 0 812
      swig/perl/Grass.pm
  23. 0 24
      swig/perl/MANIFEST
  24. 0 10
      swig/perl/META.yml
  25. 0 29
      swig/perl/Makefile.PL.in
  26. 0 47
      swig/perl/README
  27. 0 6
      swig/perl/R_slope_aspect/Changes
  28. 0 10
      swig/perl/R_slope_aspect/MANIFEST
  29. 0 24
      swig/perl/R_slope_aspect/Makefile.PL
  30. 0 40
      swig/perl/R_slope_aspect/README
  31. 0 12
      swig/perl/R_slope_aspect/R_slope_aspect.xs
  32. 0 113
      swig/perl/R_slope_aspect/lib/R_slope_aspect.pm
  33. 0 1180
      swig/perl/R_slope_aspect/ppport.h
  34. 0 35
      swig/perl/R_slope_aspect/r_slope_aspect/Makefile.PL
  35. 0 2
      swig/perl/R_slope_aspect/r_slope_aspect/local_proto.h
  36. 0 19
      swig/perl/R_slope_aspect/r_slope_aspect/opennew.c
  37. 0 1433
      swig/perl/R_slope_aspect/r_slope_aspect/r_slope_aspect.c
  38. 0 1
      swig/perl/R_slope_aspect/r_slope_aspect/r_slope_aspect.h
  39. 0 17
      swig/perl/R_slope_aspect/test.pl
  40. 0 0
      swig/perl/R_slope_aspect/typemap
  41. 0 75
      swig/perl/fallback/const-c.inc
  42. 0 88
      swig/perl/fallback/const-xs.inc
  43. 0 11
      swig/perl/grass.i
  44. 0 20
      swig/perl/index.dox
  45. 0 53
      swig/perl/t/R_slope_aspect.t
  46. 0 22
      swig/perl/typemaps.i
  47. 0 55
      swig/perl2/README
  48. 0 12
      swig/perl2/error.c
  49. 0 9
      swig/perl2/grass.i
  50. 0 240
      swig/perl2/make.pl.in
  51. 0 22
      swig/perl2/typemaps.i
  52. 0 124
      swig/python/Makefile
  53. 0 5
      swig/python/NumPtr/AUTHORS
  54. 0 340
      swig/python/NumPtr/COPYING
  55. 0 10
      swig/python/NumPtr/ChangeLog
  56. 0 8
      swig/python/NumPtr/INSTALL
  57. 0 13
      swig/python/NumPtr/Makefile
  58. 0 72
      swig/python/NumPtr/README
  59. 0 60
      swig/python/NumPtr/README.GRASS
  60. 0 1
      swig/python/NumPtr/VERSION
  61. 0 156
      swig/python/NumPtr/lib/NumPtr.py
  62. 0 2
      swig/python/NumPtr/lib/__init__.py
  63. 0 79
      swig/python/NumPtr/lib/test.py
  64. 0 82
      swig/python/NumPtr/readme.html
  65. 0 45
      swig/python/NumPtr/setup.py
  66. 0 54
      swig/python/NumPtr/src/Makefile
  67. 0 61
      swig/python/NumPtr/src/NumPtr.i
  68. 0 179
      swig/python/NumPtr/src/getpointer.c
  69. 0 12
      swig/python/NumPtr/src/getpointer.h
  70. 0 133
      swig/python/NumPtr/src/test.c
  71. 0 12
      swig/python/NumPtr/src/test.h
  72. 0 73
      swig/python/README
  73. 0 8
      swig/python/TODO
  74. 0 9
      swig/python/__init__.py
  75. 0 201
      swig/python/examples/m.distance.py
  76. 0 52
      swig/python/examples/rasteraccess.py
  77. 0 96
      swig/python/examples/vectoraccess.py
  78. 0 43
      swig/python/grasspython.dox
  79. 0 29
      swig/python/test.py
  80. 0 54
      swig/swiglib.dox

+ 0 - 2
Makefile

@@ -45,7 +45,6 @@ DIRS = \
 	visualization \
 	locale \
 	man \
-	swig \
 	macosx
 
 SUBDIRS = $(DIRS)
@@ -122,7 +121,6 @@ distclean: clean
 	-rm -f ChangeLog ChangeLog.bak $(ERRORLOG) grass.pc
 	-rm -f include/config.h include/version.h
 	-rm -f include/Make/Platform.make include/Make/Doxyfile_arch_html include/Make/Doxyfile_arch_latex 2>/dev/null
-	-rm -f swig/perl/Makefile.PL swig/perl2/make.pl 2>/dev/null
 
 DOXNAME=grass
 

+ 0 - 18
swig/Makefile

@@ -1,18 +0,0 @@
-MODULE_TOPDIR = ..
-
-include $(MODULE_TOPDIR)/include/Make/Vars.make
-
-#compile if PYTHON present:
-ifneq ($(USE_PYTHON),)
-ifneq ($(strip $(CXX)),)
-#    SUBDIRS += python
-endif
-endif
-
-# doxygen:
-DOXNAME=swig
-
-include $(MODULE_TOPDIR)/include/Make/Dir.make
-include $(MODULE_TOPDIR)/include/Make/Doxygen.make
-
-default: parsubdirs

+ 0 - 8
swig/include/arraystats.i

@@ -1,8 +0,0 @@
-
-%include "common.i"
-
-%{
-#include <grass/arraystats.h>
-%}
-
-%include "grass/arraystats.h"

+ 0 - 8
swig/include/cluster.i

@@ -1,8 +0,0 @@
-
-%include "common.i"
-
-%{
-#include <grass/cluster.h>
-%}
-
-%include "grass/cluster.h"

+ 0 - 9
swig/include/date.i

@@ -1,9 +0,0 @@
-
-%include "common.i"
-
-%{
-#include <grass/datetime.h>
-%}
-
-%include "grass/datetime.h"
-%include "grass/P_datetime.h"

+ 0 - 8
swig/include/dbmi.i

@@ -1,8 +0,0 @@
-
-%include "common.i"
-
-%{
-#include <grass/dbmi.h>
-%}
-
-%include "grass/dbmi.h"

+ 0 - 8
swig/include/display.i

@@ -1,8 +0,0 @@
-
-%include "common.i"
-
-%{
-#include <grass/display.h>
-%}
-
-%include "grass/display.h"

+ 0 - 8
swig/include/g3d.i

@@ -1,8 +0,0 @@
-
-%include "common.i"
-
-%{
-#include <grass/G3d.h>
-%}
-
-%include "grass/G3d.h"

+ 0 - 36
swig/include/grass.i

@@ -1,36 +0,0 @@
-
-%include "common.i"
-
-%include "grass/gis.h"
-%include "grass/gisdefs.h"
-%include "grass/colors.h"
-
-%{
-#include <grass/colors.h>
-%}
-
-%pythoncode %{
-import sys
-
-def G_gisinit(pgm):
-	G__gisinit(GIS_H_VERSION, pgm)
-
-def G__get_trace():
-	f = sys._getframe(1)
-	ln = f.f_lineno
-	fi = f.f_code.co_filename
-	return fi, ln
-
-def G_malloc(n):
-	fi, ln = G__get_trace()
-	return G__malloc(fi, ln, n)
-
-def G_calloc(m, n):
-	fi, ln = G__get_trace()
-	return G__calloc(fi, ln, m, n)
-
-def G_realloc(p, n):
-	fi, ln = G__get_trace()
-	return G__realloc(fi, ln, p, n)
-%}
-

+ 0 - 9
swig/include/imagery.i

@@ -1,9 +0,0 @@
-
-%include "common.i"
-
-%{
-#include <grass/imagery.h>
-%}
-
-%include "grass/imagery.h"
-%include "grass/imagedefs.h"

+ 0 - 8
swig/include/math.i

@@ -1,8 +0,0 @@
-
-%include "common.i"
-
-%{
-#include <grass/gmath.h>
-%}
-
-%include "grass/gmath.h"

+ 0 - 8
swig/include/proj.i

@@ -1,8 +0,0 @@
-
-%include "common.i"
-
-%{
-#include <grass/gprojects.h>
-%}
-
-%include "grass/gprojects.h"

+ 0 - 19
swig/include/python/common.i

@@ -1,19 +0,0 @@
-%{
-#include <stdio.h>
-#include <grass/gis.h>
-#include <grass/raster.h>
-
-#if PY_VERSION_HEX < 0x02050000 && !defined(PY_SSIZE_T_MIN)
-typedef int Py_ssize_t;
-# define PY_SSIZE_T_MAX INT_MAX
-# define PY_SSIZE_T_MIN INT_MIN
-#endif
-
-%}
-
-%rename(my_def) def;
-//%rename(my_class) class;
-
-%include "file.i"
-
-%include "my_typemaps.i"

+ 0 - 294
swig/include/python/my_typemaps.i

@@ -1,294 +0,0 @@
-#ifdef SWIGPYTHON
-
-%typemap(in) string_allows_none {
-	if($input==Py_None) {
-		$1=NULL;
-	} else {
-		$1=PyString_AsString($input);
-		if(!$1) {
-			return NULL;
-		}
-	}
-}
-
-%inline %{
-typedef char * string_allows_none;
-%}
-
-%typemap(out) char ** {
-	int len=0,i;
-	PyObject * stringobject;
-
-	if(!$1) {
-		$result=PyList_New(0);
-	} else {
-
-		for(len=0;$1[len];len++);
-
-		$result=PyList_New(len);
-		if(!$result){
-			// G_free_list($1);
-			 return NULL;
-		}
-			
-		for(i=0;i<len;i++) {
-			stringobject=PyString_FromString($1[i]);
-			if(!stringobject) return NULL;
-			PyList_SetItem($result,i,stringobject);
-		}
-//		G_free_list($1);
-	}
-}
-
-%typemap(argout) return_string (char * temp) {
-	if($1 && *$1) {
-		$result=t_output_helper($result,PyString_FromString(*$1));
-		G_free(*$1);
-	} else {
-		$result=t_output_helper($result,Py_None);
-		Py_INCREF(Py_None);
-	}
-	
-}
-
-%inline %{
-typedef char ** return_string;
-%}
-
-#undef __attribute__
-#define __attribute__(x)
-
-%{
-
-static void *pyseq_to_ptr(PyObject *input, int data_type) __attribute__ ((unused));
-static void *pyobj_to_ptr(PyObject *input, int data_type) __attribute__ ((unused));
-
-static void *pyseq_to_ptr(PyObject *input, int data_type)
-{
-	size_t size;
-	Py_ssize_t len;
-	void *array;
-	int i;
-
-	if (!PySequence_Check(input)) {
-		PyErr_SetString(PyExc_ValueError,"Expected a CObject, buffer or sequence");
-		return NULL;
-	}
-
-	switch (data_type) {
-	case (int) 'c':	size = sizeof(char		);	break;
-	case (int) 'b':	size = sizeof(signed char 	);	break;
-	case (int) 'B':	size = sizeof(unsigned char 	);	break;
-	case (int) 'u':	size = sizeof(Py_UNICODE 	);	break;
-	case (int) 'h':	size = sizeof(signed short 	);	break;
-	case (int) 'H':	size = sizeof(unsigned short 	);	break;
-	case (int) 'i':	size = sizeof(signed int 	);	break;
-	case (int) 'I':	size = sizeof(unsigned int 	);	break;
-	case (int) 'l':	size = sizeof(signed long 	);	break;
-	case (int) 'L':	size = sizeof(unsigned long 	);	break;
-	case (int) 'f':	size = sizeof(float		);	break;
-	case (int) 'd':	size = sizeof(double		);	break;
-	default:
-		PyErr_SetString(PyExc_ValueError,"Invalid type code; must be one of [cbBuhHiIlLfd]");
-		return NULL;
-	}
-
-	len = PySequence_Length(input);
-	array = malloc(len * size);
-
-	for (i = 0; i < len; i++) {
-		PyObject *val = PySequence_GetItem(input, i);
-		DCELL n;
-
-		if (!PyNumber_Check(val)) {
-			PyErr_SetString(PyExc_ValueError,"Sequence elements must be numbers");
-			Py_XDECREF(val);
-			return NULL;
-		}
-
-		n = PyFloat_AsDouble(val);
-		if (PyErr_Occurred()) {
-			PyErr_SetString(PyExc_ValueError,"Sequence elements must be numbers");
-			Py_XDECREF(val);
-			return NULL;
-		}
-
-		Py_DECREF(val);
-
-		switch (data_type) {
-		case (int) 'c': ((char		*) array)[i] = (char		) n;	break;
-		case (int) 'b': ((signed char	*) array)[i] = (signed char	) n;	break;
-		case (int) 'B': ((unsigned char	*) array)[i] = (unsigned char	) n;	break;
-		case (int) 'u': ((Py_UNICODE	*) array)[i] = (Py_UNICODE	) n;	break;
-		case (int) 'h': ((signed short	*) array)[i] = (signed short	) n;	break;
-		case (int) 'H': ((unsigned short*) array)[i] = (unsigned short	) n;	break;
-		case (int) 'i': ((signed int	*) array)[i] = (signed int	) n;	break;
-		case (int) 'I': ((unsigned int	*) array)[i] = (unsigned int	) n;	break;
-		case (int) 'l': ((signed long	*) array)[i] = (signed long	) n;	break;
-		case (int) 'L': ((unsigned long	*) array)[i] = (unsigned long	) n;	break;
-		case (int) 'f': ((float		*) array)[i] = (float		) n;	break;
-		case (int) 'd': ((double	*) array)[i] = (double		) n;	break;
-		default:
-		    PyErr_SetString(PyExc_ValueError,"Invalid type code; must be one of [cbBuhHiIlLfd]");
-		    return NULL;
-		}
-	}
-
-	return array;
-}
-
-static void *pyobj_to_ptr(PyObject *input, int data_type)
-{
-	const void *cbuffer;
-	void *buffer;
-	Py_ssize_t len;
-
-	if (input == Py_None)
-		return NULL;
-
-	if (PyCObject_Check(input))
-		return PyCObject_AsVoidPtr(input);
-
-	if (PyString_Check(input) && strchr("cbB", data_type))
-		return (void *) PyString_AsString(input);
-
-	if (PyObject_AsWriteBuffer(input, &buffer, &len) == 0)
-		return buffer;
-
-	if (PyObject_AsReadBuffer(input, &cbuffer, &len) == 0)
-		return (void *) cbuffer;
-
-	PyErr_Clear();
-
-	return pyseq_to_ptr(input, data_type);
-}
-
-%}
-
-%typemap(in) CELL * {
-	$1 = (CELL *) pyobj_to_ptr($input, 'i');
-}
-
-%typemap(in) FCELL * {
-	$1 = (FCELL *) pyobj_to_ptr($input, 'f');
-}
-
-%typemap(in) DCELL * {
-	$1 = (DCELL *) pyobj_to_ptr($input, 'd');
-}
-
-%typemap(in) signed char * {
-	$1 = (signed char *) pyobj_to_ptr($input, 'b');
-}
-
-%typemap(in) unsigned char * {
-	$1 = (unsigned char *) pyobj_to_ptr($input, 'B');
-}
-
-%typemap(in) signed short * {
-	$1 = (signed short *) pyobj_to_ptr($input, 'h');
-}
-
-%typemap(in) unsigned short * {
-	$1 = (unsigned short *) pyobj_to_ptr($input, 'H');
-}
-
-%typemap(in) int * {
-	$1 = (int *) pyobj_to_ptr($input, 'i');
-}
-
-%typemap(in) signed int * {
-	$1 = (int *) pyobj_to_ptr($input, 'i');
-}
-
-%typemap(in) unsigned int * {
-	$1 = (int *) pyobj_to_ptr($input, 'I');
-}
-
-%typemap(in) long * {
-	$1 = (long *) pyobj_to_ptr($input, 'l');
-}
-
-%typemap(in) signed long * {
-	$1 = (long *) pyobj_to_ptr($input, 'l');
-}
-
-%typemap(in) unsigned long * {
-	$1 = (long *) pyobj_to_ptr($input, 'L');
-}
-
-%typemap(in) float * {
-	$1 = (float *) pyobj_to_ptr($input, 'f');
-}
-
-%typemap(in) double * {
-	$1 = (double *) pyobj_to_ptr($input, 'd');
-}
-
-%{
-
-static void **pyseq_to_ptr_ptr(PyObject *input, int data_type) __attribute__ ((unused));
-static void **pyobj_to_ptr_ptr(PyObject *input, int data_type) __attribute__ ((unused));
-
-static void **pyseq_to_ptr_ptr(PyObject *input, int data_type)
-{
-	Py_ssize_t len;
-	void **array;
-	int i;
-
-	if (!PySequence_Check(input)) {
-		PyErr_SetString(PyExc_ValueError,"Expected a CObject, buffer or sequence");
-		return NULL;
-	}
-
-	len = PySequence_Length(input);
-	array = malloc((len + 1) * sizeof(void *));
-
-	for (i = 0; i < len; i++) {
-		PyObject *val = PySequence_GetItem(input, i);
-		void *p = pyobj_to_ptr(val, data_type);
-
-		Py_DECREF(val);
-		if (val != Py_None && p == NULL) {
-			PyErr_SetString(PyExc_ValueError,"Unable to convert element to pointer");
-			free(array);
-			return NULL;
-		}
-
-		array[i] = p;
-	}
-
-	array[i] = NULL;
-
-	return array;
-}
-
-static void **pyobj_to_ptr_ptr(PyObject *input, int data_type)
-{
-	const void *cbuffer;
-	void *buffer;
-	Py_ssize_t len;
-
-	if (PyCObject_Check(input))
-		return (void **) PyCObject_AsVoidPtr(input);
-
-	if (PyObject_AsWriteBuffer(input, &buffer, &len) == 0)
-		return (void **) buffer;
-
-	if (PyObject_AsReadBuffer(input, &cbuffer, &len) == 0)
-		return (void **) cbuffer;
-
-	return pyseq_to_ptr_ptr(input, data_type);
-}
-
-%}
-
-%typemap(in) void ** {
-	$1 = pyobj_to_ptr_ptr($input, 'c');
-}
-
-%typemap(in) char ** {
-	$1 = (char **) pyobj_to_ptr_ptr($input, 'c');
-}
-
-#endif

+ 0 - 75
swig/include/python/utils.i

@@ -1,75 +0,0 @@
-%{
-#include <grass/raster.h>
-%}
-
-%include "common.i"
-
-%include "carrays.i"
-%array_functions(int, intArray);
-%array_functions(float, floatArray);
-%array_functions(double, doubleArray);
-
-%include "cpointer.i"
-%pointer_functions(int, intp);
-%pointer_functions(float, floatp);
-%pointer_functions(double, doublep);
-
-PyObject *ptr_to_cobj(void *p);
-void *cobj_to_ptr(PyObject *o);
-PyObject *ptr_to_buffer_const(const void *p, int size);
-PyObject *ptr_to_buffer(void *p, int size);
-const void *buffer_to_ptr_const(PyObject *o);
-void *buffer_to_ptr(PyObject *o);
-
-%{
-
-static PyObject *ptr_to_cobj(void *p)
-{
-	return PyCObject_FromVoidPtr(p, NULL);
-}
-
-static void *cobj_to_ptr(PyObject *o)
-{
-	if (PyCObject_Check(o))
-		return PyCObject_AsVoidPtr(o);
-
-	PyErr_SetString(PyExc_ValueError,"CObject Expected");
-	return NULL;
-}
-
-static PyObject *ptr_to_buffer_const(const void *p, int size)
-{
-	return PyBuffer_FromMemory((void *) p, size);
-}
-
-static PyObject *ptr_to_buffer(void *p, int size)
-{
-	return PyBuffer_FromReadWriteMemory(p, size);
-}
-
-static const void *buffer_to_ptr_const(PyObject *o)
-{
-	const void *p;
-	Py_ssize_t len;
-
-	if (PyObject_AsReadBuffer(o, &p, &len) == 0)
-		return p;
-
-	PyErr_SetString(PyExc_ValueError,"buffer object expected");
-	return NULL;
-}
-
-static void *buffer_to_ptr(PyObject *o)
-{
-	void *p;
-	Py_ssize_t len;
-	
-	if (PyObject_AsWriteBuffer(o, &p, &len) == 0)
-		return p;
-
-	PyErr_SetString(PyExc_ValueError,"buffer object expected");
-	return NULL;
-}
-
-%}
-

+ 0 - 10
swig/include/raster.i

@@ -1,10 +0,0 @@
-
-%include "common.i"
-
-%{
-#include <grass/raster.h>
-#include <grass/rasterdefs.h>
-%}
-
-%include "grass/raster.h"
-%include "grass/rasterdefs.h"

+ 0 - 9
swig/include/stats.i

@@ -1,9 +0,0 @@
-
-%include "common.i"
-
-%{
-#undef c_sum
-#include <grass/stats.h>
-%}
-
-%include "grass/stats.h"

+ 0 - 8
swig/include/trans.i

@@ -1,8 +0,0 @@
-
-%include "common.i"
-
-%{
-#include <grass/transform.h>
-%}
-
-%include "grass/transform.h"

+ 0 - 11
swig/include/vector.i

@@ -1,11 +0,0 @@
-
-%include "common.i"
-
-%{
-#include <grass/vector.h>
-#include <grass/vect/dig_structs.h>
-%}
-
-%include "grass/vector.h"
-%include "grass/vect/dig_structs.h"
-%include "grass/vect/dig_defines.h"

+ 0 - 8
swig/include/vedit.i

@@ -1,8 +0,0 @@
-
-%include "common.i"
-
-%{
-#include <grass/vedit.h>
-%}
-
-%include "grass/vedit.h"

+ 0 - 158
swig/license.mbox

@@ -1,159 +0,0 @@
-From jolma@cc.hut.fi Fri Dec 16 13:02:03 2005
-Received: from orchestra.itc.it ([10.0.10.11]) by ntmail.itc.it with Microsoft SMTPSVC(6.0.3790.1830);
-	 Fri, 16 Dec 2005 13:02:03 +0100
-Received: from ntmain.itc.it (ntmain [10.0.20.40])
-	by orchestra.itc.it (8.12.11/8.12.11) with SMTP id jBGC23dF021231
-	for <neteler@itc.it>; Fri, 16 Dec 2005 13:02:03 +0100
-Received: from mail.itc.it ([217.77.80.3])
- by ntmain.itc.it (SMSSMTP 4.1.9.35) with SMTP id M2005121613020307850
- for <neteler@itc.it>; Fri, 16 Dec 2005 13:02:03 +0100
-Received: from smtp-1.hut.fi (smtp-1.hut.fi [130.233.228.91])
-	by mail.itc.it (8.12.11/8.12.11) with ESMTP id jBGC22WH007099
-	for <neteler@itc.it>; Fri, 16 Dec 2005 13:02:03 +0100
-Received: from localhost (putosiko.hut.fi [130.233.228.114])
-	by smtp-1.hut.fi (8.12.10/8.12.10) with ESMTP id jBGC20OQ010014
-	for <neteler@itc.it>; Fri, 16 Dec 2005 14:02:00 +0200
-Received: from smtp-1.hut.fi ([130.233.228.91])
- by localhost (putosiko.hut.fi [130.233.228.114]) (amavisd-new, port 10024)
- with LMTP id 20503-08-2 for <neteler@itc.it>;
- Fri, 16 Dec 2005 14:02:00 +0200 (EET)
-Received: from baresi.hut.fi (baresi-m.hut.fi [130.233.228.121])
-	by smtp-1.hut.fi (8.12.10/8.12.10) with ESMTP id jBGC1YMA009915
-	for <neteler@itc.it>; Fri, 16 Dec 2005 14:01:34 +0200
-Received: (from apache@localhost)
-	by baresi.hut.fi (8.12.10/8.12.6/Submit) id jBGC1XxY026487
-	for neteler@itc.it; Fri, 16 Dec 2005 14:01:33 +0200
-To: Markus Neteler <neteler@itc.it>
-Subject: Re: GRASS & SWIG
-Message-ID: <1134734493.43a2ac9db295e@webmail1.hut.fi>
-Date: Fri, 16 Dec 2005 14:01:33 +0200 (EET)
-From: Ari Jolma <ari.jolma@tkk.fi>
-References: <434128A2.2070406@tkk.fi> <20051004073503.GC17284@thuille.itc.it> <434235C0.8020606@tkk.fi> <20051004080006.GF17284@thuille.itc.it> <4343E8D3.7040104@tkk.fi> <20051007203310.GA10371@thuille.itc.it> <4346E16A.9060905@tkk.fi> <20051007210428.GB10492@thuille.itc.it> <4346EAA4.1020005@tkk.fi> <20051008130049.GD31278@thuille.itc.it> <20051215142456.GA13678@thuille.itc.it>
-In-Reply-To: <20051215142456.GA13678@thuille.itc.it>
-MIME-Version: 1.0
-Content-Type: text/plain; charset=ISO-8859-1
-Content-Transfer-Encoding: 8bit
-User-Agent: HUT webmail, IMP 2.2.6
-X-Authenticated-Sender: jolma@cc.hut.fi
-X-Originating-IP: 138.217.149.204
-X-Spam-Checker-Version: SpamAssassin 2.64 (2004-01-11) on putosiko.hut.fi
-X-TKK-Virus-Scanned: by amavisd-new-2.1.2-hutcc at putosiko.hut.fi
-Return-Path: jolma@cc.hut.fi
-X-OriginalArrivalTime: 16 Dec 2005 12:02:03.0916 (UTC) FILETIME=[875E34C0:01C60238]
-Status: RO
-Content-Length: 959
-Lines: 35
-
-On Thu, 15 Dec 2005 15:24:56 +0100 Markus Neteler <neteler@itc.it> wrote:
-
-> Ari,
-> 
-> I was thinking about the licensing of your SWIG interface.
-> Since there is lot of interest to link GRASS to other
-> programs, Web services whatever, we often have the incompatibilities
-> between the GPLed GRASS and other software. GRASS-SWIG
-> could be a way out, probably by licensing it MIT/X11 such
-> as GDAL.
-> 
-> What do you think?
-
-
-That's ok by me. 
-
-Ari
-
-
-> 
->  Markus
-> 
-> -- 
-> Markus Neteler     <neteler itc it>       http://mpa.itc.it
-> ITC-irst -  Centro per la Ricerca Scientifica e Tecnologica
-> MPBA - Predictive Models for Biol. & Environ. Data Analysis
-> Via Sommarive, 18        -       38050 Povo (Trento), Italy
-> 
-
-Prof. Ari Jolma
-Kartografia ja Geoinformatiikka / Cartography and Geoinformatics
-Teknillinen Korkeakoulu / Helsinki University of Technology
-POBox 1200, 02015 TKK, Finland
-Email: ari.jolma at tkk.fi URL: http://www.tkk.fi/~jolma
-
-From ari.jolma@tkk.fi Mon Dec 19 15:31:59 2005
-Received: from orchestra.itc.it ([10.0.10.11]) by ntmail.itc.it with Microsoft SMTPSVC(6.0.3790.1830);
-	 Mon, 19 Dec 2005 15:31:59 +0100
-Received: from ntmain.itc.it (ntmain [10.0.20.40])
-	by orchestra.itc.it (8.12.11/8.12.11) with SMTP id jBJEVt6u017129
-	for <neteler@itc.it>; Mon, 19 Dec 2005 15:31:59 +0100
-Received: from mail.itc.it ([217.77.80.3])
- by ntmain.itc.it (SMSSMTP 4.1.9.35) with SMTP id M2005121915315804561
- for <neteler@itc.it>; Mon, 19 Dec 2005 15:31:58 +0100
-Received: from smtp-3.hut.fi (smtp-3.hut.fi [130.233.228.93])
-	by mail.itc.it (8.12.11/8.12.11) with ESMTP id jBJEVvYt028500
-	for <neteler@itc.it>; Mon, 19 Dec 2005 15:31:58 +0100
-Received: from localhost (putosiko.hut.fi [130.233.228.114])
-	by smtp-3.hut.fi (8.12.10/8.12.10) with ESMTP id jBJEVv6h029074;
-	Mon, 19 Dec 2005 16:31:57 +0200
-Received: from smtp-3.hut.fi ([130.233.228.93])
- by localhost (putosiko.hut.fi [130.233.228.114]) (amavisd-new, port 10024)
- with LMTP id 29873-05-6; Mon, 19 Dec 2005 16:31:57 +0200 (EET)
-Received: from [192.168.225.128] (earth.hut.fi [130.233.136.58])
-	by smtp-3.hut.fi (8.12.10/8.12.10) with ESMTP id jBJES9Ru028109;
-	Mon, 19 Dec 2005 16:28:09 +0200
-Message-ID: <43A6C370.5030904@tkk.fi>
-Date: Mon, 19 Dec 2005 16:28:00 +0200
-From: Ari Jolma <ari.jolma@tkk.fi>
-User-Agent: Thunderbird 1.5 (Windows/20051025)
-MIME-Version: 1.0
-To: Markus Neteler <neteler@itc.it>
-CC: Ari Jolma <ari.jolma@tkk.fi>
-Subject: Re: GRASS & SWIG
-References: <434235C0.8020606@tkk.fi> <20051004080006.GF17284@thuille.itc.it> <4343E8D3.7040104@tkk.fi> <20051007203310.GA10371@thuille.itc.it> <4346E16A.9060905@tkk.fi> <20051007210428.GB10492@thuille.itc.it> <4346EAA4.1020005@tkk.fi> <20051008130049.GD31278@thuille.itc.it> <20051215142456.GA13678@thuille.itc.it> <1134734493.43a2ac9db295e@webmail1.hut.fi> <20051216215622.GA18186@thuille.itc.it>
-In-Reply-To: <20051216215622.GA18186@thuille.itc.it>
-X-Enigmail-Version: 0.93.2.0
-Content-Type: text/plain; charset=ISO-8859-1
-Content-Transfer-Encoding: 7bit
-X-Spam-Checker-Version: SpamAssassin 2.64 (2004-01-11) on putosiko.hut.fi
-X-TKK-Virus-Scanned: by amavisd-new-2.1.2-hutcc at putosiko.hut.fi
-Return-Path: ari.jolma@tkk.fi
-X-OriginalArrivalTime: 19 Dec 2005 14:31:59.0471 (UTC) FILETIME=[F86037F0:01C604A8]
-Status: RO
-Content-Length: 1422
-Lines: 34
-
------BEGIN PGP SIGNED MESSAGE-----
-Hash: SHA1
-
-This licence file is for the GRASS-SWIG files which I have authored.
-
-Copyright (c) 2005, Ari Jolma
-
-Permission is hereby granted, free of charge, to any person obtaining a
-copy of this software and associated documentation files (the
-"Software"), to deal in the Software without restriction, including
-without limitation the rights to use, copy, modify, merge, publish,
-distribute, sublicense, and/or sell copies of the Software, and to
-permit persons to whom the Software is furnished to do so, subject to
-the following conditions:
-
-The above copyright notice and this permission notice shall be included
-in all copies or substantial portions of the Software.
-
-THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
-OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
-IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
-CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,
-TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
-SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
------BEGIN PGP SIGNATURE-----
-Version: GnuPG v1.2.5 (MingW32)
-Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
-
-iD8DBQFDpsNwmvSxEZZXCr8RAt0OAJ9vY4q9r2//9uWdvr+lYbfEl2tt2QCfVYHn
-Ea9oz3HNu/zbLZKYnQ68NNc=
-=d/ue
------END PGP SIGNATURE-----
-

+ 0 - 812
swig/perl/Grass.pm

@@ -1,812 +0,0 @@
-# This file was automatically generated by SWIG
-package Grass;
-require Exporter;
-require DynaLoader;
-@ISA = qw(Exporter DynaLoader);
-package Grassc;
-bootstrap Grass;
-package Grass;
-@EXPORT = qw( );
-
-# ---------- BASE METHODS -------------
-
-package Grass;
-
-sub TIEHASH {
-    my ($classname,$obj) = @_;
-    return bless $obj, $classname;
-}
-
-sub CLEAR { }
-
-sub FIRSTKEY { }
-
-sub NEXTKEY { }
-
-sub FETCH {
-    my ($self,$field) = @_;
-    my $member_func = "swig_${field}_get";
-    $self->$member_func();
-}
-
-sub STORE {
-    my ($self,$field,$newval) = @_;
-    my $member_func = "swig_${field}_set";
-    $self->$member_func($newval);
-}
-
-sub this {
-    my $ptr = shift;
-    return tied(%$ptr);
-}
-
-
-# ------- FUNCTION WRAPPERS --------
-
-package Grass;
-
-*G_adjust_Cell_head = *Grassc::G_adjust_Cell_head;
-*G_adjust_Cell_head3 = *Grassc::G_adjust_Cell_head3;
-*G_align_window = *Grassc::G_align_window;
-*G_malloc = *Grassc::G_malloc;
-*G_calloc = *Grassc::G_calloc;
-*G_realloc = *Grassc::G_realloc;
-*G_free = *Grassc::G_free;
-*G_raster_size = *Grassc::G_raster_size;
-*G_allocate_cell_buf = *Grassc::G_allocate_cell_buf;
-*G_allocate_raster_buf = *Grassc::G_allocate_raster_buf;
-*G_allocate_c_raster_buf = *Grassc::G_allocate_c_raster_buf;
-*G_allocate_f_raster_buf = *Grassc::G_allocate_f_raster_buf;
-*G_allocate_d_raster_buf = *Grassc::G_allocate_d_raster_buf;
-*G_allocate_null_buf = *Grassc::G_allocate_null_buf;
-*G__allocate_null_bits = *Grassc::G__allocate_null_bits;
-*G__null_bitstream_size = *Grassc::G__null_bitstream_size;
-*G_begin_cell_area_calculations = *Grassc::G_begin_cell_area_calculations;
-*G_area_of_cell_at_row = *Grassc::G_area_of_cell_at_row;
-*G_begin_polygon_area_calculations = *Grassc::G_begin_polygon_area_calculations;
-*G_area_of_polygon = *Grassc::G_area_of_polygon;
-*G_begin_zone_area_on_ellipsoid = *Grassc::G_begin_zone_area_on_ellipsoid;
-*G_darea0_on_ellipsoid = *Grassc::G_darea0_on_ellipsoid;
-*G_area_for_zone_on_ellipsoid = *Grassc::G_area_for_zone_on_ellipsoid;
-*G_begin_ellipsoid_polygon_area = *Grassc::G_begin_ellipsoid_polygon_area;
-*G_ellipsoid_polygon_area = *Grassc::G_ellipsoid_polygon_area;
-*G_planimetric_polygon_area = *Grassc::G_planimetric_polygon_area;
-*G_begin_zone_area_on_sphere = *Grassc::G_begin_zone_area_on_sphere;
-*G_darea0_on_sphere = *Grassc::G_darea0_on_sphere;
-*G_area_for_zone_on_sphere = *Grassc::G_area_for_zone_on_sphere;
-*G_ascii_check = *Grassc::G_ascii_check;
-*G_ask_new = *Grassc::G_ask_new;
-*G_ask_new_ext = *Grassc::G_ask_new_ext;
-*G_ask_old = *Grassc::G_ask_old;
-*G_ask_old_ext = *Grassc::G_ask_old_ext;
-*G_ask_any = *Grassc::G_ask_any;
-*G_ask_any_ext = *Grassc::G_ask_any_ext;
-*G_ask_in_mapset = *Grassc::G_ask_in_mapset;
-*G_ask_in_mapset_ext = *Grassc::G_ask_in_mapset_ext;
-*G_ask_new_file = *Grassc::G_ask_new_file;
-*G_ask_old_file = *Grassc::G_ask_old_file;
-*G_set_ask_return_msg = *Grassc::G_set_ask_return_msg;
-*G_get_ask_return_msg = *Grassc::G_get_ask_return_msg;
-*G_ask_cell_new = *Grassc::G_ask_cell_new;
-*G_ask_cell_old = *Grassc::G_ask_cell_old;
-*G_ask_cell_in_mapset = *Grassc::G_ask_cell_in_mapset;
-*G_ask_cell_any = *Grassc::G_ask_cell_any;
-*G_ask_vector_new = *Grassc::G_ask_vector_new;
-*G_ask_vector_old = *Grassc::G_ask_vector_old;
-*G_ask_vector_any = *Grassc::G_ask_vector_any;
-*G_ask_vector_in_mapset = *Grassc::G_ask_vector_in_mapset;
-*G__check_for_auto_masking = *Grassc::G__check_for_auto_masking;
-*G_suppress_masking = *Grassc::G_suppress_masking;
-*G_unsuppress_masking = *Grassc::G_unsuppress_masking;
-*G_basename = *Grassc::G_basename;
-*G_bresenham_line = *Grassc::G_bresenham_line;
-*G_read_cats = *Grassc::G_read_cats;
-*G_read_raster_cats = *Grassc::G_read_raster_cats;
-*G_read_vector_cats = *Grassc::G_read_vector_cats;
-*G_number_of_cats = *Grassc::G_number_of_cats;
-*G__read_cats = *Grassc::G__read_cats;
-*G_get_cats_title = *Grassc::G_get_cats_title;
-*G_get_raster_cats_title = *Grassc::G_get_raster_cats_title;
-*G_get_cat = *Grassc::G_get_cat;
-*G_get_c_raster_cat = *Grassc::G_get_c_raster_cat;
-*G_get_f_raster_cat = *Grassc::G_get_f_raster_cat;
-*G_get_d_raster_cat = *Grassc::G_get_d_raster_cat;
-*G_get_raster_cat = *Grassc::G_get_raster_cat;
-*G_unmark_raster_cats = *Grassc::G_unmark_raster_cats;
-*G_mark_c_raster_cats = *Grassc::G_mark_c_raster_cats;
-*G_mark_f_raster_cats = *Grassc::G_mark_f_raster_cats;
-*G_mark_d_raster_cats = *Grassc::G_mark_d_raster_cats;
-*G_mark_raster_cats = *Grassc::G_mark_raster_cats;
-*G_rewind_raster_cats = *Grassc::G_rewind_raster_cats;
-*G_get_next_marked_d_raster_cat = *Grassc::G_get_next_marked_d_raster_cat;
-*G_get_next_marked_c_raster_cat = *Grassc::G_get_next_marked_c_raster_cat;
-*G_get_next_marked_f_raster_cat = *Grassc::G_get_next_marked_f_raster_cat;
-*G_get_next_marked_raster_cat = *Grassc::G_get_next_marked_raster_cat;
-*G_set_cat = *Grassc::G_set_cat;
-*G_set_c_raster_cat = *Grassc::G_set_c_raster_cat;
-*G_set_f_raster_cat = *Grassc::G_set_f_raster_cat;
-*G_set_d_raster_cat = *Grassc::G_set_d_raster_cat;
-*G_set_raster_cat = *Grassc::G_set_raster_cat;
-*G_write_cats = *Grassc::G_write_cats;
-*G_write_raster_cats = *Grassc::G_write_raster_cats;
-*G_write_vector_cats = *Grassc::G_write_vector_cats;
-*G__write_cats = *Grassc::G__write_cats;
-*G_get_ith_d_raster_cat = *Grassc::G_get_ith_d_raster_cat;
-*G_get_ith_f_raster_cat = *Grassc::G_get_ith_f_raster_cat;
-*G_get_ith_c_raster_cat = *Grassc::G_get_ith_c_raster_cat;
-*G_get_ith_raster_cat = *Grassc::G_get_ith_raster_cat;
-*G_init_cats = *Grassc::G_init_cats;
-*G_init_raster_cats = *Grassc::G_init_raster_cats;
-*G_set_cats_title = *Grassc::G_set_cats_title;
-*G_set_raster_cats_title = *Grassc::G_set_raster_cats_title;
-*G_set_cats_fmt = *Grassc::G_set_cats_fmt;
-*G_set_raster_cats_fmt = *Grassc::G_set_raster_cats_fmt;
-*G_free_cats = *Grassc::G_free_cats;
-*G_free_raster_cats = *Grassc::G_free_raster_cats;
-*G_copy_raster_cats = *Grassc::G_copy_raster_cats;
-*G_number_of_raster_cats = *Grassc::G_number_of_raster_cats;
-*G_sort_cats = *Grassc::G_sort_cats;
-*G_init_cell_stats = *Grassc::G_init_cell_stats;
-*G_update_cell_stats = *Grassc::G_update_cell_stats;
-*G_find_cell_stat = *Grassc::G_find_cell_stat;
-*G_rewind_cell_stats = *Grassc::G_rewind_cell_stats;
-*G_next_cell_stat = *Grassc::G_next_cell_stat;
-*G_get_stats_for_null_value = *Grassc::G_get_stats_for_null_value;
-*G_free_cell_stats = *Grassc::G_free_cell_stats;
-*G_get_cell_title = *Grassc::G_get_cell_title;
-*G_cell_stats_histo_eq = *Grassc::G_cell_stats_histo_eq;
-*G_chop = *Grassc::G_chop;
-*G_clear_screen = *Grassc::G_clear_screen;
-*G_clicker = *Grassc::G_clicker;
-*G_close_cell = *Grassc::G_close_cell;
-*G_unopen_cell = *Grassc::G_unopen_cell;
-*G__write_fp_format = *Grassc::G__write_fp_format;
-*G_make_ryg_colors = *Grassc::G_make_ryg_colors;
-*G_make_ryg_fp_colors = *Grassc::G_make_ryg_fp_colors;
-*G_make_aspect_colors = *Grassc::G_make_aspect_colors;
-*G_make_aspect_fp_colors = *Grassc::G_make_aspect_fp_colors;
-*G_make_byr_colors = *Grassc::G_make_byr_colors;
-*G_make_byr_fp_colors = *Grassc::G_make_byr_fp_colors;
-*G_make_byg_colors = *Grassc::G_make_byg_colors;
-*G_make_byg_fp_colors = *Grassc::G_make_byg_fp_colors;
-*G_make_grey_scale_colors = *Grassc::G_make_grey_scale_colors;
-*G_make_grey_scale_fp_colors = *Grassc::G_make_grey_scale_fp_colors;
-*G_make_gyr_colors = *Grassc::G_make_gyr_colors;
-*G_make_gyr_fp_colors = *Grassc::G_make_gyr_fp_colors;
-*G_make_rainbow_colors = *Grassc::G_make_rainbow_colors;
-*G_make_rainbow_fp_colors = *Grassc::G_make_rainbow_fp_colors;
-*G_make_ramp_colors = *Grassc::G_make_ramp_colors;
-*G_make_ramp_fp_colors = *Grassc::G_make_ramp_fp_colors;
-*G_make_wave_colors = *Grassc::G_make_wave_colors;
-*G_make_wave_fp_colors = *Grassc::G_make_wave_fp_colors;
-*G_free_colors = *Grassc::G_free_colors;
-*G__color_free_rules = *Grassc::G__color_free_rules;
-*G__color_free_lookup = *Grassc::G__color_free_lookup;
-*G__color_free_fp_lookup = *Grassc::G__color_free_fp_lookup;
-*G__color_reset = *Grassc::G__color_reset;
-*G_get_color = *Grassc::G_get_color;
-*G_get_raster_color = *Grassc::G_get_raster_color;
-*G_get_c_raster_color = *Grassc::G_get_c_raster_color;
-*G_get_f_raster_color = *Grassc::G_get_f_raster_color;
-*G_get_d_raster_color = *Grassc::G_get_d_raster_color;
-*G_get_null_value_color = *Grassc::G_get_null_value_color;
-*G_get_default_color = *Grassc::G_get_default_color;
-*G_make_histogram_eq_colors = *Grassc::G_make_histogram_eq_colors;
-*G_make_histogram_log_colors = *Grassc::G_make_histogram_log_colors;
-*G_init_colors = *Grassc::G_init_colors;
-*G__insert_color_into_lookup = *Grassc::G__insert_color_into_lookup;
-*G_invert_colors = *Grassc::G_invert_colors;
-*G_lookup_colors = *Grassc::G_lookup_colors;
-*G_lookup_c_raster_colors = *Grassc::G_lookup_c_raster_colors;
-*G_lookup_raster_colors = *Grassc::G_lookup_raster_colors;
-*G_lookup_f_raster_colors = *Grassc::G_lookup_f_raster_colors;
-*G_lookup_d_raster_colors = *Grassc::G_lookup_d_raster_colors;
-*G__lookup_colors = *Grassc::G__lookup_colors;
-*G__interpolate_color_rule = *Grassc::G__interpolate_color_rule;
-*G__organize_colors = *Grassc::G__organize_colors;
-*G_make_random_colors = *Grassc::G_make_random_colors;
-*G_set_color_range = *Grassc::G_set_color_range;
-*G_set_d_color_range = *Grassc::G_set_d_color_range;
-*G_get_color_range = *Grassc::G_get_color_range;
-*G_get_d_color_range = *Grassc::G_get_d_color_range;
-*G_read_colors = *Grassc::G_read_colors;
-*G_mark_colors_as_fp = *Grassc::G_mark_colors_as_fp;
-*G_remove_colors = *Grassc::G_remove_colors;
-*G_add_d_raster_color_rule = *Grassc::G_add_d_raster_color_rule;
-*G_add_f_raster_color_rule = *Grassc::G_add_f_raster_color_rule;
-*G_add_c_raster_color_rule = *Grassc::G_add_c_raster_color_rule;
-*G_add_raster_color_rule = *Grassc::G_add_raster_color_rule;
-*G_add_color_rule = *Grassc::G_add_color_rule;
-*G_add_modular_d_raster_color_rule = *Grassc::G_add_modular_d_raster_color_rule;
-*G_add_modular_f_raster_color_rule = *Grassc::G_add_modular_f_raster_color_rule;
-*G_add_modular_c_raster_color_rule = *Grassc::G_add_modular_c_raster_color_rule;
-*G_add_modular_raster_color_rule = *Grassc::G_add_modular_raster_color_rule;
-*G_add_modular_color_rule = *Grassc::G_add_modular_color_rule;
-*G_colors_count = *Grassc::G_colors_count;
-*G_get_f_color_rule = *Grassc::G_get_f_color_rule;
-*G_parse_color_rule = *Grassc::G_parse_color_rule;
-*G_parse_color_rule_error = *Grassc::G_parse_color_rule_error;
-*G_read_color_rule = *Grassc::G_read_color_rule;
-*G_read_color_rules = *Grassc::G_read_color_rules;
-*G_load_colors = *Grassc::G_load_colors;
-*G_load_fp_colors = *Grassc::G_load_fp_colors;
-*G_make_colors = *Grassc::G_make_colors;
-*G_make_fp_colors = *Grassc::G_make_fp_colors;
-*G_set_color = *Grassc::G_set_color;
-*G_set_d_color = *Grassc::G_set_d_color;
-*G_set_null_value_color = *Grassc::G_set_null_value_color;
-*G_set_default_color = *Grassc::G_set_default_color;
-*G_shift_colors = *Grassc::G_shift_colors;
-*G_shift_d_colors = *Grassc::G_shift_d_colors;
-*G_str_to_color = *Grassc::G_str_to_color;
-*G_write_colors = *Grassc::G_write_colors;
-*G__write_colors = *Grassc::G__write_colors;
-*G_histogram_eq_colors = *Grassc::G_histogram_eq_colors;
-*G_log_colors = *Grassc::G_log_colors;
-*G_insert_commas = *Grassc::G_insert_commas;
-*G_remove_commas = *Grassc::G_remove_commas;
-*G_copy = *Grassc::G_copy;
-*G_copy_file = *Grassc::G_copy_file;
-*G_alloc_vector = *Grassc::G_alloc_vector;
-*G_alloc_matrix = *Grassc::G_alloc_matrix;
-*G_alloc_fvector = *Grassc::G_alloc_fvector;
-*G_alloc_fmatrix = *Grassc::G_alloc_fmatrix;
-*G_free_vector = *Grassc::G_free_vector;
-*G_free_matrix = *Grassc::G_free_matrix;
-*G_free_fmatrix = *Grassc::G_free_fmatrix;
-*G_date = *Grassc::G_date;
-*G_get_datum_by_name = *Grassc::G_get_datum_by_name;
-*G_datum_name = *Grassc::G_datum_name;
-*G_datum_description = *Grassc::G_datum_description;
-*G_datum_ellipsoid = *Grassc::G_datum_ellipsoid;
-*G_get_datumparams_from_projinfo = *Grassc::G_get_datumparams_from_projinfo;
-*G_debug = *Grassc::G_debug;
-*G_begin_distance_calculations = *Grassc::G_begin_distance_calculations;
-*G_distance = *Grassc::G_distance;
-*G_distance_between_line_segments = *Grassc::G_distance_between_line_segments;
-*G_distance_point_to_line_segment = *Grassc::G_distance_point_to_line_segment;
-*G_done_msg = *Grassc::G_done_msg;
-*G_tqli = *Grassc::G_tqli;
-*G_tred2 = *Grassc::G_tred2;
-*G_is_little_endian = *Grassc::G_is_little_endian;
-*G_getenv = *Grassc::G_getenv;
-*G_getenv2 = *Grassc::G_getenv2;
-*G__getenv = *Grassc::G__getenv;
-*G__getenv2 = *Grassc::G__getenv2;
-*G_setenv = *Grassc::G_setenv;
-*G_setenv2 = *Grassc::G_setenv2;
-*G__setenv = *Grassc::G__setenv;
-*G__setenv2 = *Grassc::G__setenv2;
-*G_unsetenv = *Grassc::G_unsetenv;
-*G_unsetenv2 = *Grassc::G_unsetenv2;
-*G__write_env = *Grassc::G__write_env;
-*G__env_name = *Grassc::G__env_name;
-*G__read_env = *Grassc::G__read_env;
-*G_set_gisrc_mode = *Grassc::G_set_gisrc_mode;
-*G_get_gisrc_mode = *Grassc::G_get_gisrc_mode;
-*G__set_gisrc_file = *Grassc::G__set_gisrc_file;
-*G__get_gisrc_file = *Grassc::G__get_gisrc_file;
-*G__create_alt_env = *Grassc::G__create_alt_env;
-*G__switch_env = *Grassc::G__switch_env;
-*G_info_format = *Grassc::G_info_format;
-*G_message = *Grassc::G_message;
-*G_verbose_message = *Grassc::G_verbose_message;
-*G_important_message = *Grassc::G_important_message;
-*G_fatal_error = *Grassc::G_fatal_error;
-*G_warning = *Grassc::G_warning;
-*G_suppress_warnings = *Grassc::G_suppress_warnings;
-*G_sleep_on_error = *Grassc::G_sleep_on_error;
-*G_set_error_routine = *Grassc::G_set_error_routine;
-*G_unset_error_routine = *Grassc::G_unset_error_routine;
-*G__file_name = *Grassc::G__file_name;
-*G__file_name_misc = *Grassc::G__file_name_misc;
-*G_find_cell = *Grassc::G_find_cell;
-*G_find_cell2 = *Grassc::G_find_cell2;
-*G_find_file = *Grassc::G_find_file;
-*G_find_file2 = *Grassc::G_find_file2;
-*G_find_file_misc = *Grassc::G_find_file_misc;
-*G_find_file2_misc = *Grassc::G_find_file2_misc;
-*G_find_etc = *Grassc::G_find_etc;
-*G_find_vector = *Grassc::G_find_vector;
-*G_find_vector2 = *Grassc::G_find_vector2;
-*G_zlib_compress = *Grassc::G_zlib_compress;
-*G_zlib_expand = *Grassc::G_zlib_expand;
-*G_zlib_write = *Grassc::G_zlib_write;
-*G_zlib_read = *Grassc::G_zlib_read;
-*G_zlib_write_noCompress = *Grassc::G_zlib_write_noCompress;
-*G_fork = *Grassc::G_fork;
-*G__check_format = *Grassc::G__check_format;
-*G__read_row_ptrs = *Grassc::G__read_row_ptrs;
-*G__write_row_ptrs = *Grassc::G__write_row_ptrs;
-*G_fpreclass_clear = *Grassc::G_fpreclass_clear;
-*G_fpreclass_reset = *Grassc::G_fpreclass_reset;
-*G_fpreclass_init = *Grassc::G_fpreclass_init;
-*G_fpreclass_set_domain = *Grassc::G_fpreclass_set_domain;
-*G_fpreclass_set_range = *Grassc::G_fpreclass_set_range;
-*G_fpreclass_get_limits = *Grassc::G_fpreclass_get_limits;
-*G_fpreclass_nof_rules = *Grassc::G_fpreclass_nof_rules;
-*G_fpreclass_get_ith_rule = *Grassc::G_fpreclass_get_ith_rule;
-*G_fpreclass_set_neg_infinite_rule = *Grassc::G_fpreclass_set_neg_infinite_rule;
-*G_fpreclass_get_neg_infinite_rule = *Grassc::G_fpreclass_get_neg_infinite_rule;
-*G_fpreclass_set_pos_infinite_rule = *Grassc::G_fpreclass_set_pos_infinite_rule;
-*G_fpreclass_get_pos_infinite_rule = *Grassc::G_fpreclass_get_pos_infinite_rule;
-*G_fpreclass_add_rule = *Grassc::G_fpreclass_add_rule;
-*G_fpreclass_reverse_rule_order = *Grassc::G_fpreclass_reverse_rule_order;
-*G_fpreclass_get_cell_value = *Grassc::G_fpreclass_get_cell_value;
-*G_fpreclass_perform_di = *Grassc::G_fpreclass_perform_di;
-*G_fpreclass_perform_df = *Grassc::G_fpreclass_perform_df;
-*G_fpreclass_perform_dd = *Grassc::G_fpreclass_perform_dd;
-*G_fpreclass_perform_fi = *Grassc::G_fpreclass_perform_fi;
-*G_fpreclass_perform_ff = *Grassc::G_fpreclass_perform_ff;
-*G_fpreclass_perform_fd = *Grassc::G_fpreclass_perform_fd;
-*G_fpreclass_perform_ii = *Grassc::G_fpreclass_perform_ii;
-*G_fpreclass_perform_if = *Grassc::G_fpreclass_perform_if;
-*G_fpreclass_perform_id = *Grassc::G_fpreclass_perform_id;
-*G_begin_geodesic_equation = *Grassc::G_begin_geodesic_equation;
-*G_geodesic_lat_from_lon = *Grassc::G_geodesic_lat_from_lon;
-*G_begin_geodesic_distance = *Grassc::G_begin_geodesic_distance;
-*G_set_geodesic_distance_lat1 = *Grassc::G_set_geodesic_distance_lat1;
-*G_set_geodesic_distance_lat2 = *Grassc::G_set_geodesic_distance_lat2;
-*G_geodesic_distance_lon_to_lon = *Grassc::G_geodesic_distance_lon_to_lon;
-*G_geodesic_distance = *Grassc::G_geodesic_distance;
-*G_get_cellhd = *Grassc::G_get_cellhd;
-*G_ask_datum_name = *Grassc::G_ask_datum_name;
-*G_ask_ellipse_name = *Grassc::G_ask_ellipse_name;
-*G_get_ellipsoid_parameters = *Grassc::G_get_ellipsoid_parameters;
-*G_get_spheroid_by_name = *Grassc::G_get_spheroid_by_name;
-*G_get_ellipsoid_by_name = *Grassc::G_get_ellipsoid_by_name;
-*G_ellipsoid_name = *Grassc::G_ellipsoid_name;
-*G_ellipsoid_description = *Grassc::G_ellipsoid_description;
-*G_get_projunits = *Grassc::G_get_projunits;
-*G_get_projinfo = *Grassc::G_get_projinfo;
-*G_ask_proj_name = *Grassc::G_ask_proj_name;
-*G_get_map_row_nomask = *Grassc::G_get_map_row_nomask;
-*G_get_raster_row_nomask = *Grassc::G_get_raster_row_nomask;
-*G_get_c_raster_row_nomask = *Grassc::G_get_c_raster_row_nomask;
-*G_get_f_raster_row_nomask = *Grassc::G_get_f_raster_row_nomask;
-*G_get_d_raster_row_nomask = *Grassc::G_get_d_raster_row_nomask;
-*G_get_map_row = *Grassc::G_get_map_row;
-*G_get_raster_row = *Grassc::G_get_raster_row;
-*G_get_c_raster_row = *Grassc::G_get_c_raster_row;
-*G_get_f_raster_row = *Grassc::G_get_f_raster_row;
-*G_get_d_raster_row = *Grassc::G_get_d_raster_row;
-*G_get_null_value_row = *Grassc::G_get_null_value_row;
-*G_get_raster_row_colors = *Grassc::G_get_raster_row_colors;
-*G_get_window = *Grassc::G_get_window;
-*G_get_default_window = *Grassc::G_get_default_window;
-*G__get_window = *Grassc::G__get_window;
-*G_getl = *Grassc::G_getl;
-*G_getl2 = *Grassc::G_getl2;
-*G_gets = *Grassc::G_gets;
-*G_gisbase = *Grassc::G_gisbase;
-*G_gisdbase = *Grassc::G_gisdbase;
-*G_gishelp = *Grassc::G_gishelp;
-*G_gisinit = *Grassc::G_gisinit;
-*G_no_gisinit = *Grassc::G_no_gisinit;
-*G__check_gisinit = *Grassc::G__check_gisinit;
-*G_histogram_eq = *Grassc::G_histogram_eq;
-*G_init_histogram = *Grassc::G_init_histogram;
-*G_read_histogram = *Grassc::G_read_histogram;
-*G_write_histogram = *Grassc::G_write_histogram;
-*G_write_histogram_cs = *Grassc::G_write_histogram_cs;
-*G_make_histogram_cs = *Grassc::G_make_histogram_cs;
-*G_get_histogram_num = *Grassc::G_get_histogram_num;
-*G_get_histogram_cat = *Grassc::G_get_histogram_cat;
-*G_get_histogram_count = *Grassc::G_get_histogram_count;
-*G_free_histogram = *Grassc::G_free_histogram;
-*G_sort_histogram = *Grassc::G_sort_histogram;
-*G_sort_histogram_by_count = *Grassc::G_sort_histogram_by_count;
-*G_remove_histogram = *Grassc::G_remove_histogram;
-*G_add_histogram = *Grassc::G_add_histogram;
-*G_set_histogram = *Grassc::G_set_histogram;
-*G_extend_histogram = *Grassc::G_extend_histogram;
-*G_zero_histogram = *Grassc::G_zero_histogram;
-*G_read_history = *Grassc::G_read_history;
-*G_write_history = *Grassc::G_write_history;
-*G_short_history = *Grassc::G_short_history;
-*G_command_history = *Grassc::G_command_history;
-*G_home = *Grassc::G_home;
-*G__home = *Grassc::G__home;
-*G_alloc_ivector = *Grassc::G_alloc_ivector;
-*G_alloc_imatrix = *Grassc::G_alloc_imatrix;
-*G_free_ivector = *Grassc::G_free_ivector;
-*G_free_imatrix = *Grassc::G_free_imatrix;
-*G_index = *Grassc::G_index;
-*G_rindex = *Grassc::G_rindex;
-*G__random_d_initialize_0 = *Grassc::G__random_d_initialize_0;
-*G__random_f_initialize_0 = *Grassc::G__random_f_initialize_0;
-*G_interp_linear = *Grassc::G_interp_linear;
-*G_interp_bilinear = *Grassc::G_interp_bilinear;
-*G_interp_cubic = *Grassc::G_interp_cubic;
-*G_interp_bicubic = *Grassc::G_interp_bicubic;
-*G_intersect_line_segments = *Grassc::G_intersect_line_segments;
-*G_intr_char = *Grassc::G_intr_char;
-*G_is_gisbase = *Grassc::G_is_gisbase;
-*G_is_location = *Grassc::G_is_location;
-*G_is_mapset = *Grassc::G_is_mapset;
-*G_create_key_value = *Grassc::G_create_key_value;
-*G_set_key_value = *Grassc::G_set_key_value;
-*G_find_key_value = *Grassc::G_find_key_value;
-*G_free_key_value = *Grassc::G_free_key_value;
-*G_fwrite_key_value = *Grassc::G_fwrite_key_value;
-*G_fread_key_value = *Grassc::G_fread_key_value;
-*G_write_key_value_file = *Grassc::G_write_key_value_file;
-*G_read_key_value_file = *Grassc::G_read_key_value_file;
-*G_update_key_value_file = *Grassc::G_update_key_value_file;
-*G_lookup_key_value_from_file = *Grassc::G_lookup_key_value_from_file;
-*G_legal_filename = *Grassc::G_legal_filename;
-*G_check_input_output_name = *Grassc::G_check_input_output_name;
-*G_set_distance_to_line_tolerance = *Grassc::G_set_distance_to_line_tolerance;
-*G_distance2_point_to_line = *Grassc::G_distance2_point_to_line;
-*G_set_list_hit_return = *Grassc::G_set_list_hit_return;
-*G_list_element = *Grassc::G_list_element;
-*G_list = *Grassc::G_list;
-*G_free_list = *Grassc::G_free_list;
-*G_lat_format = *Grassc::G_lat_format;
-*G_lat_format_string = *Grassc::G_lat_format_string;
-*G_lon_format = *Grassc::G_lon_format;
-*G_lon_format_string = *Grassc::G_lon_format_string;
-*G_llres_format = *Grassc::G_llres_format;
-*G_llres_format_string = *Grassc::G_llres_format_string;
-*G_lat_parts = *Grassc::G_lat_parts;
-*G_lon_parts = *Grassc::G_lon_parts;
-*G_lat_scan = *Grassc::G_lat_scan;
-*G_lon_scan = *Grassc::G_lon_scan;
-*G_llres_scan = *Grassc::G_llres_scan;
-*G_location_path = *Grassc::G_location_path;
-*G_location = *Grassc::G_location;
-*G__location_path = *Grassc::G__location_path;
-*G__ls = *Grassc::G__ls;
-*G_ls = *Grassc::G_ls;
-*G_ls_format = *Grassc::G_ls_format;
-*G_ludcmp = *Grassc::G_ludcmp;
-*G_lubksb = *Grassc::G_lubksb;
-*lzw_decode = *Grassc::lzw_decode;
-*lzw_expand = *Grassc::lzw_expand;
-*G_lzw_nof_read_bytes = *Grassc::G_lzw_nof_read_bytes;
-*G_lzw_max_used_bits = *Grassc::G_lzw_max_used_bits;
-*G_lzw_set_bits = *Grassc::G_lzw_set_bits;
-*G_lzw_compress = *Grassc::G_lzw_compress;
-*G_lzw_expand = *Grassc::G_lzw_expand;
-*G_lzw_compress_count_only_array = *Grassc::G_lzw_compress_count_only_array;
-*G_lzw_compress_count_only_file = *Grassc::G_lzw_compress_count_only_file;
-*G_lzw_write = *Grassc::G_lzw_write;
-*G_lzw_write_noCompress = *Grassc::G_lzw_write_noCompress;
-*G_lzw_test_status = *Grassc::G_lzw_test_status;
-*G_lzw_read2 = *Grassc::G_lzw_read2;
-*G_lzw_read = *Grassc::G_lzw_read;
-*G_lzw_transfer_compress = *Grassc::G_lzw_transfer_compress;
-*G_lzw_transfer_expand = *Grassc::G_lzw_transfer_expand;
-*G__machine_name = *Grassc::G__machine_name;
-*G_ask_colors = *Grassc::G_ask_colors;
-*G__make_location = *Grassc::G__make_location;
-*G_make_location = *Grassc::G_make_location;
-*G_compare_projections = *Grassc::G_compare_projections;
-*G__make_mapset = *Grassc::G__make_mapset;
-*G_make_mapset = *Grassc::G_make_mapset;
-*G_tolcase = *Grassc::G_tolcase;
-*G_toucase = *Grassc::G_toucase;
-*G_mapset = *Grassc::G_mapset;
-*G__mapset = *Grassc::G__mapset;
-*G__make_mapset_element = *Grassc::G__make_mapset_element;
-*G__make_mapset_element_misc = *Grassc::G__make_mapset_element_misc;
-*G__mapset_permissions = *Grassc::G__mapset_permissions;
-*G__mapset_permissions2 = *Grassc::G__mapset_permissions2;
-*G__mapset_name = *Grassc::G__mapset_name;
-*G__create_alt_search_path = *Grassc::G__create_alt_search_path;
-*G__switch_search_path = *Grassc::G__switch_search_path;
-*G_reset_mapsets = *Grassc::G_reset_mapsets;
-*G_available_mapsets = *Grassc::G_available_mapsets;
-*G_add_mapset_to_search_path = *Grassc::G_add_mapset_to_search_path;
-*G_mask_info = *Grassc::G_mask_info;
-*G__mask_info = *Grassc::G__mask_info;
-*G_maskfd = *Grassc::G_maskfd;
-*G_myname = *Grassc::G_myname;
-*G_color_values = *Grassc::G_color_values;
-*G_color_name = *Grassc::G_color_name;
-*G_newlines_to_spaces = *Grassc::G_newlines_to_spaces;
-*G__name_in_mapset = *Grassc::G__name_in_mapset;
-*G__name_is_fully_qualified = *Grassc::G__name_is_fully_qualified;
-*G_fully_qualified_name = *Grassc::G_fully_qualified_name;
-*G__init_null_patterns = *Grassc::G__init_null_patterns;
-*G__set_null_value = *Grassc::G__set_null_value;
-*G_set_null_value = *Grassc::G_set_null_value;
-*G_set_c_null_value = *Grassc::G_set_c_null_value;
-*G_set_f_null_value = *Grassc::G_set_f_null_value;
-*G_set_d_null_value = *Grassc::G_set_d_null_value;
-*G_is_null_value = *Grassc::G_is_null_value;
-*G_is_c_null_value = *Grassc::G_is_c_null_value;
-*G_is_f_null_value = *Grassc::G_is_f_null_value;
-*G_is_d_null_value = *Grassc::G_is_d_null_value;
-*G_insert_null_values = *Grassc::G_insert_null_values;
-*G_insert_c_null_values = *Grassc::G_insert_c_null_values;
-*G_insert_f_null_values = *Grassc::G_insert_f_null_values;
-*G_insert_d_null_values = *Grassc::G_insert_d_null_values;
-*G__check_null_bit = *Grassc::G__check_null_bit;
-*G__set_flags_from_01_random = *Grassc::G__set_flags_from_01_random;
-*G__convert_01_flags = *Grassc::G__convert_01_flags;
-*G__convert_flags_01 = *Grassc::G__convert_flags_01;
-*G__init_null_bits = *Grassc::G__init_null_bits;
-*G_open_new = *Grassc::G_open_new;
-*G_open_old = *Grassc::G_open_old;
-*G_open_update = *Grassc::G_open_update;
-*G_fopen_new = *Grassc::G_fopen_new;
-*G_fopen_old = *Grassc::G_fopen_old;
-*G_fopen_append = *Grassc::G_fopen_append;
-*G_fopen_modify = *Grassc::G_fopen_modify;
-*G_open_new_misc = *Grassc::G_open_new_misc;
-*G_open_old_misc = *Grassc::G_open_old_misc;
-*G_open_update_misc = *Grassc::G_open_update_misc;
-*G_fopen_new_misc = *Grassc::G_fopen_new_misc;
-*G_fopen_old_misc = *Grassc::G_fopen_old_misc;
-*G_fopen_append_misc = *Grassc::G_fopen_append_misc;
-*G_fopen_modify_misc = *Grassc::G_fopen_modify_misc;
-*G_open_cell_old = *Grassc::G_open_cell_old;
-*G__open_cell_old = *Grassc::G__open_cell_old;
-*G_open_cell_new = *Grassc::G_open_cell_new;
-*G_open_cell_new_random = *Grassc::G_open_cell_new_random;
-*G_open_cell_new_uncompressed = *Grassc::G_open_cell_new_uncompressed;
-*G_want_histogram = *Grassc::G_want_histogram;
-*G_set_cell_format = *Grassc::G_set_cell_format;
-*G_cellvalue_format = *Grassc::G_cellvalue_format;
-*G_open_fp_cell_new = *Grassc::G_open_fp_cell_new;
-*G_open_fp_cell_new_uncompressed = *Grassc::G_open_fp_cell_new_uncompressed;
-*G__reallocate_work_buf = *Grassc::G__reallocate_work_buf;
-*G__reallocate_null_buf = *Grassc::G__reallocate_null_buf;
-*G__reallocate_mask_buf = *Grassc::G__reallocate_mask_buf;
-*G__reallocate_temp_buf = *Grassc::G__reallocate_temp_buf;
-*G_set_fp_type = *Grassc::G_set_fp_type;
-*G_raster_map_is_fp = *Grassc::G_raster_map_is_fp;
-*G_raster_map_type = *Grassc::G_raster_map_type;
-*G_raster_map_type2 = *Grassc::G_raster_map_type2;
-*G__check_fp_type = *Grassc::G__check_fp_type;
-*G_get_raster_map_type = *Grassc::G_get_raster_map_type;
-*G_open_raster_new = *Grassc::G_open_raster_new;
-*G_open_raster_new_uncompressed = *Grassc::G_open_raster_new_uncompressed;
-*G_set_quant_rules = *Grassc::G_set_quant_rules;
-*G_disable_interactive = *Grassc::G_disable_interactive;
-*G_define_module = *Grassc::G_define_module;
-*G_define_flag = *Grassc::G_define_flag;
-*G_define_option = *Grassc::G_define_option;
-*G_define_standard_option = *Grassc::G_define_standard_option;
-*G_parser = *Grassc::G_parser;
-*G_usage = *Grassc::G_usage;
-*G_recreate_command = *Grassc::G_recreate_command;
-*G_mkdir = *Grassc::G_mkdir;
-*G_is_dirsep = *Grassc::G_is_dirsep;
-*G_is_absolute_path = *Grassc::G_is_absolute_path;
-*G_convert_dirseps_to_host = *Grassc::G_convert_dirseps_to_host;
-*G_convert_dirseps_from_host = *Grassc::G_convert_dirseps_from_host;
-*G_lstat = *Grassc::G_lstat;
-*G_stat = *Grassc::G_stat;
-*G_percent = *Grassc::G_percent;
-*G_percent2 = *Grassc::G_percent2;
-*G_percent_reset = *Grassc::G_percent_reset;
-*G_setup_plot = *Grassc::G_setup_plot;
-*G_setup_fill = *Grassc::G_setup_fill;
-*G_plot_where_xy = *Grassc::G_plot_where_xy;
-*G_plot_where_en = *Grassc::G_plot_where_en;
-*G_plot_point = *Grassc::G_plot_point;
-*G_plot_line = *Grassc::G_plot_line;
-*G_plot_line2 = *Grassc::G_plot_line2;
-*G_plot_polygon = *Grassc::G_plot_polygon;
-*G_plot_area = *Grassc::G_plot_area;
-*G_plot_fx = *Grassc::G_plot_fx;
-*G_plot_icon = *Grassc::G_plot_icon;
-*G_pole_in_polygon = *Grassc::G_pole_in_polygon;
-*G_popen = *Grassc::G_popen;
-*G_pclose = *Grassc::G_pclose;
-*G_program_name = *Grassc::G_program_name;
-*G_set_program_name = *Grassc::G_set_program_name;
-*G_projection = *Grassc::G_projection;
-*G__projection_units = *Grassc::G__projection_units;
-*G__unit_name = *Grassc::G__unit_name;
-*G__projection_name = *Grassc::G__projection_name;
-*G_database_unit_name = *Grassc::G_database_unit_name;
-*G_database_projection_name = *Grassc::G_database_projection_name;
-*G_database_units_to_meters_factor = *Grassc::G_database_units_to_meters_factor;
-*G_database_datum_name = *Grassc::G_database_datum_name;
-*G_database_ellipse_name = *Grassc::G_database_ellipse_name;
-*G_put_cellhd = *Grassc::G_put_cellhd;
-*G_zeros_r_nulls = *Grassc::G_zeros_r_nulls;
-*G_put_map_row = *Grassc::G_put_map_row;
-*G_put_map_row_random = *Grassc::G_put_map_row_random;
-*G__put_null_value_row = *Grassc::G__put_null_value_row;
-*G_put_raster_row = *Grassc::G_put_raster_row;
-*G_put_c_raster_row = *Grassc::G_put_c_raster_row;
-*G_put_f_raster_row = *Grassc::G_put_f_raster_row;
-*G_put_d_raster_row = *Grassc::G_put_d_raster_row;
-*G__write_data = *Grassc::G__write_data;
-*G__write_data_compressed = *Grassc::G__write_data_compressed;
-*G__open_null_write = *Grassc::G__open_null_write;
-*G__write_null_bits = *Grassc::G__write_null_bits;
-*G_put_cell_title = *Grassc::G_put_cell_title;
-*G_put_window = *Grassc::G_put_window;
-*G__put_window = *Grassc::G__put_window;
-*G_putenv = *Grassc::G_putenv;
-*G_quant_clear = *Grassc::G_quant_clear;
-*G_quant_free = *Grassc::G_quant_free;
-*G__quant_organize_fp_lookup = *Grassc::G__quant_organize_fp_lookup;
-*G_quant_init = *Grassc::G_quant_init;
-*G_quant_is_truncate = *Grassc::G_quant_is_truncate;
-*G_quant_is_round = *Grassc::G_quant_is_round;
-*G_quant_truncate = *Grassc::G_quant_truncate;
-*G_quant_round = *Grassc::G_quant_round;
-*G_quant_get_limits = *Grassc::G_quant_get_limits;
-*G_quant_nof_rules = *Grassc::G_quant_nof_rules;
-*G_quant_get_ith_rule = *Grassc::G_quant_get_ith_rule;
-*G_quant_set_neg_infinite_rule = *Grassc::G_quant_set_neg_infinite_rule;
-*G_quant_get_neg_infinite_rule = *Grassc::G_quant_get_neg_infinite_rule;
-*G_quant_set_pos_infinite_rule = *Grassc::G_quant_set_pos_infinite_rule;
-*G_quant_get_pos_infinite_rule = *Grassc::G_quant_get_pos_infinite_rule;
-*G_quant_add_rule = *Grassc::G_quant_add_rule;
-*G_quant_reverse_rule_order = *Grassc::G_quant_reverse_rule_order;
-*G_quant_get_cell_value = *Grassc::G_quant_get_cell_value;
-*G_quant_perform_d = *Grassc::G_quant_perform_d;
-*G_quant_perform_f = *Grassc::G_quant_perform_f;
-*G__quant_get_rule_for_d_raster_val = *Grassc::G__quant_get_rule_for_d_raster_val;
-*G__quant_import = *Grassc::G__quant_import;
-*G__quant_export = *Grassc::G__quant_export;
-*G_truncate_fp_map = *Grassc::G_truncate_fp_map;
-*G_round_fp_map = *Grassc::G_round_fp_map;
-*G_quantize_fp_map = *Grassc::G_quantize_fp_map;
-*G_quantize_fp_map_range = *Grassc::G_quantize_fp_map_range;
-*G_write_quant = *Grassc::G_write_quant;
-*G_read_quant = *Grassc::G_read_quant;
-*G_meridional_radius_of_curvature = *Grassc::G_meridional_radius_of_curvature;
-*G_transverse_radius_of_curvature = *Grassc::G_transverse_radius_of_curvature;
-*G_radius_of_conformal_tangent_sphere = *Grassc::G_radius_of_conformal_tangent_sphere;
-*G__remove_fp_range = *Grassc::G__remove_fp_range;
-*G_construct_default_range = *Grassc::G_construct_default_range;
-*G_read_fp_range = *Grassc::G_read_fp_range;
-*G_read_range = *Grassc::G_read_range;
-*G_write_range = *Grassc::G_write_range;
-*G_write_fp_range = *Grassc::G_write_fp_range;
-*G_update_range = *Grassc::G_update_range;
-*G_update_fp_range = *Grassc::G_update_fp_range;
-*G_row_update_range = *Grassc::G_row_update_range;
-*G__row_update_range = *Grassc::G__row_update_range;
-*G_row_update_fp_range = *Grassc::G_row_update_fp_range;
-*G_init_range = *Grassc::G_init_range;
-*G_get_range_min_max = *Grassc::G_get_range_min_max;
-*G_init_fp_range = *Grassc::G_init_fp_range;
-*G_get_fp_range_min_max = *Grassc::G_get_fp_range_min_max;
-*G_incr_void_ptr = *Grassc::G_incr_void_ptr;
-*G_raster_cmp = *Grassc::G_raster_cmp;
-*G_raster_cpy = *Grassc::G_raster_cpy;
-*G_set_raster_value_c = *Grassc::G_set_raster_value_c;
-*G_set_raster_value_f = *Grassc::G_set_raster_value_f;
-*G_set_raster_value_d = *Grassc::G_set_raster_value_d;
-*G_get_raster_value_c = *Grassc::G_get_raster_value_c;
-*G_get_raster_value_f = *Grassc::G_get_raster_value_f;
-*G_get_raster_value_d = *Grassc::G_get_raster_value_d;
-*G_read_raster_units = *Grassc::G_read_raster_units;
-*G_read_raster_vdatum = *Grassc::G_read_raster_vdatum;
-*G_write_raster_units = *Grassc::G_write_raster_units;
-*G_write_raster_vdatum = *Grassc::G_write_raster_vdatum;
-*G__raster_misc_read_line = *Grassc::G__raster_misc_read_line;
-*G__raster_misc_write_line = *Grassc::G__raster_misc_write_line;
-*G__read_Cell_head = *Grassc::G__read_Cell_head;
-*G__read_Cell_head_array = *Grassc::G__read_Cell_head_array;
-*G_is_reclass = *Grassc::G_is_reclass;
-*G_is_reclassed_to = *Grassc::G_is_reclassed_to;
-*G_get_reclass = *Grassc::G_get_reclass;
-*G_free_reclass = *Grassc::G_free_reclass;
-*G_put_reclass = *Grassc::G_put_reclass;
-*G_remove = *Grassc::G_remove;
-*G_remove_misc = *Grassc::G_remove_misc;
-*G_rename = *Grassc::G_rename;
-*G_begin_rhumbline_equation = *Grassc::G_begin_rhumbline_equation;
-*G_rhumbline_lat_from_lon = *Grassc::G_rhumbline_lat_from_lon;
-*G_rotate_around_point = *Grassc::G_rotate_around_point;
-*G_rotate_around_point_int = *Grassc::G_rotate_around_point_int;
-*G_get_raster_sample = *Grassc::G_get_raster_sample;
-*G_get_set_window = *Grassc::G_get_set_window;
-*G_set_window = *Grassc::G_set_window;
-*G_shortest_way = *Grassc::G_shortest_way;
-*G_sleep = *Grassc::G_sleep;
-*G_snprintf = *Grassc::G_snprintf;
-*G_squeeze = *Grassc::G_squeeze;
-*G_store = *Grassc::G_store;
-*G_strcpy = *Grassc::G_strcpy;
-*G_chrcpy = *Grassc::G_chrcpy;
-*G_strncpy = *Grassc::G_strncpy;
-*G_strcat = *Grassc::G_strcat;
-*G_chrcat = *Grassc::G_chrcat;
-*G_strmov = *Grassc::G_strmov;
-*G_chrmov = *Grassc::G_chrmov;
-*G_strcasecmp = *Grassc::G_strcasecmp;
-*G_strstr = *Grassc::G_strstr;
-*G_strdup = *Grassc::G_strdup;
-*G_strchg = *Grassc::G_strchg;
-*G_str_replace = *Grassc::G_str_replace;
-*G_str_to_upper = *Grassc::G_str_to_upper;
-*G_str_to_lower = *Grassc::G_str_to_lower;
-*G_str_to_sql = *Grassc::G_str_to_sql;
-*G_strip = *Grassc::G_strip;
-*G_svdcmp = *Grassc::G_svdcmp;
-*G_svbksb = *Grassc::G_svbksb;
-*G_svelim = *Grassc::G_svelim;
-*G_system = *Grassc::G_system;
-*G_tempfile = *Grassc::G_tempfile;
-*G__tempfile = *Grassc::G__tempfile;
-*G__temp_element = *Grassc::G__temp_element;
-*G_init_timestamp = *Grassc::G_init_timestamp;
-*G_set_timestamp = *Grassc::G_set_timestamp;
-*G_set_timestamp_range = *Grassc::G_set_timestamp_range;
-*G__read_timestamp = *Grassc::G__read_timestamp;
-*G__write_timestamp = *Grassc::G__write_timestamp;
-*G_get_timestamps = *Grassc::G_get_timestamps;
-*G_read_raster_timestamp = *Grassc::G_read_raster_timestamp;
-*G_read_vector_timestamp = *Grassc::G_read_vector_timestamp;
-*G_write_raster_timestamp = *Grassc::G_write_raster_timestamp;
-*G_write_vector_timestamp = *Grassc::G_write_vector_timestamp;
-*G_format_timestamp = *Grassc::G_format_timestamp;
-*G_scan_timestamp = *Grassc::G_scan_timestamp;
-*G_remove_raster_timestamp = *Grassc::G_remove_raster_timestamp;
-*G_remove_vector_timestamp = *Grassc::G_remove_vector_timestamp;
-*G_read_grid3_timestamp = *Grassc::G_read_grid3_timestamp;
-*G_remove_grid3_timestamp = *Grassc::G_remove_grid3_timestamp;
-*G_write_grid3_timestamp = *Grassc::G_write_grid3_timestamp;
-*G_tokenize = *Grassc::G_tokenize;
-*G_number_of_tokens = *Grassc::G_number_of_tokens;
-*G_free_tokens = *Grassc::G_free_tokens;
-*G_trim_decimal = *Grassc::G_trim_decimal;
-*G_unctrl = *Grassc::G_unctrl;
-*G_sock_get_fname = *Grassc::G_sock_get_fname;
-*G_sock_exists = *Grassc::G_sock_exists;
-*G_sock_bind = *Grassc::G_sock_bind;
-*G_sock_listen = *Grassc::G_sock_listen;
-*G_sock_accept = *Grassc::G_sock_accept;
-*G_sock_connect = *Grassc::G_sock_connect;
-*G_verbose = *Grassc::G_verbose;
-*G_verbose_min = *Grassc::G_verbose_min;
-*G_verbose_std = *Grassc::G_verbose_std;
-*G_verbose_max = *Grassc::G_verbose_max;
-*G_set_verbose = *Grassc::G_set_verbose;
-*G_3dview_warning = *Grassc::G_3dview_warning;
-*G_get_3dview_defaults = *Grassc::G_get_3dview_defaults;
-*G_put_3dview = *Grassc::G_put_3dview;
-*G_get_3dview = *Grassc::G_get_3dview;
-*G_whoami = *Grassc::G_whoami;
-*G_adjust_window_to_box = *Grassc::G_adjust_window_to_box;
-*G_format_northing = *Grassc::G_format_northing;
-*G_format_easting = *Grassc::G_format_easting;
-*G_format_resolution = *Grassc::G_format_resolution;
-*G_point_in_region = *Grassc::G_point_in_region;
-*G_point_in_window = *Grassc::G_point_in_window;
-*G_limit_east = *Grassc::G_limit_east;
-*G_limit_west = *Grassc::G_limit_west;
-*G_limit_north = *Grassc::G_limit_north;
-*G_limit_south = *Grassc::G_limit_south;
-*G_window_overlap = *Grassc::G_window_overlap;
-*G_window_percentage_overlap = *Grassc::G_window_percentage_overlap;
-*G_scan_northing = *Grassc::G_scan_northing;
-*G_scan_easting = *Grassc::G_scan_easting;
-*G_scan_resolution = *Grassc::G_scan_resolution;
-*G__create_window_mapping = *Grassc::G__create_window_mapping;
-*G_northing_to_row = *Grassc::G_northing_to_row;
-*G_adjust_east_longitude = *Grassc::G_adjust_east_longitude;
-*G_adjust_easting = *Grassc::G_adjust_easting;
-*G_easting_to_col = *Grassc::G_easting_to_col;
-*G_row_to_northing = *Grassc::G_row_to_northing;
-*G_col_to_easting = *Grassc::G_col_to_easting;
-*G_window_rows = *Grassc::G_window_rows;
-*G_window_cols = *Grassc::G_window_cols;
-*G__init_window = *Grassc::G__init_window;
-*G_row_repeat_nomask = *Grassc::G_row_repeat_nomask;
-*G__write_Cell_head = *Grassc::G__write_Cell_head;
-*G__write_Cell_head3 = *Grassc::G__write_Cell_head3;
-*G_write_zeros = *Grassc::G_write_zeros;
-*G_yes = *Grassc::G_yes;
-*G_zero = *Grassc::G_zero;
-*G_zero_cell_buf = *Grassc::G_zero_cell_buf;
-*G_zero_raster_buf = *Grassc::G_zero_raster_buf;
-*G_zone = *Grassc::G_zone;
-*r_slope_aspect = *Grassc::r_slope_aspect;
-
-# ------- VARIABLE STUBS --------
-
-package Grass;
-
-1;

+ 0 - 24
swig/perl/MANIFEST

@@ -1,24 +0,0 @@
-MANIFEST
-gisdefs.h
-grass.i
-typemaps.i
-Makefile.PL
-README
-R_slope_aspect/Changes
-R_slope_aspect/lib/R_slope_aspect.pm
-R_slope_aspect/MANIFEST
-R_slope_aspect/README
-R_slope_aspect/r_slope_aspect/opennew.c
-R_slope_aspect/r_slope_aspect/r_slope_aspect.c
-R_slope_aspect/r_slope_aspect/local_proto.h
-R_slope_aspect/r_slope_aspect/r_slope_aspect.h
-R_slope_aspect/r_slope_aspect/Makefile.PL
-R_slope_aspect/typemap
-R_slope_aspect/ppport.h
-R_slope_aspect/test.pl
-R_slope_aspect/Makefile.PL
-R_slope_aspect/R_slope_aspect.xs
-t/R_slope_aspect.t
-fallback/const-c.inc
-fallback/const-xs.inc
-META.yml                                 Module meta-data (added by MakeMaker)

+ 0 - 10
swig/perl/META.yml

@@ -1,10 +0,0 @@
-# http://module-build.sourceforge.net/META-spec.html
-#XXXXXXX This is a prototype!!!  It will change in the future!!! XXXXX#
-name:         Grass
-version:      
-version_from: 
-installdirs:  site
-requires:
-
-distribution_type: module
-generated_by: ExtUtils::MakeMaker version 6.17

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 0 - 29
swig/perl/Makefile.PL.in


+ 0 - 47
swig/perl/README

@@ -1,47 +0,0 @@
-The very beginning of a swig interface for Grass.
-
-This is mainly Perl. Swig supports many languages, thus generic Swig
-things should be separated and only Swig/Perl things left here.
-
-Compiling this is done the usual perl way:
-
-perl Makefile.PL
-make
-make test
-
-you won't need this for a very long time:
-make install
-
-What I've done:
-
-1) the skeleton was created using h2xs
-
-2) hand-edited grass.i and typemaps.i
-
-3) copied gisdefs.h here and commented out some things
-
-   created grass_wrap.c and Grass.pm with
-   swig -perl -shadow grass.i
-
-It might be a good idea to create a thin header layer between the
-actual Grass and Swig.
-
-4) copied one Grass program r_slope_aspect.c here and made it into
-a function
-
-This procedure could perhaps be automated somehow.
-
-5) Edited Makefile.PL for some configurations. Please edit them
-according to your config.
-
-Please extend and enjoy :)
-
-Ari Jolma
-
-ari.jolma tkk.fi
-
-##############
-Ref:
-Thread:
-  http://grass.itc.it/pipermail/grass5/2005-August/019435.html
-

+ 0 - 6
swig/perl/R_slope_aspect/Changes

@@ -1,6 +0,0 @@
-Revision history for Perl extension R_slope_aspect.
-
-0.01  Tue Aug 30 15:38:34 2005
-	- original version; created by h2xs 1.23 with options
-		r_slope_aspect.h
-

+ 0 - 10
swig/perl/R_slope_aspect/MANIFEST

@@ -1,10 +0,0 @@
-Changes
-Makefile.PL
-MANIFEST
-ppport.h
-R_slope_aspect.xs
-README
-t/R_slope_aspect.t
-fallback/const-c.inc
-fallback/const-xs.inc
-lib/R_slope_aspect.pm

+ 0 - 24
swig/perl/R_slope_aspect/Makefile.PL

@@ -1,24 +0,0 @@
-use 5.008005;
-use ExtUtils::MakeMaker;
-# See lib/ExtUtils/MakeMaker.pm for details of how to influence
-# the contents of the Makefile that is written.
-WriteMakefile(
-    NAME              => 'R_slope_aspect',
-    VERSION_FROM      => 'lib/R_slope_aspect.pm', # finds $VERSION
-    PREREQ_PM         => {}, # e.g., Module::Name => 1.1
-    ($] >= 5.005 ?     ## Add these new keywords supported since 5.005
-      (ABSTRACT_FROM  => 'lib/R_slope_aspect.pm', # retrieve abstract from module
-       AUTHOR         => 'Ari Jolma <ajolma@localdomain>') : ()),
-    LIBS              => [''], # e.g., '-lm'
-    DEFINE            => '', # e.g., '-DHAVE_SOMETHING'
-    INC               => '-I.', # e.g., '-I. -I/usr/include/other'
-	# Un-comment this if you add C files to link with later:
-	      # OBJECT            => '$(O_FILES)', # link all the C files too
-	      'MYEXTLIB'     => 'r_slope_aspect/libr_slope_aspect$(LIB_EXT)'
-);
-sub MY::postamble {
-'
-$(MYEXTLIB): r_slope_aspect/Makefile
-	cd r_slope_aspect && $(MAKE) $(PASTHRU)
-';
-}

+ 0 - 40
swig/perl/R_slope_aspect/README

@@ -1,40 +0,0 @@
-R_slope_aspect version 0.01
-===========================
-
-The README is used to introduce the module and provide instructions on
-how to install the module, any machine dependencies it may have (for
-example C compilers and installed libraries) and any other information
-that should be provided before the module is installed.
-
-A README file is required for CPAN modules since CPAN extracts the
-README file from a module distribution so that people browsing the
-archive can use it get an idea of the modules uses. It is usually a
-good idea to provide version information here so that people can
-decide whether fixes for the module are worth downloading.
-
-INSTALLATION
-
-To install this module type the following:
-
-   perl Makefile.PL
-   make
-   make test
-   make install
-
-DEPENDENCIES
-
-This module requires these other modules and libraries:
-
-  blah blah blah
-
-COPYRIGHT AND LICENCE
-
-Put the correct copyright and licence information here.
-
-Copyright (C) 2005 by Ari Jolma
-
-This library is free software; you can redistribute it and/or modify
-it under the same terms as Perl itself, either Perl version 5.8.5 or,
-at your option, any later version of Perl 5 you may have available.
-
-

+ 0 - 12
swig/perl/R_slope_aspect/R_slope_aspect.xs

@@ -1,12 +0,0 @@
-#include "EXTERN.h"
-#include "perl.h"
-#include "XSUB.h"
-
-#include "ppport.h"
-
-MODULE = R_slope_aspect		PACKAGE = R_slope_aspect		
-
-int 
-r_slope_aspect (argc, argv);
-	int argc
-	char **argv

+ 0 - 113
swig/perl/R_slope_aspect/lib/R_slope_aspect.pm

@@ -1,113 +0,0 @@
-package R_slope_aspect;
-
-use 5.008005;
-use strict;
-use warnings;
-use Carp;
-
-require Exporter;
-use AutoLoader;
-
-our @ISA = qw(Exporter);
-
-# Items to export into callers namespace by default. Note: do not export
-# names by default without a very good reason. Use EXPORT_OK instead.
-# Do not simply export all your public functions/methods/constants.
-
-# This allows declaration	use R_slope_aspect ':all';
-# If you do not need this, moving things directly into @EXPORT or @EXPORT_OK
-# will save memory.
-our %EXPORT_TAGS = ( 'all' => [ qw(
-	
-) ] );
-
-our @EXPORT_OK = ( @{ $EXPORT_TAGS{'all'} } );
-
-our @EXPORT = qw(
-	
-);
-
-our $VERSION = '0.01';
-
-sub AUTOLOAD {
-    # This AUTOLOAD is used to 'autoload' constants from the constant()
-    # XS function.
-
-    my $constname;
-    our $AUTOLOAD;
-    ($constname = $AUTOLOAD) =~ s/.*:://;
-    croak "&R_slope_aspect::constant not defined" if $constname eq 'constant';
-    my ($error, $val) = constant($constname);
-    if ($error) { croak $error; }
-    {
-	no strict 'refs';
-	# Fixed between 5.005_53 and 5.005_61
-#XXX	if ($] >= 5.00561) {
-#XXX	    *$AUTOLOAD = sub () { $val };
-#XXX	}
-#XXX	else {
-	    *$AUTOLOAD = sub { $val };
-#XXX	}
-    }
-    goto &$AUTOLOAD;
-}
-
-require XSLoader;
-XSLoader::load('R_slope_aspect', $VERSION);
-
-# Preloaded methods go here.
-
-# Autoload methods go after =cut, and are processed by the autosplit program.
-
-1;
-__END__
-# Below is stub documentation for your module. You'd better edit it!
-
-=head1 NAME
-
-R_slope_aspect - Perl extension for blah blah blah
-
-=head1 SYNOPSIS
-
-  use R_slope_aspect;
-  blah blah blah
-
-=head1 DESCRIPTION
-
-Stub documentation for R_slope_aspect, created by h2xs. It looks like the
-author of the extension was negligent enough to leave the stub
-unedited.
-
-Blah blah blah.
-
-=head2 EXPORT
-
-None by default.
-
-
-
-=head1 SEE ALSO
-
-Mention other useful documentation such as the documentation of
-related modules or operating system documentation (such as man pages
-in UNIX), or any relevant external documentation such as RFCs or
-standards.
-
-If you have a mailing list set up for your module, mention it here.
-
-If you have a web site set up for your module, mention it here.
-
-=head1 AUTHOR
-
-Ari Jolma, E<lt>ajolma@localdomainE<gt>
-
-=head1 COPYRIGHT AND LICENSE
-
-Copyright (C) 2005 by Ari Jolma
-
-This library is free software; you can redistribute it and/or modify
-it under the same terms as Perl itself, either Perl version 5.8.5 or,
-at your option, any later version of Perl 5 you may have available.
-
-
-=cut

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 0 - 1180
swig/perl/R_slope_aspect/ppport.h


+ 0 - 35
swig/perl/R_slope_aspect/r_slope_aspect/Makefile.PL

@@ -1,35 +0,0 @@
-use ExtUtils::MakeMaker;
-$Verbose = 1;
-$ranlib = 'ranlib';
-$fopt = '-D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -O2 -Wall -fpic -ggdb -DPACKAGE=\""grassmods"\"';
-
-@incdirs = ('/usr/include',"$grass_inc_dir");
-@c_files = ('r_slope_aspect.c','opennew.c');
-
-$incs = '';
-foreach (@incdirs) {
-    $incs .= " -I$_";
-}
-$co_files = $c_files = join(' ',@c_files);
-$co_files =~ s/\.c/.o/g;
-
-WriteMakefile(
-	      NAME      => 'R_slope_aspect::r_slope_aspect',
-	      INC	=> $incs,
-	      DEFINE    => $fopt,
-	      clean     => {'FILES' => 'libr_slope_aspect$(LIB_EXT)'},
-	      );
-
-sub MY::top_targets {
-'
-pure_all ::
-
-all :: static
-
-static :: libr_slope_aspect$(LIB_EXT)
-
-libr_slope_aspect$(LIB_EXT): ' . $c_files . ' ' . $co_files . '
-	$(AR) cr libr_slope_aspect$(LIB_EXT) ' . $co_files . '
-	' . $ranlib . ' libr_slope_aspect$(LIB_EXT)
-';
-}

+ 0 - 2
swig/perl/R_slope_aspect/r_slope_aspect/local_proto.h

@@ -1,2 +0,0 @@
-/* opennew.c */
-int opennew(char *, RASTER_MAP_TYPE);

+ 0 - 19
swig/perl/R_slope_aspect/r_slope_aspect/opennew.c

@@ -1,19 +0,0 @@
-#include <stdlib.h>
-#include <grass/gis.h>
-#include <grass/glocale.h>
-
-
-int opennew(char *name, RASTER_MAP_TYPE wr_type)
-{
-    int fd;
-
-    if (wr_type < 0)		/* default fp type */
-	fd = Rast_open_fp_new(name);
-    else
-	fd = Rast_open_new(name, wr_type);
-
-    if (fd < 0)
-	G_fatal_error(_("Failed in attempt to open %s"), name);
-
-    return fd;
-}

Những thai đổi đã bị hủy bỏ vì nó quá lớn
+ 0 - 1433
swig/perl/R_slope_aspect/r_slope_aspect/r_slope_aspect.c


+ 0 - 1
swig/perl/R_slope_aspect/r_slope_aspect/r_slope_aspect.h

@@ -1 +0,0 @@
-int r_slope_aspect(int argc, char *argv[]);

+ 0 - 17
swig/perl/R_slope_aspect/test.pl

@@ -1,17 +0,0 @@
-# Before `make install' is performed this script should be runnable with
-# `make test'. After `make install' it should work as `perl R_slope_aspect.t'
-
-#########################
-
-# change 'tests => 1' to 'tests => last_test_to_print';
-
-BEGIN { $| = 1; }
-END {print "not ok 1\n" unless $loaded;}
-use Grass;
-use R_slope_aspect;
-use POSIX;
-$loaded = 1;
-
-print "ok\n";
-
-r_slope_aspect::r_slope_aspect();

+ 0 - 0
swig/perl/R_slope_aspect/typemap


+ 0 - 75
swig/perl/fallback/const-c.inc

@@ -1,75 +0,0 @@
-#define PERL_constant_NOTFOUND	1
-#define PERL_constant_NOTDEF	2
-#define PERL_constant_ISIV	3
-#define PERL_constant_ISNO	4
-#define PERL_constant_ISNV	5
-#define PERL_constant_ISPV	6
-#define PERL_constant_ISPVN	7
-#define PERL_constant_ISSV	8
-#define PERL_constant_ISUNDEF	9
-#define PERL_constant_ISUV	10
-#define PERL_constant_ISYES	11
-
-#ifndef NVTYPE
-typedef double NV; /* 5.6 and later define NVTYPE, and typedef NV to it.  */
-#endif
-#ifndef aTHX_
-#define aTHX_ /* 5.6 or later define this for threading support.  */
-#endif
-#ifndef pTHX_
-#define pTHX_ /* 5.6 or later define this for threading support.  */
-#endif
-
-static int
-constant (pTHX_ const char *name, STRLEN len, IV *iv_return) {
-  /* Initially switch on the length of the name.  */
-  /* When generated this function returned values for the list of names given
-     in this section of perl code.  Rather than manually editing these functions
-     to add or remove constants, which would result in this comment and section
-     of code becoming inaccurate, we recommend that you edit this section of
-     code, and use it to regenerate a new set of constant functions which you
-     then use to replace the originals.
-
-     Regenerate these constant functions by feeding this entire source file to
-     perl -x
-
-#!/usr/bin/perl -w
-use ExtUtils::Constant qw (constant_types C_constant XS_constant);
-
-my $types = {map {($_, 1)} qw(IV)};
-my @names = (qw(CONCAVE CONVEX));
-
-print constant_types(); # macro defs
-foreach (C_constant ("Geo::Vector", 'constant', 'IV', $types, undef, 3, @names) ) {
-    print $_, "\n"; # C constant subs
-}
-print "#### XS Section:\n";
-print XS_constant ("Geo::Vector", $types);
-__END__
-   */
-
-  switch (len) {
-  case 6:
-    if (memEQ(name, "CONVEX", 6)) {
-#ifdef CONVEX
-      *iv_return = CONVEX;
-      return PERL_constant_ISIV;
-#else
-      return PERL_constant_NOTDEF;
-#endif
-    }
-    break;
-  case 7:
-    if (memEQ(name, "CONCAVE", 7)) {
-#ifdef CONCAVE
-      *iv_return = CONCAVE;
-      return PERL_constant_ISIV;
-#else
-      return PERL_constant_NOTDEF;
-#endif
-    }
-    break;
-  }
-  return PERL_constant_NOTFOUND;
-}
-

+ 0 - 88
swig/perl/fallback/const-xs.inc

@@ -1,88 +0,0 @@
-void
-constant(sv)
-    PREINIT:
-#ifdef dXSTARG
-	dXSTARG; /* Faster if we have it.  */
-#else
-	dTARGET;
-#endif
-	STRLEN		len;
-        int		type;
-	IV		iv;
-	/* NV		nv;	Uncomment this if you need to return NVs */
-	/* const char	*pv;	Uncomment this if you need to return PVs */
-    INPUT:
-	SV *		sv;
-        const char *	s = SvPV(sv, len);
-    PPCODE:
-        /* Change this to constant(aTHX_ s, len, &iv, &nv);
-           if you need to return both NVs and IVs */
-	type = constant(aTHX_ s, len, &iv);
-      /* Return 1 or 2 items. First is error message, or undef if no error.
-           Second, if present, is found value */
-        switch (type) {
-        case PERL_constant_NOTFOUND:
-          sv = sv_2mortal(newSVpvf("%s is not a valid Geo::Vector macro", s));
-          PUSHs(sv);
-          break;
-        case PERL_constant_NOTDEF:
-          sv = sv_2mortal(newSVpvf(
-	    "Your vendor has not defined Geo::Vector macro %s, used", s));
-          PUSHs(sv);
-          break;
-        case PERL_constant_ISIV:
-          EXTEND(SP, 1);
-          PUSHs(&PL_sv_undef);
-          PUSHi(iv);
-          break;
-	/* Uncomment this if you need to return NOs
-        case PERL_constant_ISNO:
-          EXTEND(SP, 1);
-          PUSHs(&PL_sv_undef);
-          PUSHs(&PL_sv_no);
-          break; */
-	/* Uncomment this if you need to return NVs
-        case PERL_constant_ISNV:
-          EXTEND(SP, 1);
-          PUSHs(&PL_sv_undef);
-          PUSHn(nv);
-          break; */
-	/* Uncomment this if you need to return PVs
-        case PERL_constant_ISPV:
-          EXTEND(SP, 1);
-          PUSHs(&PL_sv_undef);
-          PUSHp(pv, strlen(pv));
-          break; */
-	/* Uncomment this if you need to return PVNs
-        case PERL_constant_ISPVN:
-          EXTEND(SP, 1);
-          PUSHs(&PL_sv_undef);
-          PUSHp(pv, iv);
-          break; */
-	/* Uncomment this if you need to return SVs
-        case PERL_constant_ISSV:
-          EXTEND(SP, 1);
-          PUSHs(&PL_sv_undef);
-          PUSHs(sv);
-          break; */
-	/* Uncomment this if you need to return UNDEFs
-        case PERL_constant_ISUNDEF:
-          break; */
-	/* Uncomment this if you need to return UVs
-        case PERL_constant_ISUV:
-          EXTEND(SP, 1);
-          PUSHs(&PL_sv_undef);
-          PUSHu((UV)iv);
-          break; */
-	/* Uncomment this if you need to return YESs
-        case PERL_constant_ISYES:
-          EXTEND(SP, 1);
-          PUSHs(&PL_sv_undef);
-          PUSHs(&PL_sv_yes);
-          break; */
-        default:
-          sv = sv_2mortal(newSVpvf(
-	    "Unexpected return type %d while processing Geo::Vector macro %s, used",
-               type, s));
-          PUSHs(sv);
-        }

+ 0 - 11
swig/perl/grass.i

@@ -1,11 +0,0 @@
-%module Grass
-%{
-#include "gis.h"
-%}
-%include "gisdefs.h"
-
-%include typemaps.i
-
-int r_slope_aspect (int argc, char **argv);
-
-

+ 0 - 20
swig/perl/index.dox

@@ -1,20 +0,0 @@
-/*! \page GRASS_SWIG_PERL GRASS SWIG/PERL interface
-
-<h2>GRASS SWIG/PERL interface</h2>
-
-This interface permits to use GRASS functionality from PERL.
-
-<h2>Status of GRASS SWIG/PERL implementation</h2>
-
-At the moment a prototype is implemented. It permits to use 
-the GRASS raster command <em>r.slope.aspect</em> directly
-from the PERL programming language.
-<P>
-See: 
-
-  Grass.pm
-
-  R_slope_aspect/test.pl
-
-*/
-

+ 0 - 53
swig/perl/t/R_slope_aspect.t

@@ -1,53 +0,0 @@
-# Before `make install' is performed this script should be runnable with
-# `make test'. After `make install' it should work as `perl test.pl'
-
-######################### We start with some black magic to print on failure.
-
-# Change 1..1 below to 1..last_test_to_print .
-# (It may become useful if the test is moved to ./t subdirectory.)
-
-BEGIN { $| = 1; }
-END {print "not ok 1\n" unless $loaded;}
-use Grass;
-use POSIX;
-$loaded = 1;
-
-sub ok {
-    my($test,$msg,$r) = @_;
-    $tests_failed = 0 unless defined $tests_failed;
-    $test_nr = 1 unless defined $test_nr;
-
-    if (1) {
-	print $test ? "ok" : "not ok";
-	print " $test_nr - $msg             ";
-	print $sub_tests ? "\r" : "\n";
-    }
-
-    $sub_tests = 0;
-    unless ($test) {
-	$tests_failed++;
-	push @test_failed,"$test_nr - $msg\n";
-    }
-    $test_nr++;
-    $sub_tests = 1 if $r;
-    return $test;
-}
-
-sub tests_done {
-    $test_nr--;
-    print "\n$tests_failed/$test_nr tests failed\n";
-    print "failed tests were:\n @test_failed\n" if @test_failed;
-}
-
-ok(1,"loaded");
-
-######################### End of black magic.
-
-# Insert your test code below (better if it prints "ok 13"
-# (correspondingly "not ok 13") depending on the success of chunk 13
-# of the test code):
-
-### Basic tests
-
-Grass::r_slope_aspect(1,['abc']);
-

+ 0 - 22
swig/perl/typemaps.i

@@ -1,22 +0,0 @@
-%typemap(perl5,in) char ** {
-	AV *tempav;
-	I32 len;
-	int i;
-	SV **tv;
-	if (!SvROK($input))
-	croak("$input is not a reference.");
-	if (SvTYPE(SvRV($input)) != SVt_PVAV)
-	croak("$input is not an array.");
-	tempav = (AV*)SvRV($input);
-	len = av_len(tempav);
-	$1 = (char **) malloc((len+2)*sizeof(char *));
-	for (i = 0; i <= len; i++) {
-		tv = av_fetch(tempav, i, 0);
-		$1[i] = (char *) SvPV_nolen(*tv);
-	}
-	$1[i] = 0;	
-}
-
-%typemap(perl5,freearg) char ** {
-	free($input);
-}

+ 0 - 55
swig/perl2/README

@@ -1,55 +0,0 @@
-The very beginning of a swig interface for Grass.
-- Version 2 -
-
-This is mainly Perl. Swig supports many languages, thus generic Swig
-things should be separated and only Swig/Perl things left here.
-
-Files:
- error.c:	error functions
- grass.i:	typemap
- typemaps.i:	typemap
- make.pl.in:	generates make.pl
- README:	you are reading this
-
-
-Compiling this is done the usual perl way:
-
-# this takes a while...
-perl make.pl
-make
-make test
-
-you won't need this for a very long time:
-make install
-
-What I've done:
-
-1) the skeleton was created using h2xs
-
-2) hand-edited grass.i and typemaps.i
-
-It might be a good idea to create a thin header layer between the
-actual Grass and Swig.
-
-3) the job perl'izes all GRASS modules in raster/ and vector/
-   (watch out for compilation errors)
-
-Please extend and enjoy :)
-
-Ari Jolma
-
-ari.jolma tkk.fi
-
-##############
-Cleanup:
-
-   rm -f make.pl pm_to_blib Makefile.PL Makefile_grass grass_wrap.c Grass.pm
-   rm -rf blib raster vector
-   rm -f *.o Grass.bs
-
-##############
-Ref:
-Thread:
-  http://grass.itc.it/pipermail/grass5/2005-August/019435.html
-  + personal mails to Markus Neteler
-

+ 0 - 12
swig/perl2/error.c

@@ -1,12 +0,0 @@
-#include <stdlib.h>
-#include <stdio.h>
-
-void my_error_routine(char *msg, int fatal)
-{
-    fprintf(stderr, "Grass error: %s\n", msg);
-}
-
-void set_my_error_routine()
-{
-    G_set_error_routine(my_error_routine);
-}

+ 0 - 9
swig/perl2/grass.i

@@ -1,9 +0,0 @@
-%module Grass
-%{
-#include "grass/gis.h"
-%}
-%include "grass/gisdefs.h"
-
-%include typemaps.i
-
-void set_my_error_routine();

+ 0 - 240
swig/perl2/make.pl.in

@@ -1,240 +0,0 @@
-use File::Path;
-
-for (@ARGV) {
-    $skip_grass = 1 if /--skip_grass/;
-    $run_tests = 1 if /--run_tests/;
-}
-
-$ranlib = 'ranlib';
-$fopt = '-Wall -fpic -ggdb -DPACKAGE=\""grassmods"\"';
-
-# these variables are expanded by the main 'configure':
-$grass_dir     = '@GRASS_HOME@';
-$grass_arch    = '@ARCH@';
-$grass_inc_dir = "$grass_dir/dist.$grass_arch/include";
-$grass_lib_dir = "$grass_dir/dist.$grass_arch/lib";
-$x_lib_dir     = '@X_LIBS@';
-
-@incdirs = ('/usr/include',"$grass_inc_dir");
-$incs = '';
-foreach (@incdirs) {
-    $incs .= " -I$_";
-}
-
-
-opendir(DIR, $grass_lib_dir) or die "Can’t open $grass_lib_dir: $!";
-@tmp = grep { /\.so$/ && -f "$grass_lib_dir/$_" } readdir(DIR);
-closedir DIR;
-
-for (@tmp) {
-    next if /cvs/;
-    s/lib/-l/;
-    s/.so$//;
-    push @grass_libs, $_;
-}
-
-$grass_libs = "-L$grass_lib_dir $x_lib_dir -lX11 " . join(' ',@grass_libs);
-
-
-# make basic Grass module
-
-unless ($skip_grass) {
-    system "swig -Wall -I$grass_inc_dir -perl5 -o grass_wrap.c grass.i";
-
-    open(MAKEFILE_PL, ">Makefile.PL")or die "Can’t open Makefile.PL: $!";
-    print MAKEFILE_PL <<end_of_this0;
-use ExtUtils::MakeMaker;
-    
-WriteMakefile(
-		  NAME => 'Grass',
-		  MAKEFILE => 'Makefile_grass',
-		  LIBS      => '$grass_libs',
-		  OBJECT => 'grass_wrap.o error.o',
-		  INC => "-I$grass_inc_dir"
-		  );
-end_of_this0
-    close MAKEFILE_PL;
-    
-    system "perl Makefile.PL";
-    system "make -f Makefile_grass";
-}
-#exit;
-
-
-# make command modules:
-
-$curdir = `pwd`;
-chomp $curdir;
-
-# add more directories here:
-$root = 'raster';
-rmtree($root);
-recurse_dirs('../..',$root);
-
-$root = 'vector';
-rmtree($root);
-recurse_dirs('../..',$root);
-
-sub recurse_dirs {
-    my @dir = @_;
-
-    my $dir = join '/',@dir;
-
-    if (-f "$dir/main.c") {
-	has_main_c(@dir);
-    }
-
-    opendir(DIR, $dir) or die "can't opendir $dir: $!";    
-    my @contents = readdir(DIR);
-    closedir DIR;
-    
-    for my $e (@contents) {
-
-	next unless -d "$dir/$e";
-	next if $e eq '.';
-	next if $e eq '..';
-	recurse_dirs(@dir,$e);
-    }
-}
-
-sub has_main_c {
-    my @dir = @_;
-    my $src = join '/',@dir;
-    shift @dir;
-    my $dst = join '/',@dir;
-
-
-# 1. step: make copies of source code
-    mkpath($dst) unless -d $dst;
-    my $name = pop @dir;
-    $name =~ s/\./_/g;
-    system "cp $src/*.c $dst";
-    system "cp $src/*.h $dst";
-    open(MAIN_C, "$dst/main.c")or die "Can’t open $dst/main.c: $!";
-    open(NEW_C, ">$dst/$name.c")or die "Can’t open $dst/main.c: $!";
-    my $main_done = 0;
-    while (<MAIN_C>) {
-	if (not $main_done and /\bmain\b/) {
-	    s/\bmain\b/$name/;
-	    $main_done = 1;
-	}
-	s/\bexit\b/return/;
-	print NEW_C;
-    }
-    close NEW_C;
-    close MAIN_C;
-    unlink "$dst/main.c";
-    
-
-# 2. step: compile static library
-    chdir $dst;
-    $lib_name = $name;
-
-    opendir(DIR, '.') or die "Can’t open .: $!";
-    @c_files = grep { /\.c$/ && -f "$_" } readdir(DIR);
-    closedir DIR;
-
-    $o_files = $c_files = join(' ',@c_files);
-    $o_files =~ s/\.c/.o/g;
-
-    my $mod_name = $name;
-    $mod_name =~ s/^(\w)/uc($1)/e;
-
-    open(MAKEFILE_PL, ">Makefile.PL")or die "Can’t open Makefile.PL: $!";
-    print MAKEFILE_PL <<end_of_this;
-use ExtUtils::MakeMaker;
-
-WriteMakefile(
-	      NAME      => '${mod_name}::$name',
-	      INC	=> '$incs',
-	      DEFINE    => '$fopt',
-	      clean     => {'FILES' => '$name\$(LIB_EXT)'},
-	      );
-
-sub MY::top_targets {
-'
-pure_all ::
-
-all :: static
-
-static :: $lib_name\$(LIB_EXT)
-
-$lib_name\$(LIB_EXT): $c_files $o_files
-	\$(AR) cr $lib_name\$(LIB_EXT) $o_files
-	$ranlib $lib_name\$(LIB_EXT)
-';
-}
-    
-end_of_this
-    close MAKEFILE_PL;
-    
-system "perl Makefile.PL";
-system "make";
-rmtree('blib');
-
-
-# 3. step: create the wrapper code & module
-my $mod_name = $lib_name;
-$mod_name =~ s/r_//;
-if ($mod_name =~ /^(\w)/) {
-    my $first_char = uc($1);
-    $mod_name =~ s/^\w/$first_char/;
-}
-$mod_name = "Grass::Raster::$mod_name";
-
-open(SWIG_I, ">$lib_name.i")or die "Can’t open $lib_name.i: $!";
-print SWIG_I <<end_of_this2;
-\%module "$mod_name"
-\%{
-#include "grass/gis.h"
-\%}
-
-\%include $curdir/typemaps.i
-
-\%rename(main) $lib_name;
-int $lib_name (int argc, char **argv);
-end_of_this2
-    close SWIG_I;
-
-system "swig -Wall -perl5 -o ${lib_name}_wrap.c $lib_name.i";
-
-
-# 4. step: create the dynamic library
-open(MAKEFILE_PL, ">Makefile.PL")or die "Can’t open Makefile.PL: $!";
-print MAKEFILE_PL <<end_of_this3;
-use ExtUtils::MakeMaker;
-
-WriteMakefile(
-	      NAME      => '$mod_name',
-	      OBJECT    => '${lib_name}_wrap.o ${lib_name}.a',
-	      INC	=> '$incs',
-	      LIBS      => '$grass_libs',
-	      );
-    
-end_of_this3
-    close MAKEFILE_PL;
-
-open(TEST_PL, ">test.pl")or die "Can’t open test.pl: $!";
-print TEST_PL <<end_of_this4;
-BEGIN { \$| = 1; }
-END {print "not ok 1\\n" unless \$loaded;}
-use Grass;
-use $mod_name;
-use POSIX;
-\$loaded = 1;
-
-print \$loaded ? "1 - ok\\n" : "1 - not ok\\n";
-
-Grass::set_my_error_routine();
-${mod_name}::main(2,['dummy','elevation=dem']);
-end_of_this4
-    close TEST_PL;
-    
-system "perl Makefile.PL";
-system "make";
-system "make test" if $run_tests;
-
-chdir $curdir;
-#exit;
-
-}

+ 0 - 22
swig/perl2/typemaps.i

@@ -1,22 +0,0 @@
-%typemap(perl5,in) char ** {
-	AV *tempav;
-	I32 len;
-	int i;
-	SV **tv;
-	if (!SvROK($input))
-	croak("$input is not a reference.");
-	if (SvTYPE(SvRV($input)) != SVt_PVAV)
-	croak("$input is not an array.");
-	tempav = (AV*)SvRV($input);
-	len = av_len(tempav);
-	$1 = (char **) malloc((len+2)*sizeof(char *));
-	for (i = 0; i <= len; i++) {
-		tv = av_fetch(tempav, i, 0);
-		$1[i] = (char *) SvPV_nolen(*tv);
-	}
-	$1[i] = 0;	
-}
-
-%typemap(perl5,freearg) char ** {
-	free($input);
-}

+ 0 - 124
swig/python/Makefile

@@ -1,124 +0,0 @@
-MODULE_TOPDIR = ../..
-
-PACKAGE = "grasslibs"
-
-include $(MODULE_TOPDIR)/include/Make/Other.make
-include $(MODULE_TOPDIR)/include/Make/Compile.make
-include $(MODULE_TOPDIR)/include/Make/Doxygen.make
-
-# substitute OSX arch flags for python
-ifneq ($(MACOSX_ARCHS),)
-CFLAGS := $(subst $(MACOSX_ARCHS),,$(CFLAGS)) $(MACOSX_ARCHS_PYTHON)
-LDFLAGS := $(subst $(MACOSX_ARCHS),,$(LDFLAGS)) $(MACOSX_ARCHS_PYTHON)
-endif
-
-# doxygen:
-DOXNAME=
-DOXINPUT=grasspython.dox
-
-MODULES = utils date grass raster math proj imagery vector display stats \
-	dbmi g3d arraystats cluster trans vedit
-
-date_LIBS       = $(DATETIMELIB)
-grass_LIBS      = $(GISLIB)
-raster_LIBS     = $(RASTERLIB)
-math_LIBS       = $(GMATHLIB)
-proj_LIBS       = $(GPROJLIB)
-imagery_LIBS    = $(IMAGERYLIB)
-vector_LIBS     = $(VECTLIB)
-display_LIBS    = $(DISPLAYLIB)
-stats_LIBS      = $(STATSLIB)
-dbmi_LIBS       = $(DBMILIB)
-g3d_LIBS        = $(G3DLIB)
-arraystats_LIBS = $(ARRAYSTATSLIB)
-cluster_LIBS    = $(CLUSTERLIB)
-trans_LIBS      = $(TRANSLIB)
-vedit_LIBS      = $(VEDITLIB)
-
-vector_wrap_c_FLAGS = $(VECT_INC) $(VECT_CFLAGS) $(GEOSCFLAGS)
-vedit_wrap_c_FLAGS = $(VECT_INC) $(VECT_CFLAGS)
-proj_wrap_c_FLAGS = $(PROJINC) $(GDALCFLAGS)
-
-EXTRA_SWIG = ../include/python/my_typemaps.i ../include/python/common.i
-SWIGFLAGS = $(INC) -I../include/python -outdir .
-EXTRA_CFLAGS = $(PYMOD_CFLAGS)
-EXTRA_CLEAN_FILES := $(foreach M,$(MODULES),$(M)_wrap.o $(M)_wrap.c $(M).pyc $(M).py _$(M).so)
-CLEAN_SUBDIRS = NumPtr
-
-ifneq ($(MINGW),)
-SWIGFLAGS += -D__MINGW32__
-EXTRA_LIBS = $(INTLLIB)
-endif
-
-include $(MODULE_TOPDIR)/include/Make/Python.make
-
-PYDIR = $(ETC)/python
-GDIR = $(PYDIR)/grass
-DSTDIR = $(GDIR)/lib
-
-LIBFILES := $(patsubst %,$(DSTDIR)/_%.so,$(MODULES))
-PYFILES  := $(patsubst %,$(DSTDIR)/%.py,$(MODULES) __init__)
-PYCFILES  := $(patsubst %,$(DSTDIR)/%.pyc,$(MODULES) __init__)
-LLIBFILES := $(patsubst %,_%.so,$(MODULES))
-WRAPFILES := $(patsubst %,%_wrap.c,$(MODULES))
-LPYFILES := $(patsubst %,%.py,$(MODULES))
-
-default:
-	$(MAKE) $(DSTDIR)
-	$(MAKE) $(LLIBFILES) $(WRAPFILES) $(LPYFILES) $(LIBFILES) $(PYFILES) $(PYCFILES)
-
-%_wrap.c %.py: ../include/%.i $(EXTRA_SWIG)
-	$(SWIG) $(SWIGFLAGS) -python -o $*_wrap.c -module $* -shadow $<
-
-%_wrap.c %.py: ../include/python/%.i $(EXTRA_SWIG)
-	$(SWIG) $(SWIGFLAGS) -python -o $*_wrap.c -module $* -shadow $<
-
-$(PYDIR):
-	$(MKDIR) $@
-
-$(GDIR): | $(PYDIR)
-	$(MKDIR) $@
-
-$(DSTDIR): | $(GDIR)
-	$(MKDIR) $@
-
-$(DSTDIR)/_%.so: _%.so | $(DSTDIR)
-	$(INSTALL) $< $@
-
-$(DSTDIR)/%.py: %.py | $(DSTDIR)
-	$(INSTALL_DATA) $< $@
-
-numptr:
-	$(MAKE) -C NumPtr
-
-.PHONY: numptr
-
-.SECONDARY: $(patsubst %,%.py,$(MODULES))
-
-.SECONDARY: $(patsubst %,%_wrap.c,$(MODULES))
-
-.SECONDARY: $(patsubst %,$(OBJDIR)/%_wrap.o,$(MODULES))
-
-.SECONDARY: $(patsubst %,_%.so,$(MODULES))
-
-date_wrap.c: $(GISBASE)/include/grass/datetime.h
-date_wrap.c: $(GISBASE)/include/grass/P_datetime.h
-grass_wrap.c: $(GISBASE)/include/grass/gis.h
-grass_wrap.c: $(GISBASE)/include/grass/gisdefs.h
-raster_wrap.c: $(GISBASE)/include/grass/raster.h
-math_wrap.c: $(GISBASE)/include/grass/gmath.h
-proj_wrap.c: $(GISBASE)/include/grass/gprojects.h
-imagery_wrap.c: $(GISBASE)/include/grass/imagedefs.h
-imagery_wrap.c: $(GISBASE)/include/grass/imagery.h
-vector_wrap.c: $(GISBASE)/include/grass/vector.h
-vector_wrap.c: $(GISBASE)/include/grass/vect/dig_defines.h
-vector_wrap.c: $(GISBASE)/include/grass/vect/dig_structs.h
-display_wrap.c: $(GISBASE)/include/grass/display.h
-stats_wrap.c: $(GISBASE)/include/grass/stats.h
-dbmi_wrap.c: $(GISBASE)/include/grass/dbmi.h
-dbmi_wrap.c: $(GISBASE)/include/grass/proto_dbmi.h
-g3d_wrap.c: $(GISBASE)/include/grass/G3d.h
-arraystats_wrap.c: $(GISBASE)/include/grass/arraystats.h
-cluster_wrap.c: $(GISBASE)/include/grass/cluster.h
-trans_wrap.c: $(GISBASE)/include/grass/transform.h
-vedit_wrap.c: $(GISBASE)/include/grass/vedit.h

+ 0 - 5
swig/python/NumPtr/AUTHORS

@@ -1,5 +0,0 @@
-The following people have made this package possible:
-
-Rodrigo Caballero Augi (rca@geosci.uchicago.edu)
-Christian Dieterich (cdieterich@geosci.uchicago.edu)
-Michael Steder (steder@gmail.com)

+ 0 - 340
swig/python/NumPtr/COPYING

@@ -1,340 +0,0 @@
-		    GNU GENERAL PUBLIC LICENSE
-		       Version 2, June 1991
-
- Copyright (C) 1989, 1991 Free Software Foundation, Inc.
-                       59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
- Everyone is permitted to copy and distribute verbatim copies
- of this license document, but changing it is not allowed.
-
-			    Preamble
-
-  The licenses for most software are designed to take away your
-freedom to share and change it.  By contrast, the GNU General Public
-License is intended to guarantee your freedom to share and change free
-software--to make sure the software is free for all its users.  This
-General Public License applies to most of the Free Software
-Foundation's software and to any other program whose authors commit to
-using it.  (Some other Free Software Foundation software is covered by
-the GNU Library General Public License instead.)  You can apply it to
-your programs, too.
-
-  When we speak of free software, we are referring to freedom, not
-price.  Our General Public Licenses are designed to make sure that you
-have the freedom to distribute copies of free software (and charge for
-this service if you wish), that you receive source code or can get it
-if you want it, that you can change the software or use pieces of it
-in new free programs; and that you know you can do these things.
-
-  To protect your rights, we need to make restrictions that forbid
-anyone to deny you these rights or to ask you to surrender the rights.
-These restrictions translate to certain responsibilities for you if you
-distribute copies of the software, or if you modify it.
-
-  For example, if you distribute copies of such a program, whether
-gratis or for a fee, you must give the recipients all the rights that
-you have.  You must make sure that they, too, receive or can get the
-source code.  And you must show them these terms so they know their
-rights.
-
-  We protect your rights with two steps: (1) copyright the software, and
-(2) offer you this license which gives you legal permission to copy,
-distribute and/or modify the software.
-
-  Also, for each author's protection and ours, we want to make certain
-that everyone understands that there is no warranty for this free
-software.  If the software is modified by someone else and passed on, we
-want its recipients to know that what they have is not the original, so
-that any problems introduced by others will not reflect on the original
-authors' reputations.
-
-  Finally, any free program is threatened constantly by software
-patents.  We wish to avoid the danger that redistributors of a free
-program will individually obtain patent licenses, in effect making the
-program proprietary.  To prevent this, we have made it clear that any
-patent must be licensed for everyone's free use or not licensed at all.
-
-  The precise terms and conditions for copying, distribution and
-modification follow.
-
-		    GNU GENERAL PUBLIC LICENSE
-   TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION
-
-  0. This License applies to any program or other work which contains
-a notice placed by the copyright holder saying it may be distributed
-under the terms of this General Public License.  The "Program", below,
-refers to any such program or work, and a "work based on the Program"
-means either the Program or any derivative work under copyright law:
-that is to say, a work containing the Program or a portion of it,
-either verbatim or with modifications and/or translated into another
-language.  (Hereinafter, translation is included without limitation in
-the term "modification".)  Each licensee is addressed as "you".
-
-Activities other than copying, distribution and modification are not
-covered by this License; they are outside its scope.  The act of
-running the Program is not restricted, and the output from the Program
-is covered only if its contents constitute a work based on the
-Program (independent of having been made by running the Program).
-Whether that is true depends on what the Program does.
-
-  1. You may copy and distribute verbatim copies of the Program's
-source code as you receive it, in any medium, provided that you
-conspicuously and appropriately publish on each copy an appropriate
-copyright notice and disclaimer of warranty; keep intact all the
-notices that refer to this License and to the absence of any warranty;
-and give any other recipients of the Program a copy of this License
-along with the Program.
-
-You may charge a fee for the physical act of transferring a copy, and
-you may at your option offer warranty protection in exchange for a fee.
-
-  2. You may modify your copy or copies of the Program or any portion
-of it, thus forming a work based on the Program, and copy and
-distribute such modifications or work under the terms of Section 1
-above, provided that you also meet all of these conditions:
-
-    a) You must cause the modified files to carry prominent notices
-    stating that you changed the files and the date of any change.
-
-    b) You must cause any work that you distribute or publish, that in
-    whole or in part contains or is derived from the Program or any
-    part thereof, to be licensed as a whole at no charge to all third
-    parties under the terms of this License.
-
-    c) If the modified program normally reads commands interactively
-    when run, you must cause it, when started running for such
-    interactive use in the most ordinary way, to print or display an
-    announcement including an appropriate copyright notice and a
-    notice that there is no warranty (or else, saying that you provide
-    a warranty) and that users may redistribute the program under
-    these conditions, and telling the user how to view a copy of this
-    License.  (Exception: if the Program itself is interactive but
-    does not normally print such an announcement, your work based on
-    the Program is not required to print an announcement.)
-
-These requirements apply to the modified work as a whole.  If
-identifiable sections of that work are not derived from the Program,
-and can be reasonably considered independent and separate works in
-themselves, then this License, and its terms, do not apply to those
-sections when you distribute them as separate works.  But when you
-distribute the same sections as part of a whole which is a work based
-on the Program, the distribution of the whole must be on the terms of
-this License, whose permissions for other licensees extend to the
-entire whole, and thus to each and every part regardless of who wrote it.
-
-Thus, it is not the intent of this section to claim rights or contest
-your rights to work written entirely by you; rather, the intent is to
-exercise the right to control the distribution of derivative or
-collective works based on the Program.
-
-In addition, mere aggregation of another work not based on the Program
-with the Program (or with a work based on the Program) on a volume of
-a storage or distribution medium does not bring the other work under
-the scope of this License.
-
-  3. You may copy and distribute the Program (or a work based on it,
-under Section 2) in object code or executable form under the terms of
-Sections 1 and 2 above provided that you also do one of the following:
-
-    a) Accompany it with the complete corresponding machine-readable
-    source code, which must be distributed under the terms of Sections
-    1 and 2 above on a medium customarily used for software interchange; or,
-
-    b) Accompany it with a written offer, valid for at least three
-    years, to give any third party, for a charge no more than your
-    cost of physically performing source distribution, a complete
-    machine-readable copy of the corresponding source code, to be
-    distributed under the terms of Sections 1 and 2 above on a medium
-    customarily used for software interchange; or,
-
-    c) Accompany it with the information you received as to the offer
-    to distribute corresponding source code.  (This alternative is
-    allowed only for noncommercial distribution and only if you
-    received the program in object code or executable form with such
-    an offer, in accord with Subsection b above.)
-
-The source code for a work means the preferred form of the work for
-making modifications to it.  For an executable work, complete source
-code means all the source code for all modules it contains, plus any
-associated interface definition files, plus the scripts used to
-control compilation and installation of the executable.  However, as a
-special exception, the source code distributed need not include
-anything that is normally distributed (in either source or binary
-form) with the major components (compiler, kernel, and so on) of the
-operating system on which the executable runs, unless that component
-itself accompanies the executable.
-
-If distribution of executable or object code is made by offering
-access to copy from a designated place, then offering equivalent
-access to copy the source code from the same place counts as
-distribution of the source code, even though third parties are not
-compelled to copy the source along with the object code.
-
-  4. You may not copy, modify, sublicense, or distribute the Program
-except as expressly provided under this License.  Any attempt
-otherwise to copy, modify, sublicense or distribute the Program is
-void, and will automatically terminate your rights under this License.
-However, parties who have received copies, or rights, from you under
-this License will not have their licenses terminated so long as such
-parties remain in full compliance.
-
-  5. You are not required to accept this License, since you have not
-signed it.  However, nothing else grants you permission to modify or
-distribute the Program or its derivative works.  These actions are
-prohibited by law if you do not accept this License.  Therefore, by
-modifying or distributing the Program (or any work based on the
-Program), you indicate your acceptance of this License to do so, and
-all its terms and conditions for copying, distributing or modifying
-the Program or works based on it.
-
-  6. Each time you redistribute the Program (or any work based on the
-Program), the recipient automatically receives a license from the
-original licensor to copy, distribute or modify the Program subject to
-these terms and conditions.  You may not impose any further
-restrictions on the recipients' exercise of the rights granted herein.
-You are not responsible for enforcing compliance by third parties to
-this License.
-
-  7. If, as a consequence of a court judgment or allegation of patent
-infringement or for any other reason (not limited to patent issues),
-conditions are imposed on you (whether by court order, agreement or
-otherwise) that contradict the conditions of this License, they do not
-excuse you from the conditions of this License.  If you cannot
-distribute so as to satisfy simultaneously your obligations under this
-License and any other pertinent obligations, then as a consequence you
-may not distribute the Program at all.  For example, if a patent
-license would not permit royalty-free redistribution of the Program by
-all those who receive copies directly or indirectly through you, then
-the only way you could satisfy both it and this License would be to
-refrain entirely from distribution of the Program.
-
-If any portion of this section is held invalid or unenforceable under
-any particular circumstance, the balance of the section is intended to
-apply and the section as a whole is intended to apply in other
-circumstances.
-
-It is not the purpose of this section to induce you to infringe any
-patents or other property right claims or to contest validity of any
-such claims; this section has the sole purpose of protecting the
-integrity of the free software distribution system, which is
-implemented by public license practices.  Many people have made
-generous contributions to the wide range of software distributed
-through that system in reliance on consistent application of that
-system; it is up to the author/donor to decide if he or she is willing
-to distribute software through any other system and a licensee cannot
-impose that choice.
-
-This section is intended to make thoroughly clear what is believed to
-be a consequence of the rest of this License.
-
-  8. If the distribution and/or use of the Program is restricted in
-certain countries either by patents or by copyrighted interfaces, the
-original copyright holder who places the Program under this License
-may add an explicit geographical distribution limitation excluding
-those countries, so that distribution is permitted only in or among
-countries not thus excluded.  In such case, this License incorporates
-the limitation as if written in the body of this License.
-
-  9. The Free Software Foundation may publish revised and/or new versions
-of the General Public License from time to time.  Such new versions will
-be similar in spirit to the present version, but may differ in detail to
-address new problems or concerns.
-
-Each version is given a distinguishing version number.  If the Program
-specifies a version number of this License which applies to it and "any
-later version", you have the option of following the terms and conditions
-either of that version or of any later version published by the Free
-Software Foundation.  If the Program does not specify a version number of
-this License, you may choose any version ever published by the Free Software
-Foundation.
-
-  10. If you wish to incorporate parts of the Program into other free
-programs whose distribution conditions are different, write to the author
-to ask for permission.  For software which is copyrighted by the Free
-Software Foundation, write to the Free Software Foundation; we sometimes
-make exceptions for this.  Our decision will be guided by the two goals
-of preserving the free status of all derivatives of our free software and
-of promoting the sharing and reuse of software generally.
-
-			    NO WARRANTY
-
-  11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY
-FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW.  EXCEPT WHEN
-OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES
-PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED
-OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
-MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE.  THE ENTIRE RISK AS
-TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU.  SHOULD THE
-PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING,
-REPAIR OR CORRECTION.
-
-  12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
-WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR
-REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
-INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING
-OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED
-TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY
-YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER
-PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE
-POSSIBILITY OF SUCH DAMAGES.
-
-		     END OF TERMS AND CONDITIONS
-
-	    How to Apply These Terms to Your New Programs
-
-  If you develop a new program, and you want it to be of the greatest
-possible use to the public, the best way to achieve this is to make it
-free software which everyone can redistribute and change under these terms.
-
-  To do so, attach the following notices to the program.  It is safest
-to attach them to the start of each source file to most effectively
-convey the exclusion of warranty; and each file should have at least
-the "copyright" line and a pointer to where the full notice is found.
-
-    <one line to give the program's name and a brief idea of what it does.>
-    Copyright (C) <year>  <name of author>
-
-    This program is free software; you can redistribute it and/or modify
-    it under the terms of the GNU General Public License as published by
-    the Free Software Foundation; either version 2 of the License, or
-    (at your option) any later version.
-
-    This program is distributed in the hope that it will be useful,
-    but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with this program; if not, write to the Free Software
-    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-
-
-Also add information on how to contact you by electronic and paper mail.
-
-If the program is interactive, make it output a short notice like this
-when it starts in an interactive mode:
-
-    Gnomovision version 69, Copyright (C) year name of author
-    Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
-    This is free software, and you are welcome to redistribute it
-    under certain conditions; type `show c' for details.
-
-The hypothetical commands `show w' and `show c' should show the appropriate
-parts of the General Public License.  Of course, the commands you use may
-be called something other than `show w' and `show c'; they could even be
-mouse-clicks or menu items--whatever suits your program.
-
-You should also get your employer (if you work as a programmer) or your
-school, if any, to sign a "copyright disclaimer" for the program, if
-necessary.  Here is a sample; alter the names:
-
-  Yoyodyne, Inc., hereby disclaims all copyright interest in the program
-  `Gnomovision' (which makes passes at compilers) written by James Hacker.
-
-  <signature of Ty Coon>, 1 April 1989
-  Ty Coon, President of Vice
-
-This General Public License does not permit incorporating your program into
-proprietary programs.  If your program is a subroutine library, you may
-consider it more useful to permit linking proprietary applications with the
-library.  If this is what you want to do, use the GNU Library General
-Public License instead of this License.

+ 0 - 10
swig/python/NumPtr/ChangeLog

@@ -1,10 +0,0 @@
-Version 1.1:
-	Major additions by Christian Dieterich(CSC)
-	 * Wrapped getpointer1-3 functions into a single python 
-	   routine: getpointer
-	 * Added support for C int and float type arrays as well
-	   as C double types.  The "getpointer" function automatically
-	   checks type and calls the appropriate wrapper code.
-
-Version 1.0:
-	Initial Public Release

+ 0 - 8
swig/python/NumPtr/INSTALL

@@ -1,8 +0,0 @@
-To install simply type the following:
-
-	python setup.py build
-
-As root you can then type:
-	
-	python setup.py install
-

+ 0 - 13
swig/python/NumPtr/Makefile

@@ -1,13 +0,0 @@
-# build NumPtr
-
-all: numptr
-
-numptr:
-	$(PYTHON) setup.py build --build-lib build/lib
-	# build bytecode .pyc file
-	$(PYTHON) build/lib/test.py >& /dev/null
-
-clean:
-	-rm -rf build/
-	-rm -f setup.pyc
-	$(MAKE) -C src clean

+ 0 - 72
swig/python/NumPtr/README

@@ -1,72 +0,0 @@
-Numeric Pointer Module
-
-Written by: Rodrigo Caballero Augi (rca@geosci.uchicago.edu),
-Updated: Christian Dieterich (cdieterich@geosci.uchicago.edu),
-Packaged: Michael Steder (steder@gmail.com)
-Department of Geophysical Sciences, University of Chicago
-(http://geosci.uchicago.edu/csc)
-2004
-
-* Introduction *
-
-The Numeric Pointer module (NumPtr) is a SWIGable module that makes it possible to access data stored in Numeric arrays as if they were normal C/C++ arrays( declared type name[][]; ).
-
-NumPtr was developed to make it possible to work with SWIG'ed C or Fortran climate codes from Python.
-
-This package is also a good example of how to write C extensions for Python that manipulate arrays.
-
-* Getting the Module *
-
-You can download the current version of the module here:
-(http://geosci.uchicago.edu/csc/numptr/)
-
-    * NumPtr 1.1 (Tarball)
-    * NumPtr 1.1 (Zip)
-    * NumPtr 1.1 (Windows Installer)
-
-* Requirements *
-
-    * Python 2.2+ (with Distutils!)
-    * C Compiler
-    * SWIG 1.3+
-
-This package was most recently tested with Python 2.3.3, 
-GCC 3.4.1, and SWIG 1.3.21.
-
-* Compiling NumPtr *
-
-To compile NumPtr you simply have to invoke distutils build process: 
-( $ represents the command prompt )
-
-      $ python setup.py build 
-
-* Installing NumPtr *
-
-To install NumPtr with administrative privileges you must invoke distutils 
-with the "install" option:
-
-      $ python setup.py install 
-
-To install NumPtr into a different directory then the standard or to install 
-it into a home directory (for non-administrators), you can set the "--prefix" 
-or "--install-base" options when calling setup.py. For instance.
-
-      $ python setup.py install --prefix=/home/user 
-
-Alternatively you can simply copy the files from build/lib.ARCH 
-(where ARCH is your machines python version and operating system(kernel) 
-version) to your chosen install location.
-
-      $ cp build/lib.linux-i686-2.3/* /home/user/python-libs/ 
-
-* Using the Module *
-
-* Getting Help *
-
-The Climate Systems Group @ U of C maintains a Wiki community site, 
-if you have questions or comments about the Numeric Pointer module 
-please ask there:
-
-      CSC Wiki (http://geodoc.uchicago.edu/climatewiki)
-
-© Mike Steder: Climate Systems Center, 2004 

+ 0 - 60
swig/python/NumPtr/README.GRASS

@@ -1,60 +0,0 @@
-Added for GRASS's SWIG interface,  Hamish Bowman, 5 March 2008
-
-# NumPtr - Numeric Pointer Module for Python  (GPL2)
-# Homepage: http://geosci.uchicago.edu/csc/numptr/
-# Tarball:  http://geosci.uchicago.edu/csc/numptr/NumPtr-1.1.tar.gz
-#             23k .tgz ; 100k installed
-
-NumPtr is "a SWIGable module that makes it possible to access data stored
-in Numeric arrays as if they were normal C/C++ arrays. NumPtr was
-developed to make it possible to work with SWIG'ed C or Fortran climate
-codes from Python."
-
-
-How to build:
- cd NumPtr
- python setup.py build
-
- Run "python build/lib.linux-i686-2.4/test.py" to test and to create
- a byte-compiled version of the module (NumPtr.pyc). The .pyc file
- is platform independent and may be safely shared among systems.
- Even so, it doesn't hurt to do it ourselves to make sure we are using
- an up to date copy.
-
-
-How to install:
- Copy the fruits of the build into the same place as the GRASS SWIG
-   module (_python_grass7.so etc.). for example:
-
- cp build/lib.linux-i686-2.4/*NumPtr.* ../
-   or to some place on your system: 
- python setup.py install --prefix=/home/user
-   or
- If you prefer you can put it in a directory pointed to by the PYTHONPATH
- environment variable, or use sys.path.append("/path/to/location/") 
- before you import the module.
-
-
-Tutorial:
- http://www.penzilla.net/tutorials/python/numptr/
- It is helpful have the Numeric python module (NumPy) installed too.
-   http://numpy.scipy.org/
-
-
-GRASS SWIG script example:
- See the examples/m.distance
-
-
-Modifications from the upstream tarball:
- * updated setup.py with current version number, upstream URL
- * removed old backup versions of a few files
- * removed binary lib/NumPtr.pyc. It will be automatically regenerated
- * update and GNUify src/Makefile (mostly unused)
- * added this file, VERSION file
-
-
-TODO:
- * incorporate the build into swig/python/Makefile, including setting
-   an appropriate install destination. (use "setup.py install" to do the
-   install or use the common Makefile method for that?)
-

+ 0 - 1
swig/python/NumPtr/VERSION

@@ -1 +0,0 @@
-1.1

+ 0 - 156
swig/python/NumPtr/lib/NumPtr.py

@@ -1,156 +0,0 @@
-"""
-    Copyright 2003,2004 Christian Dieterich
-    rca@geosci.uchicago.edu
-    Department of the Geophysical Sciences, University of Chicago
-    2003
-
-    The Numeric Pointer Module is free software; you can redistribute it 
-    and/or modify it under the terms of the GNU General Public License as 
-    published by the Free Software Foundation; either version 2 of the License,
-    or (at your option) any later version.
-
-    The Numeric Pointer Module is distributed in the hope that it will be 
-    useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with the Numeric Pointer Module; if not, write to the Free Software
-    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-"""
-
-import _NumPtr
-
-def _swig_setattr(self,class_type,name,value):
-    if (name == "this"):
-        if isinstance(value, class_type):
-            self.__dict__[name] = value.this
-            if hasattr(value,"thisown"): self.__dict__["thisown"] = value.thisown
-            del value.thisown
-            return
-    method = class_type.__swig_setmethods__.get(name,None)
-    if method: return method(self,value)
-    self.__dict__[name] = value
-
-def _swig_getattr(self,class_type,name):
-    method = class_type.__swig_getmethods__.get(name,None)
-    if method: return method(self)
-    raise AttributeError,name
-
-import types
-try:
-    _object = types.ObjectType
-    _newclass = 1
-except AttributeError:
-    class _object : pass
-    _newclass = 0
-
-def getpointer(A):
-    """
-    Returns a SWIG pointer to the data in NumPy array object A.
-    Array can be 1, 2 or 3 dimensional and must be of type Float64,
-    Float32 or Int32.
-    """
-    if (len(A.shape) == 0):
-        if (A.typecode() == 'd'):
-            p = _NumPtr.getdpointer1(A)
-        elif (A.typecode() == 'f'):
-            p = _NumPtr.getfpointer1(A)
-        elif (A.typecode() == 'i'):
-            p = _NumPtr.getipointer1(A)
-        else:
-            raise TypeError, "Your array does not have typecode 'd', 'f' or 'i'."
-        return p
-    elif (len(A.shape) == 1):
-        if (A.typecode() == 'd'):
-            p = _NumPtr.getdpointer1(A)
-        elif (A.typecode() == 'f'):
-            p = _NumPtr.getfpointer1(A)
-        elif (A.typecode() == 'i'):
-            p = _NumPtr.getipointer1(A)
-        else:
-            raise TypeError, "Your array does not have typecode 'd', 'f' or 'i'."
-        return p
-    elif (len(A.shape) == 2):
-        if (A.typecode() == 'd'):
-            p = _NumPtr.getdpointer2(A)
-        elif (A.typecode() == 'f'):
-            p = _NumPtr.getfpointer2(A)
-        elif (A.typecode() == 'i'):
-            p = _NumPtr.getipointer2(A)
-        else:
-            raise TypeError, "Your array does not have typecode 'd', 'f' or 'i'."
-        return p
-    elif (len(A.shape) == 3):
-        if (A.typecode() == 'd'):
-            p = _NumPtr.getdpointer3(A)
-        elif (A.typecode() == 'f'):
-            p = _NumPtr.getfpointer3(A)
-        elif (A.typecode() == 'i'):
-            p = _NumPtr.getipointer3(A)
-        else:
-            raise TypeError, "Your array does not have typecode 'd', 'f' or 'i'."
-        return p
-    else:
-        raise TypeError, "Your array has rank > 3."
-
-def verifypointer(Aptr, n=0, m=None, l=None):
-    """
-    Prints the data in NumPy array object A, where Aptr points to.
-    Array can be 1, 2 or 3 dimensional and must be of type Float64,
-    Float32 or Int32.
-    """
-    if (Aptr.count('_p') == 0):
-        if (Aptr.count('_double') == 1):
-            p = _NumPtr.testd1(Aptr, n)
-        elif (Aptr.count('_float') == 1):
-            p = _NumPtr.testf1(Aptr, n)
-        elif (Aptr.count('_int') == 1):
-            p = _NumPtr.testi1(Aptr, n)
-        else:
-            raise TypeError, "Your array does not have typecode 'd', 'f' or 'i'."
-        return p
-    elif (Aptr.count('_p') == 1):
-        if (Aptr.count('_double') == 1):
-            p = _NumPtr.testd1(Aptr, n)
-        elif (Aptr.count('_float') == 1):
-            p = _NumPtr.testf1(Aptr, n)
-        elif (Aptr.count('_int') == 1):
-            p = _NumPtr.testi1(Aptr, n)
-        else:
-            raise TypeError, "Your array does not have typecode 'd', 'f' or 'i'."
-        return p
-    elif (Aptr.count('_p') == 2):
-        if m == None: m = 0
-        if (Aptr.count('_double') == 1):
-            p = _NumPtr.testd2(Aptr, n, m)
-        elif (Aptr.count('_float') == 1):
-            p = _NumPtr.testf2(Aptr, n, m)
-        elif (Aptr.count('_int') == 1):
-            p = _NumPtr.testi2(Aptr, n, m)
-        else:
-            raise TypeError, "Your array does not have typecode 'd', 'f' or 'i'."
-        return p
-    elif (Aptr.count('_p') == 3):
-        if m == None: m = 0
-        if l == None: l = 0
-        if (Aptr.count('_double') == 1):
-            p = _NumPtr.testd3(Aptr, n, m, l)
-        elif (Aptr.count('_float') == 1):
-            p = _NumPtr.testf3(Aptr, n, m, l)
-        elif (Aptr.count('_int') == 1):
-            p = _NumPtr.testi3(Aptr, n, m, l)
-        else:
-            raise TypeError, "Your array does not have typecode 'd', 'f' or 'i'."
-        return p
-    else:
-        raise TypeError, "Your array has rank greater than 3."
-
-def getpointer1(A):
-    return getpointer(A)
-
-def getpointer2(A):
-    return getpointer(A)
-
-def getpointer3(A):
-    return getpointer(A)

+ 0 - 2
swig/python/NumPtr/lib/__init__.py

@@ -1,2 +0,0 @@
-from NumPtr import getpointer
-from NumPtr import verifypointer

+ 0 - 79
swig/python/NumPtr/lib/test.py

@@ -1,79 +0,0 @@
-from Numeric import *
-from NumPtr import *
-from _NumPtr import *
-
-a = array([1,2,3,4,5,6],Float64)
-print a
-p=getpointer(a)
-print p
-test1(p,6)
-
-a = array([[1,2,3],[4,5,6]],Float64)
-print a
-p=getpointer(a)
-print p
-test2(p,2,3)
-
-a = array([ [[1,2,3],[4,5,6]] , [[7,8,9],[10,11,12]] ],Float64)
-print a
-print len(a.shape)
-p=getpointer(a)
-print p
-test3(p,2,2,3)
-
-a = array([1,2,3,4,5,6],Float64)
-print a
-p=getpointer(a)
-print p
-testd1(p,6)
-
-a = array([[1,2,3],[4,5,6]],Float64)
-print a
-p=getpointer(a)
-print p
-testd2(p,2,3)
-
-a = array([ [[1,2,3],[4,5,6]] , [[7,8,9],[10,11,12]] ],Float64)
-print a
-print len(a.shape)
-p=getpointer(a)
-print p
-testd3(p,2,2,3)
-
-a = array([1,2,3,4,5,6],Float32)
-print a
-p=getpointer(a)
-print p
-testf1(p,6)
-
-a = array([[1,2,3],[4,5,6]],Float32)
-print a
-p=getpointer(a)
-print p
-testf2(p,2,3)
-
-a = array([ [[1,2,3],[4,5,6]] , [[7,8,9],[10,11,12]] ],Float32)
-print a
-print len(a.shape)
-p=getpointer(a)
-print p
-testf3(p,2,2,3)
-
-a = array([1,2,3,4,5,6],Int32)
-print a
-p=getpointer(a)
-print p
-testi1(p,6)
-
-a = array([[1,2,3],[4,5,6]],Int32)
-print a
-p=getpointer(a)
-print p
-testi2(p,2,3)
-
-a = array([ [[1,2,3],[4,5,6]] , [[7,8,9],[10,11,12]] ],Int32)
-print a
-print len(a.shape)
-p=getpointer(a)
-print p
-testi3(p,2,2,3)

+ 0 - 82
swig/python/NumPtr/readme.html

@@ -1,82 +0,0 @@
-<html>
-<head>
-<title>Numeric Pointer Module v1.1</title>
-</head>
-<body>
-
-<H1><font color="blue">Numeric Pointer Module</font></H1>
-<H4><P>
-  Written by:  Rodrigo Caballero Augi (<a href="mailto://rca@geosci.uchicago.edu">rca@geosci.uchicago.edu</a>),<br>  
-
-  Updated:  Christian Dieterich (<a href="mailto://cdieterich@geosci.uchicago.edu">cdieterich@geosci.uchicago.edu</a>),<br>
-  Packaged:  Michael Steder (<a href="mailto://steder@gmail.com">steder@gmail.com</a>)<br>
- <a href="http://geosci.uchicago.edu">Department of Geophysical Sciences, University of Chicago</a><br>
-  2004<br>
-</H4>
-<H2><font color="green">Introduction:</font></H2>
-	
-   <P>The Numeric Pointer module (NumPtr) is a SWIGable module that makes it possible to access
-data stored in <a href="http://www.pfdubois.com/numpy/">Numeric arrays</a> as if they were normal C/C++ arrays( declared <i>type name[][];</i> ).
-
-   <P>NumPtr was developed to make it possible to work with SWIG'ed C or Fortran climate codes from Python.
-
-   <P>This package is also a good example of how to write C extensions for Python that manipulate arrays.
-
-<H2><font color="green">Getting the Module</font></H2>
-   <P>You can download the current version of the module here:
-   <ul><b>
-     <li><a href="numptr-1.1.tar.gz">NumPtr 1.1 (Tarball)</a></li>
-     <li><a href="numptr-1.1.zip">NumPtr 1.1 (Zip)</a></li>
-     <li><a href="numptr-1.1.exe">NumPtr 1.1 (Windows Installer)</a></li>
-   </b></ul>
-
-<H2><font color="green">Requirements</font></H2>
-   <P><ul>
-     <li>Python 2.2+ (with Distutils!)</li>
-     <li>C Compiler</li>
-     <li>SWIG 1.3+</li>
-   </ul>
-   <P>
-     This package was most recently tested with Python 2.3.3, GCC 3.4.1, and SWIG 1.3.21.
-
-<H2><font color="green">Compiling NumPtr</font></H2>
-
-   <P>To compile NumPtr you simply have to invoke distutils build process:
-   ( $ represents the command prompt )
-
-   <ul><b>
-   $ python setup.py build
-   </b></ul>
-
-<H2><font color="green">Installing NumPtr</font></H2>
-   <P>To install NumPtr with administrative privileges you must invoke distutils with the "install" option:
-   <ul><b>
-   $ python setup.py install
-   </b></ul>
-
-   <P>To install NumPtr into a different directory then the standard or to install it into a home directory (for non-administrators), you can set the "--prefix" or "--install-base" options when calling setup.py.  For instance.
-   <ul><b>
-   $ python setup.py install --prefix=/home/user
-   </b></ul>
-
-   <P>Alternatively you can simply copy the files from build/lib.ARCH (where ARCH is your machines python version and operating system(kernel) version) to your chosen install location.  
-   <ul><b>
-   $ cp build/lib.linux-i686-2.3/* /home/user/python-libs/
-   </b></ul>
-
-<H2><font color="green">Using the Module</font></H2>
-   <P>
-
-<H2><font color="green">Getting Help</font></H2>
-   <P>The Climate Systems Group @ U of C maintains a Wiki community site, if you have questions or comments about the Numeric Pointer module please ask there:
-   <ul><b>
-   <a href="http://geodoc.uchicago.edu/climatewiki">CSC Wiki</a>
-   </b></ul>
-
-</body>
-<footer>
-<hr>
-&#169; Mike Steder: Climate Systems Center, 2004
-</footer>
-</html>
-

+ 0 - 45
swig/python/NumPtr/setup.py

@@ -1,45 +0,0 @@
-import os, glob
-
-# Gather up all the files we need.
-
-files = ["src/getpointer.c","src/test.c"]
-files += glob.glob("src/NumPtr.i") 
-
-## pfiles = glob.glob("*.py")
-## i = 0
-## while i < len(pfiles):
-##     pfiles[i] = os.path.splitext(pfiles[i])[0]
-##     i += 1
-
-## Distutils Script
-from distutils.core import setup, Extension
-
-# Some useful directories.  
-from distutils.sysconfig import get_python_inc, get_python_lib
-
-python_incdir = os.path.join( get_python_inc(plat_specific=1) )
-python_libdir = os.path.join( get_python_lib(plat_specific=1) )
-
-setup(name="NumPtr",
-      version="1.1",
-      description="Numeric Pointer module",
-      author="Rodrigo Caballero",
-      author_email="rca@geosci.uchicago.edu",
-      maintainer="Mike Steder",
-      maintainer_email="steder@gmail.com",
-      url="http://geosci.uchicago.edu/csc/numptr/",
-      ext_modules = [Extension('_NumPtr',
-                               files,
-                               include_dirs=[python_incdir],
-                               library_dirs=[python_libdir],
-                               ),
-                     ],
-      # Install these to their own directory
-      #   *I want to be able to remove them if I screw up this script
-      #   *"Sandboxing", if you will
-      extra_path = 'NumPtr',
-      package_dir={'':'lib'},
-      py_modules=["NumPtr","test"],
-      license="GNU GPL",
-      
-     )

+ 0 - 54
swig/python/NumPtr/src/Makefile

@@ -1,54 +0,0 @@
-# Makes SWIGed Python module 
-
-# Rodrigo Caballero (rca@geosci.uchicago.edu), 
-# Department of the Geophysical Sciences, University of Chicago
-# October 2003
-
-name := NumPtr
-
-ifeq ($(MAKELEVEL),0)
-  CC := gcc
-  F90 := gfortran
-  PYTHONINC := /usr/include/python2.4 
-#  PYTHONINC := /sw/include/python2.5 
-  CCFLAGS :=
-  F90FLAGS := -r8
-#  LDFLAGS := -Mnomain -shared
-  LDFLAGS := -shared
-  SWIG := swig
-endif
-
-OS = $(shell uname -s)
-ifeq ($(OS),Darwin)
-  CC := cc
-  CCFLAGS := -fno-common
-  F90 := cc
-  LDFLAGS := -bundle -flat_namespace -undefined suppress
-  SWIG := swig
-endif
-
-%.o : %.c
-	$(CC) $(CCFLAGS) -c -I$(PYTHONINC) -o $@ $<
-
-%.o : %.f
-	$(F90) $(F90FLAGS) -c -o $@ $<
-
-SRC := $(wildcard *.f *.c)
-OBJ := $(SRC:.f=.o)
-OBJ := $(OBJ:.c=.o)
-ifeq (,$(findstring $(name)_wrap.o,$(OBJ)))
- wrapper := $(name)_wrap.o
-endif
-
-_$(name)_lib.so :  $(OBJ) $(name)_wrap.o
-	$(F90) $(LDFLAGS) -o $@  $(OBJ) $(wrapper)
-
-$(name)_wrap.o: $(name).i
-	$(SWIG) -python $(name).i
-	$(CC) -c -I$(PYTHONINC) -o $(name)_wrap.o $(name)_wrap.c
-
-clean:
-	rm -f $(OBJ) *.so *_wrap.* *.pyc *_lib.* $(name).py
-
-test:
-	python test.py

+ 0 - 61
swig/python/NumPtr/src/NumPtr.i

@@ -1,61 +0,0 @@
-/*  
-    Copyright 2003,2004 Rodrigo Caballero Augi
-    rca@geosci.uchicago.edu
-    Department of the Geophysical Sciences, University of Chicago
-    2003
-
-    This file is part of the Numeric Pointer Module.
-
-    The Numeric Pointer Module is free software; you can redistribute it 
-    and/or modify it under the terms of the GNU General Public License as 
-    published by the Free Software Foundation; either version 2 of the License,
-    or (at your option) any later version.
-
-    The Numeric Pointer Module is distributed in the hope that it will be 
-    useful, but WITHOUT ANY WARRANTY; without even the implied warranty of
-    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-    GNU General Public License for more details.
-
-    You should have received a copy of the GNU General Public License
-    along with the Numeric Pointer Module; if not, write to the Free Software
-    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
-*/
-
-%module NumPtr
-
-%{
-#include "getpointer.h"
-#include "test.h"
-%}
-
-double *   getpointer1(PyObject *array);
-double **  getpointer2(PyObject *array);
-double *** getpointer3(PyObject *array);
-
-double *   getdpointer1(PyObject *array);
-double **  getdpointer2(PyObject *array);
-double *** getdpointer3(PyObject *array);
-
-float *   getfpointer1(PyObject *array);
-float **  getfpointer2(PyObject *array);
-float *** getfpointer3(PyObject *array);
-
-int *   getipointer1(PyObject *array);
-int **  getipointer2(PyObject *array);
-int *** getipointer3(PyObject *array);
-
-void  test1(double *   a, int n);
-void  test2(double **  a, int n, int m);
-void  test3(double *** a, int n, int m, int l);
-
-void  testd1(double *   a, int n);
-void  testd2(double **  a, int n, int m);
-void  testd3(double *** a, int n, int m, int l);
-
-void  testf1(float *   a, int n);
-void  testf2(float **  a, int n, int m);
-void  testf3(float *** a, int n, int m, int l);
-
-void  testi1(int *   a, int n);
-void  testi2(int **  a, int n, int m);
-void  testi3(int *** a, int n, int m, int l);

+ 0 - 179
swig/python/NumPtr/src/getpointer.c

@@ -1,179 +0,0 @@
-#include "Python.h"
-#include "Numeric/arrayobject.h"
-#include "getpointer.h"
-
-double *getpointer1(PyObject * A)
-{
-    PyArrayObject *array;
-
-    array = (PyArrayObject *) A;
-    return (double *)(array->data);
-}
-
-double **getpointer2(PyObject * A)
-{
-    PyArrayObject *array;
-    int imax, i;
-    double **p = NULL;
-
-    array = (PyArrayObject *) A;
-    imax = array->dimensions[0];
-    p = (double **)calloc(imax, sizeof(double *));
-    for (i = 0; i < imax; i++) {
-	p[i] = (double *)(array->data + i * array->strides[0]);
-    }
-    return p;
-}
-
-double ***getpointer3(PyObject * A)
-{
-    PyArrayObject *array;
-    int imax, jmax, i, j;
-    double ***p = NULL;
-
-    array = (PyArrayObject *) A;
-    imax = array->dimensions[0];
-    jmax = array->dimensions[1];
-    p = (double ***)calloc(imax, sizeof(double **));
-    for (i = 0; i < imax; i++) {
-	p[i] = (double **)calloc(jmax, sizeof(double *));
-	for (j = 0; j < jmax; j++) {
-	    p[i][j] =
-		(double *)(array->data + i * array->strides[0] +
-			   j * array->strides[1]);
-	}
-    }
-    return p;
-}
-
-double *getdpointer1(PyObject * A)
-{
-    PyArrayObject *array;
-
-    array = (PyArrayObject *) A;
-    return (double *)(array->data);
-}
-
-double **getdpointer2(PyObject * A)
-{
-    PyArrayObject *array;
-    int imax, i;
-    double **p = NULL;
-
-    array = (PyArrayObject *) A;
-    imax = array->dimensions[0];
-    p = (double **)calloc(imax, sizeof(double *));
-    for (i = 0; i < imax; i++) {
-	p[i] = (double *)(array->data + i * array->strides[0]);
-    }
-    return p;
-}
-
-double ***getdpointer3(PyObject * A)
-{
-    PyArrayObject *array;
-    int imax, jmax, i, j;
-    double ***p = NULL;
-
-    array = (PyArrayObject *) A;
-    imax = array->dimensions[0];
-    jmax = array->dimensions[1];
-    p = (double ***)calloc(imax, sizeof(double **));
-    for (i = 0; i < imax; i++) {
-	p[i] = (double **)calloc(jmax, sizeof(double *));
-	for (j = 0; j < jmax; j++) {
-	    p[i][j] =
-		(double *)(array->data + i * array->strides[0] +
-			   j * array->strides[1]);
-	}
-    }
-    return p;
-}
-
-float *getfpointer1(PyObject * A)
-{
-    PyArrayObject *array;
-
-    array = (PyArrayObject *) A;
-    return (float *)(array->data);
-}
-
-float **getfpointer2(PyObject * A)
-{
-    PyArrayObject *array;
-    int imax, i;
-    float **p = NULL;
-
-    array = (PyArrayObject *) A;
-    imax = array->dimensions[0];
-    p = (float **)calloc(imax, sizeof(float *));
-    for (i = 0; i < imax; i++) {
-	p[i] = (float *)(array->data + i * array->strides[0]);
-    }
-    return p;
-}
-
-float ***getfpointer3(PyObject * A)
-{
-    PyArrayObject *array;
-    int imax, jmax, i, j;
-    float ***p = NULL;
-
-    array = (PyArrayObject *) A;
-    imax = array->dimensions[0];
-    jmax = array->dimensions[1];
-    p = (float ***)calloc(imax, sizeof(float **));
-    for (i = 0; i < imax; i++) {
-	p[i] = (float **)calloc(jmax, sizeof(float *));
-	for (j = 0; j < jmax; j++) {
-	    p[i][j] =
-		(float *)(array->data + i * array->strides[0] +
-			  j * array->strides[1]);
-	}
-    }
-    return p;
-}
-
-int *getipointer1(PyObject * A)
-{
-    PyArrayObject *array;
-
-    array = (PyArrayObject *) A;
-    return (int *)(array->data);
-}
-
-int **getipointer2(PyObject * A)
-{
-    PyArrayObject *array;
-    int imax, i;
-    int **p = NULL;
-
-    array = (PyArrayObject *) A;
-    imax = array->dimensions[0];
-    p = (int **)calloc(imax, sizeof(int *));
-    for (i = 0; i < imax; i++) {
-	p[i] = (int *)(array->data + i * array->strides[0]);
-    }
-    return p;
-}
-
-int ***getipointer3(PyObject * A)
-{
-    PyArrayObject *array;
-    int imax, jmax, i, j;
-    int ***p = NULL;
-
-    array = (PyArrayObject *) A;
-    imax = array->dimensions[0];
-    jmax = array->dimensions[1];
-    p = (int ***)calloc(imax, sizeof(int **));
-    for (i = 0; i < imax; i++) {
-	p[i] = (int **)calloc(jmax, sizeof(int *));
-	for (j = 0; j < jmax; j++) {
-	    p[i][j] =
-		(int *)(array->data + i * array->strides[0] +
-			j * array->strides[1]);
-	}
-    }
-    return p;
-}

+ 0 - 12
swig/python/NumPtr/src/getpointer.h

@@ -1,12 +0,0 @@
-double *getpointer1(PyObject * A);
-double **getpointer2(PyObject * A);
-double ***getpointer3(PyObject * A);
-double *getdpointer1(PyObject * A);
-double **getdpointer2(PyObject * A);
-double ***getdpointer3(PyObject * A);
-float *getfpointer1(PyObject * A);
-float **getfpointer2(PyObject * A);
-float ***getfpointer3(PyObject * A);
-int *getipointer1(PyObject * A);
-int **getipointer2(PyObject * A);
-int ***getipointer3(PyObject * A);

+ 0 - 133
swig/python/NumPtr/src/test.c

@@ -1,133 +0,0 @@
-#include <stdio.h>
-
-void test1(double *a, int n)
-{
-    int i;
-
-    for (i = 0; i < n; i++) {
-	printf("%f\n", a[i]);
-    }
-}
-
-void test2(double **a, int n, int m)
-{
-    int i, j;
-
-    for (i = 0; i < n; i++) {
-	for (j = 0; j < m; j++) {
-	    printf("%i %i\t %f\n", i, j, a[i][j]);
-	}
-    }
-}
-
-void test3(double ***a, int n, int m, int l)
-{
-    int i, j, k;
-
-    for (i = 0; i < n; i++) {
-	for (j = 0; j < m; j++) {
-	    for (k = 0; k < l; k++) {
-		printf("%i %i %i\t %f\n", i, j, k, a[i][j][k]);
-	    }
-	}
-    }
-}
-
-void testd1(double *a, int n)
-{
-    int i;
-
-    for (i = 0; i < n; i++) {
-	printf("%f\n", a[i]);
-    }
-}
-
-void testd2(double **a, int n, int m)
-{
-    int i, j;
-
-    for (i = 0; i < n; i++) {
-	for (j = 0; j < m; j++) {
-	    printf("%i %i\t %f\n", i, j, a[i][j]);
-	}
-    }
-}
-
-void testd3(double ***a, int n, int m, int l)
-{
-    int i, j, k;
-
-    for (i = 0; i < n; i++) {
-	for (j = 0; j < m; j++) {
-	    for (k = 0; k < l; k++) {
-		printf("%i %i %i\t %f\n", i, j, k, a[i][j][k]);
-	    }
-	}
-    }
-}
-
-void testf1(float *a, int n)
-{
-    int i;
-
-    for (i = 0; i < n; i++) {
-	printf("%f\n", a[i]);
-    }
-}
-
-void testf2(float **a, int n, int m)
-{
-    int i, j;
-
-    for (i = 0; i < n; i++) {
-	for (j = 0; j < m; j++) {
-	    printf("%i %i\t %f\n", i, j, a[i][j]);
-	}
-    }
-}
-
-void testf3(float ***a, int n, int m, int l)
-{
-    int i, j, k;
-
-    for (i = 0; i < n; i++) {
-	for (j = 0; j < m; j++) {
-	    for (k = 0; k < l; k++) {
-		printf("%i %i %i\t %f\n", i, j, k, a[i][j][k]);
-	    }
-	}
-    }
-}
-
-void testi1(int *a, int n)
-{
-    int i;
-
-    for (i = 0; i < n; i++) {
-	printf("%i\n", a[i]);
-    }
-}
-
-void testi2(int **a, int n, int m)
-{
-    int i, j;
-
-    for (i = 0; i < n; i++) {
-	for (j = 0; j < m; j++) {
-	    printf("%i %i\t %i\n", i, j, a[i][j]);
-	}
-    }
-}
-
-void testi3(int ***a, int n, int m, int l)
-{
-    int i, j, k;
-
-    for (i = 0; i < n; i++) {
-	for (j = 0; j < m; j++) {
-	    for (k = 0; k < l; k++) {
-		printf("%i %i %i\t %i\n", i, j, k, a[i][j][k]);
-	    }
-	}
-    }
-}

+ 0 - 12
swig/python/NumPtr/src/test.h

@@ -1,12 +0,0 @@
-void test1(double *a, int n);
-void test2(double **a, int n, int m);
-void test3(double ***a, int n, int m, int l);
-void testd1(double *a, int n);
-void testd2(double **a, int n, int m);
-void testd3(double ***a, int n, int m, int l);
-void testf1(float *a, int n);
-void testf2(float **a, int n, int m);
-void testf3(float ***a, int n, int m, int l);
-void testi1(int *a, int n);
-void testi2(int **a, int n, int m);
-void testi3(int ***a, int n, int m, int l);

+ 0 - 73
swig/python/README

@@ -1,73 +0,0 @@
-What is this?
--------------
-	 This is SWIG based python wrapping for GRASS API
-which allows to call GRASS library functions from Python programs.
-
-
-How to INSTALL?
----------------
-1. Install SWIG, the Simplified Wrapper and Interface Generator
-     http://www.swig.org
-
-2. Be sure you configured GRASS with support for Python (example):
-     ./configure --with-python=/usr/bin/python2.5-config
-
-3. Run make in the swig/python/ directory
-
-   It will create a series of .py Python files and of .so library files
-
-4. TODO: STILL VALID??:
-   From within GRASS (or a fake grass session) run "python test.py" to
-   test and to automatically create a byte-compiled version of the module
-   (python_grass7.pyc). The .pyc file is platform independent and may be
-   safely shared among systems. Even so, it doesn't hurt to rebuild it
-   ourselves while we still have write permissions and to make sure we
-   are using an up to date copy. (out of date copies will be ignored)
-
-5. It is useful to build the NumPtr module as well.
-   - see README.GRASS in that directory for instructions
-
-How to use it?
---------------
-
-import grass
-GRASS functions will be available in this module.
-Eg: 
-	import grass
-	mapset=grass.G_mapset()
-	print mapset
-
-See examples/m.distance.py for an example of a working SWIG-Python module.
-
-More examples can be found on the GRASS Wiki site's Python page:
-  http://grass.osgeo.org/wiki/GRASS_and_Python#Python-SWIG-GRASS_interface
-
-
-DEBUGGING
-----------
-
-gdb --args python <script.py>
-
-e.g. 
-    gdb --args python rasteraccess.py
-
-
-TODO
------
-See TODO in this directory.
-
-
-AUTHORS
------
-
-Initial version:
-  Sajith VK  sajithvk at gmail.com
-  Thu, 9 Mar 2006 16:02:50 +0530
-  http://lists.osgeo.org/pipermail/grass-dev/2006-March/021800.html
-  http://freegis.gnu.org.in/temporary/python_grass6.tar.bz2
-
-Further work:
-  Markus Landa
-  Glynn Clements
-  ...
-

+ 0 - 8
swig/python/TODO

@@ -1,8 +0,0 @@
-TODO
------
-
-important:
-- enable calls from outside GRASS
-- Synchronize with GRASS-Perl group
-- Wrap all functions
-

+ 0 - 9
swig/python/__init__.py

@@ -1,9 +0,0 @@
-import date
-import grass
-import math
-import imagery
-import vector
-import proj
-import stats
-import display
-import utils

+ 0 - 201
swig/python/examples/m.distance.py

@@ -1,201 +0,0 @@
-#!/usr/bin/python
-############################################################################
-#
-# MODULE:       m.distance
-#
-# AUTHOR(S):    Hamish Bowman, Dunedin, New Zealand
-#
-# PURPOSE:      Find distance between two points
-#               If the projection is latitude-longitude, this distance
-#                 is measured along the geodesic.
-#               Demonstrates GRASS SWIG-Python interface
-#
-# COPYRIGHT:    (c) 2008 Hamish Bowman, and The GRASS Development Team
-#
-#               This program is free software under the GNU General Public
-#               License (>=v2). Read the file COPYING that comes with GRASS
-#               for details.
-#
-############################################################################
-#
-# Requires GRASS SWIG-Python interface
-# Requires Numeric module (NumPy) from  http://numpy.scipy.org/
-# Requires NumPrt module from  http://geosci.uchicago.edu/csc/numptr/
-#
-
-#%Module
-#%  label: Finds the distance between two or more points.
-#%  description: If the projection is latitude-longitude, this distance is measured along the geodesic.
-#%  keywords: miscellaneous, distance, measure
-#%End
-#%Option
-#%  key: coord
-#%  type: string
-#%  required: no
-#%  multiple: yes
-#%  key_desc: x,y
-#%  description: Comma separated list of coordinate pairs
-#%End
-#%Flag
-#%  key: i
-#%  description: Read coordinate pairs from stdin
-#%End
-
-
-import os, sys
-
-if not os.environ.has_key("GISBASE"):
-    print "You must be in GRASS GIS to run this program."
-    sys.exit(1)
-
-
-def main(): 
-
-    #### add your code here ####
-
-    # run this before starting python to append module search path:
-    #   export PYTHONPATH=$PYTHONPATH:/usr/local/grass-7.0.svn/etc/python
-    #   check with "import sys; sys.path"
-    # or:
-    sys.path.append("/usr/local/grass-7.0.svn/etc/python")
-    from grass.lib import grass as g7lib
- 
-    # for passing pointers
-    import Numeric
-    import NumPtr
-
-    g7lib.G_gisinit('m.distance')
-    # returns 0 on success
-
-
-    ### calc distance ###
-    
-    proj_type = g7lib.G_begin_distance_calculations()
-    # returns 0 if projection has no metrix (ie. imagery)
-    # returns 1 if projection is planimetric
-    # returns 2 if projection is latitude-longitude
-
-
-    # parser always creates at least an empty variable, and sys.argv is
-    #  toast, so no way to check if option was given. So it hangs if
-    #  --q was the only option given and there is no data from stdin.
-    coord_ans  = os.getenv("GIS_OPT_COORD")
-    stdin_flag = bool(int(os.getenv("GIS_FLAG_I")))
-
-    if stdin_flag is True:
-        coords = []
-        # read line by line from stdin
-        while 1:
-            line = sys.stdin.readline().strip()
-            if not line:   # EOF
-                break
-            else:
-                coords += line.split(',')
-    else:
-        # read from coord= command line option
-        coords = coord_ans.split(',')
-
-
-    if len(coords) < 4:
-       print "A minimum of two input coordinate pairs are needed"
-       return
-
-
-    # init variables
-    overall_distance = 0.0
-
-    if proj_type == 2:
-        # lat/lon scan for DDD:MM:SS.SSSS
-        easting = Numeric.array(0., Numeric.Float64)
-        eastPtr = NumPtr.getpointer(easting)
-        northing = Numeric.array(0., Numeric.Float64)
-        northPtr = NumPtr.getpointer(northing)
-
-        # TODO: for clarity, figure out how to replace "3" with
-        #       the defined LOCATION_LL constant from gis.i
-        g7lib.G_scan_easting(coords[0], eastPtr, 3)
-        g7lib.G_scan_northing(coords[1], northPtr, 3)
-        x1 = float(easting)
-        y1 = float(northing)
-    else:
-        # plain old coordinates
-        x1 = float(coords[0])
-        y1 = float(coords[1])
-
-    x = [x1]
-    y = [y1]
-
-    for i in range(1, (len(coords) / 2)):
-
-        if proj_type == 2:
-            g7lib.G_scan_easting (coords[ i*2 + 0 ], eastPtr, 3)
-            g7lib.G_scan_northing(coords[ i*2 + 1 ], northPtr, 3)
-            x2 = float(easting)
-            y2 = float(northing)
-        else:
-            x2 = float(coords[ i*2 + 0 ])
-            y2 = float(coords[ i*2 + 1 ])
-
-        segment_distance = g7lib.G_distance(x1, y1, x2, y2)
-        overall_distance += segment_distance
-
-        print "segment %d distance is %.2f meters" % (i, segment_distance)
-
-        # add to the area array
-
-        # setup for the next loop
-        x1 = x2
-        y1 = y2
-
-        x += [x2]
-        y += [y2]
-  
-    print
-    print " total distance is %.2f meters" % overall_distance
-    print
-
-
-    ### calc area ###
-    if len(coords) < 6:
-        return
- 
-    g7lib.G_begin_polygon_area_calculations()
-    # returns 0 if the projection is not measurable (ie. imagery or xy)
-    # returns 1 if the projection is planimetric (ie. UTM or SP)
-    # returns 2 if the projection is non-planimetric (ie. latitude-longitude)
-
-    # do not need to close polygon (but it doesn't hurt if you do)
-    npoints = len(x)
-
-    # unset variables:
-    #del [Xs, Xptr, Ys, Yptr]
-    #   or
-    #Xs = Xptr = Ys = Yptr = None
-
-    Xs = Numeric.array(x, Numeric.Float64)
-    Xptr = NumPtr.getpointer(Xs)
-    Ys = Numeric.array(y, Numeric.Float64)
-    Yptr = NumPtr.getpointer(Ys)
-    
-    area = g7lib.G_area_of_polygon(Xptr, Yptr, npoints)
-    print "AREA:  %10.2f square meters" % area
-    print
-
-
-    # we don't need this, but just to have a look
-    if False:
-        if proj_type == 1:
-            g7lib.G_database_units_to_meters_factor()
-            # 1.0
-        print "Location units are", g7lib.G_database_unit_name(True)
-
-
-    #### end of your code ####
-    return 
-
-if __name__ == "__main__":
-    if ( len(sys.argv) <= 1 or sys.argv[1] != "@ARGS_PARSED@" ):
-        os.execvp("g.parser", [sys.argv[0]] + sys.argv)
-    else:
-        main();
-

+ 0 - 52
swig/python/examples/rasteraccess.py

@@ -1,52 +0,0 @@
-#!/usr/bin/env python
-
-"""
-Run within GRASS session
-Run this before starting python to append module search path:
-
-@code
-export PYTHONPATH=$PYTHONPATH:/usr/local/grass-7.0.svn/etc/python/
-@endcode
-
-Check with "import sys; sys.path"
-or:
-
-@code
-sys.path.append("/usr/local/grass-7.0.svn/etc/python")
-@endcode
-"""
-
-import os, sys
-from grass.lib import grass
-from grass.lib import raster as grassrast
-
-if not os.environ.has_key("GISBASE"):
-    print "You must be in GRASS GIS to run this program."
-    sys.exit(1)
-
-if len(sys.argv)==2:
-  input = sys.argv[1]
-else:
-  input = raw_input("Raster Map Name? ")
-
-# initialize
-grass.G_gisinit('')
-
-# find map in search path
-mapset = grass.G_find_raster2(input, '')
-
-# determine the inputmap type (CELL/FCELL/DCELL) */
-data_type = grassrast.Rast_map_type(input, mapset)
-
-infd = grassrast.Rast_open_old(input, mapset)
-inrast = grassrast.Rast_allocate_buf(data_type)
-
-rown = 0
-while True:
-    myrow = grassrast.Rast_get_row(infd, inrast, rown, data_type)
-    print rown, myrow[0:10]
-    rown += 1
-    if rown == 476:
-        break
-
-grassrast.Rast_close(inrast)

+ 0 - 96
swig/python/examples/vectoraccess.py

@@ -1,96 +0,0 @@
-#!/usr/bin/python
-
-# run within GRASS Spearfish session
-# run this before starting python to append module search path:
-#   export PYTHONPATH=$PYTHONPATH:/usr/local/grass-7.0.svn/etc/python
-#   check with "import sys; sys.path"
-# or:
-#   sys.path.append("/usr/local/grass-7.0.svn/etc/python")
-
-import os, sys
-from grass.lib import grass
-from grass.lib import vector as grassvect
-import grass.script as grassscript
-
-if not os.environ.has_key("GISBASE"):
-    print "You must be in GRASS GIS to run this program."
-    sys.exit(1)
-
-if len(sys.argv)==2:
-  input = sys.argv[1]
-else:
-  input = raw_input("Vector Map Name? ")
-
-# initialize
-grass.G_gisinit('')
-
-# find map in search path
-mapset = grass.G_find_vector2(input,'')
-
-# define map structure
-map = grassvect.Map_info()
-
-# define open level (level 2: topology)
-grassvect.Vect_set_open_level (2)
-
-# open existing map
-grassvect.Vect_open_old(map, input, mapset)
-
-# query
-print 'Vect map: ', input
-print 'Vect is 3D: ', grassvect.Vect_is_3d (map)
-print 'Vect DB links: ', grassvect.Vect_get_num_dblinks(map)
-print 'Map Scale:  1:', grassvect.Vect_get_scale(map)
-
-# vector box tests
-box = grassvect.bound_box()
-c_easting1  =  599505.0
-c_northing = 4921010.0
-c_easting2  =  4599505.0
-
-grassvect.Vect_get_map_box(map, box)
-print 'Position 1 in box? ', grassvect.Vect_point_in_box(c_easting1, c_northing, 0, box)
-print 'Position 2 in box? ', grassvect.Vect_point_in_box(c_easting2, c_northing, 0, box)
-print 'Vector line 2 in box? ', grassvect.Vect_get_line_box(map, 2, box)
-# misleading:
-# print 'Number of lines:', grassvect.Vect_get_num_lines(map)
-# how to access GV_POINT?
-# print 'Number of points: ', grassvect.Vect_get_num_primitives(map,GV_POINT)
-# confusing:
-#print 'Number of lines: ', grassvect.Vect_get_num_primitives(map,GV_LINE)
-#print 'Number of areas:', grassvect.Vect_get_num_primitives(map,GV_AREA)
-print 'Number of areas:', grassvect.Vect_get_num_areas(map)
-
-layer = 1
-tmp = grassscript.tempfile()
-tmpf = file(tmp, 'w')
-
-try:
-    f = grassscript.vector_db(input)[int(layer)]
-except KeyError:
-    grassscript.fatal("There is no table connected to this map. Run v.db.connect or v.db.addtable first.")
-table = f['table']
-database = f['database']
-driver = f['driver']
-
-# call GRASS command
-grassscript.run_command('v.db.select', flags = 'c', map = input,
-                   stdout = tmpf)
-tmpf.close()
-
-# check if result is empty
-tmpf = file(tmp)
-if tmpf.read(1) == '':
-    grassscript.fatal("Table <%s> contains no data.", table)
-
-# print table to stdout
-for line in tmpf:
-    print line
-
-tmpf.close()
-os.remove(tmp)
-
-# close map
-grassvect.Vect_close(map)
-## end of the python script
-

+ 0 - 43
swig/python/grasspython.dox

@@ -1,43 +0,0 @@
-/*! \page GRASS_SWIG_PYTHON GRASS SWIG/PYTHON interface
-
-At the moment a prototype is implemented. It permits to use some GRASS
-library functions directly from the PYTHON programming language.
-
-\section status Status of GRASS SWIG/PYTHON implementation
-
-There is a <b>grass.lib</b> package with a series of separate modules
-available. Python SWIG modules are organized as follows:
-
- - grass.lib
-  - arraystats.py
-  - cluster.py
-  - date.py
-  - dbmi.py
-  - display.py
-  - g3d.py
-  - grass.py
-  - imagery.py
-  - math.py
-  - proj.py
-  - raster.py
-  - stats.py
-  - trans.py
-  - utils.py
-  - vector.py
-  - vedit.py
-
-\section usage Usage
-
-Access to GRASS library functions (example: Vector functions):
-
-\code
-from grass.lib import vector as grassvect
-\endcode
-
-\section examples Examples
-
- - examples/m.distance.py
- - examples/rasteraccess.py
- - examples/vectoraccess.py
-
-*/

+ 0 - 29
swig/python/test.py

@@ -1,29 +0,0 @@
-#!/usr/bin/env python
-
-# must be executed in the GRASS env
-# test case for Spearfish location
-
-
-import os, sys
-import grass
-
-if not os.environ.has_key("GISBASE"):
-    print "You must be in GRASS GIS to run this program."
-    sys.exit(1)
-
-rname = 'elevation.dem'
-mapset = 'PERMANENT'
-
-grass.G_gisinit('')
-grass.G_find_cell2(rname,'')
-
-print mapset
-
-print 'prints 0 if map was found'
-
-print 'roads:'
-print grass.G_raster_map_type('roads',mapset)
-
-print 'elevation.dem:'
-print grass.G_raster_map_type(rname,mapset)
-

+ 0 - 54
swig/swiglib.dox

@@ -1,54 +0,0 @@
-/*! \page swiglib GRASS SWIG interface
-
-<a href="http://grass.osgeo.org">GRASS GIS</a> (Geographic Resources
-Analysis Support System) is an open source, Free Software
-<em>Geographical Information System</em> (GIS) with raster,
-topological %vector, image processing, and graphics production
-functionality that operates on various platforms through a graphical
-user interface (GUI) or command line interface (CLI). It is released under GNU
-General Public License (GPL).
-
-<i>Cited from <a href="http://www.swig.org/">SWIG Web
-site</a>:</i><br> SWIG is a software development tool that connects
-programs written in C and C++ with a variety of high-level programming
-languages.  SWIG is used with different types of languages including
-common scripting languages such as Perl, PHP, Python, Tcl, Ruby and
-PHP. The list of <a
-href="http://www.swig.org/compat.html#SupportedLanguages">supported
-languages</a> also includes on-scripting languages such as C#, Common
-Lisp (CLISP, Allegro CL, UFFI), Java, Modula-3 and OCAML. Also several
-interpreted and compiled Scheme implementations (Guile, MzScheme,
-Chicken) are supported. SWIG is most commonly used to create
-high-level interpreted or compiled programming environments, user
-interfaces, and as a tool for testing and prototyping C/C++ software.
-SWIG can also export its parse tree in the form of XML and Lisp
-s-expressions.  SWIG may be freely used, distributed, and modified for
-commercial and non-commercial use.
-
-\section swiglibes Status of GRASS SWIG implementation
-
- - \ref GRASS_SWIG_PERL 
- - \ref GRASS_SWIG_PYTHON 
-
-\section discussion Discussions in the Mailing list
-
-See 
-
- - <a href="http://www.google.com/search?num=20&hl=en&lr=&q=swig+%5BGRASS5%5D+site%3Agrass.itc.it&btnG=Search">here</a> for
-discussions in the old developers mailing list.
- - <a href="http://www.google.com/search?q=swig&as_qdr=all&sa=Google+Search&domains=lists.osgeo.org&sitesearch=lists.osgeo.org%2Fpipermail%2Fgrass-user%2F">here</a>
-for discussions in the new developers mailing list.
-
-\section code Code availability
-
-The source code is available here:
-
- - in <a href="http://grass.osgeo.org/devel/index.php#software">GRASS SVN</a>
- - in the <a href="http://grass.osgeo.org/grass70/source/snapshot/">weekly SVN snapshot</a> (swig/ subdirectory)
- - via <a href="http://trac.osgeo.org/grass/browser/grass/trunk/swig">SVN Trac interface</a>
-
-\section see_also See also
-
- - <a href="http://grass.osgeo.org/programming7/">GRASS Programmer's manual</a>
-
-*/