Index: /issm/trunk-jpl/src/modules/AverageFilter/AverageFilter.cpp
===================================================================
--- /issm/trunk-jpl/src/modules/AverageFilter/AverageFilter.cpp	(revision 13235)
+++ /issm/trunk-jpl/src/modules/AverageFilter/AverageFilter.cpp	(revision 13236)
@@ -10,10 +10,16 @@
 */
 
-
 #include "./AverageFilter.h"
 
-void mexFunction( int nlhs, mxArray* plhs[],
-				  int nrhs, const mxArray* prhs[])
-{
+void AverageFilterUsage(void){/*{{{*/
+	_printLine_("   AverageFilter usage:");
+	_printLine_("   [image_out]=AverageFilter(image_in,pixels);\n");
+	_printLine_("   where:");
+	_printLine_("      image_in in double format");
+	_printLine_("      pixels: characteristic size of smoothing");
+	_printLine_("      image_out in double format");
+	_printLine_("");
+}/*}}}*/
+WRAPPER(AverageFilter){
 
 	int i,j;
@@ -49,14 +55,2 @@
 	MODULEEND();
 }
-
-
-void AverageFilterUsage(void)
-{
-	_printLine_("   AverageFilter usage:");
-	_printLine_("   [image_out]=AverageFilter(image_in,pixels);\n");
-	_printLine_("   where:");
-	_printLine_("      image_in in double format");
-	_printLine_("      pixels: characteristic size of smoothing");
-	_printLine_("      image_out in double format");
-	_printLine_("");
-}
Index: /issm/trunk-jpl/src/modules/AverageFilter/AverageFilter.h
===================================================================
--- /issm/trunk-jpl/src/modules/AverageFilter/AverageFilter.h	(revision 13235)
+++ /issm/trunk-jpl/src/modules/AverageFilter/AverageFilter.h	(revision 13236)
@@ -16,7 +16,4 @@
 #define PY_ARRAY_UNIQUE_SYMBOL PythonIOSymbol
 #endif
-
-/* local prototypes: */
-void AverageFilterUsage(void);
 
 #include "../../c/include/globals.h"
Index: /issm/trunk-jpl/src/modules/BamgConvertMesh/BamgConvertMesh.cpp
===================================================================
--- /issm/trunk-jpl/src/modules/BamgConvertMesh/BamgConvertMesh.cpp	(revision 13235)
+++ /issm/trunk-jpl/src/modules/BamgConvertMesh/BamgConvertMesh.cpp	(revision 13236)
@@ -4,5 +4,14 @@
 #include "./BamgConvertMesh.h"
 
-void mexFunction(int nlhs, mxArray* plhs[], int nrhs, const mxArray* prhs[]){
+void BamgConvertMeshUsage(void){/*{{{*/
+	_pprintString_("BAMGCONVERTMESH - convert [x y index] to a bamg geom and mesh geom");
+	_pprintLine_("");
+	_pprintLine_("   Usage:");
+	_pprintLine_("      [bamggeom bamgmesh]=BamgConvertMesh(index,x,y);");
+	_pprintLine_("      index: index of the mesh");
+	_pprintLine_("      x,y: coordinates of the nodes");
+	_pprintLine_("");
+}/*}}}*/
+WRAPPER(BamgConvertMesh){
 
 	/*input: */
@@ -53,12 +62,2 @@
 	MODULEEND();
 }
-
-void BamgConvertMeshUsage(void){
-	_pprintString_("BAMGCONVERTMESH - convert [x y index] to a bamg geom and mesh geom");
-	_pprintLine_("");
-	_pprintLine_("   Usage:");
-	_pprintLine_("      [bamggeom bamgmesh]=BamgConvertMesh(index,x,y);");
-	_pprintLine_("      index: index of the mesh");
-	_pprintLine_("      x,y: coordinates of the nodes");
-	_pprintLine_("");
-}
Index: /issm/trunk-jpl/src/modules/BamgConvertMesh/BamgConvertMesh.h
===================================================================
--- /issm/trunk-jpl/src/modules/BamgConvertMesh/BamgConvertMesh.h	(revision 13235)
+++ /issm/trunk-jpl/src/modules/BamgConvertMesh/BamgConvertMesh.h	(revision 13236)
@@ -16,7 +16,4 @@
 #define PY_ARRAY_UNIQUE_SYMBOL PythonIOSymbol
 #endif
-
-/* local prototypes: */
-void BamgConvertMeshUsage(void);
 
 #include "../../c/include/globals.h"
Index: /issm/trunk-jpl/src/modules/BamgMesher/BamgMesher.cpp
===================================================================
--- /issm/trunk-jpl/src/modules/BamgMesher/BamgMesher.cpp	(revision 13235)
+++ /issm/trunk-jpl/src/modules/BamgMesher/BamgMesher.cpp	(revision 13236)
@@ -4,5 +4,10 @@
 #include "./BamgMesher.h"
 
-void mexFunction( int nlhs, mxArray* plhs[], int nrhs, const mxArray* prhs[]){
+void BamgMesherUsage(void){/*{{{*/
+	_pprintLine_("");
+	_pprintLine_("   usage: [bamgmesh,bamggeom]=" << __FUNCT__ << "(bamgmesh,bamggeom,bamgoptions);");
+	_pprintLine_("");
+}/*}}}*/
+WRAPPER(BamgMesher){
 
 	/*Outputs*/
@@ -49,8 +54,2 @@
 	MODULEEND();
 }
-
-void BamgMesherUsage(void){
-	_pprintLine_("");
-	_pprintLine_("   usage: [bamgmesh,bamggeom]=" << __FUNCT__ << "(bamgmesh,bamggeom,bamgoptions);");
-	_pprintLine_("");
-}
Index: /issm/trunk-jpl/src/modules/BamgMesher/BamgMesher.h
===================================================================
--- /issm/trunk-jpl/src/modules/BamgMesher/BamgMesher.h	(revision 13235)
+++ /issm/trunk-jpl/src/modules/BamgMesher/BamgMesher.h	(revision 13236)
@@ -16,7 +16,4 @@
 #define PY_ARRAY_UNIQUE_SYMBOL PythonIOSymbol
 #endif
-
-/* local prototypes: */
-void BamgMesherUsage(void);
 
 #include "../../c/include/globals.h"
Index: /issm/trunk-jpl/src/modules/BamgTriangulate/BamgTriangulate.cpp
===================================================================
--- /issm/trunk-jpl/src/modules/BamgTriangulate/BamgTriangulate.cpp	(revision 13235)
+++ /issm/trunk-jpl/src/modules/BamgTriangulate/BamgTriangulate.cpp	(revision 13236)
@@ -4,5 +4,14 @@
 #include "./BamgTriangulate.h"
 
-void mexFunction( int nlhs, mxArray* plhs[], int nrhs, const mxArray* prhs[]){
+void BamgTriangulateUsage(void){/*{{{*/
+	_pprintString_("BAMGTRIANGULATE - Delaunay Triangulation of a list of points");
+	_pprintLine_("");
+	_pprintLine_("   Usage:");
+	_pprintLine_("      index=BamgTriangulate(x,y);");
+	_pprintLine_("      index: index of the triangulation");
+	_pprintLine_("      x,y: coordinates of the nodes");
+	_pprintLine_("");
+}/*}}}*/
+WRAPPER(BamgTriangulate){
 
 	/*input: */
@@ -46,13 +55,2 @@
 	MODULEEND();
 }
-
-void BamgTriangulateUsage(void)
-{
-	_pprintString_("BAMGTRIANGULATE - Delaunay Triangulation of a list of points");
-	_pprintLine_("");
-	_pprintLine_("   Usage:");
-	_pprintLine_("      index=BamgTriangulate(x,y);");
-	_pprintLine_("      index: index of the triangulation");
-	_pprintLine_("      x,y: coordinates of the nodes");
-	_pprintLine_("");
-}
Index: /issm/trunk-jpl/src/modules/BamgTriangulate/BamgTriangulate.h
===================================================================
--- /issm/trunk-jpl/src/modules/BamgTriangulate/BamgTriangulate.h	(revision 13235)
+++ /issm/trunk-jpl/src/modules/BamgTriangulate/BamgTriangulate.h	(revision 13236)
@@ -16,7 +16,4 @@
 #define PY_ARRAY_UNIQUE_SYMBOL PythonIOSymbol
 #endif
-
-/* local prototypes: */
-void BamgTriangulateUsage(void);
 
 #include "../../c/include/globals.h"
Index: /issm/trunk-jpl/src/modules/Chaco/Chaco.cpp
===================================================================
--- /issm/trunk-jpl/src/modules/Chaco/Chaco.cpp	(revision 13235)
+++ /issm/trunk-jpl/src/modules/Chaco/Chaco.cpp	(revision 13236)
@@ -9,8 +9,12 @@
 #endif
 
-
 #include "./Chaco.h"
 
-void mexFunction( int nlhs, mxArray* plhs[], int nrhs, const mxArray* prhs[]){
+void ChacoUsage(void){/*{{{*/
+	_pprintLine_("");
+	_pprintLine_("Usage: [assgn] = Chaco(A,vwgts,ewgts,x,y,z,options,nparts,goal);");
+	_pprintLine_("");
+}/*}}}*/
+WRAPPER(Chaco){
    
 	int i;
@@ -130,8 +134,2 @@
 	MODULEEND();
 }
-
-void ChacoUsage(void){
-	_pprintLine_("");
-	_pprintLine_("Usage: [assgn] = Chaco(A,vwgts,ewgts,x,y,z,options,nparts,goal);");
-	_pprintLine_("");
-}
Index: /issm/trunk-jpl/src/modules/Chaco/Chaco.h
===================================================================
--- /issm/trunk-jpl/src/modules/Chaco/Chaco.h	(revision 13235)
+++ /issm/trunk-jpl/src/modules/Chaco/Chaco.h	(revision 13236)
@@ -26,7 +26,4 @@
 #include "../../c/shared/shared.h"
 #include "../../c/issm-binding.h"
-
-/* local prototypes: */
-void ChacoUsage(void);
 
 #undef __FUNCT__ 
Index: /issm/trunk-jpl/src/modules/ContourToMesh/ContourToMesh.cpp
===================================================================
--- /issm/trunk-jpl/src/modules/ContourToMesh/ContourToMesh.cpp	(revision 13235)
+++ /issm/trunk-jpl/src/modules/ContourToMesh/ContourToMesh.cpp	(revision 13236)
@@ -2,23 +2,29 @@
     \brief: takes an  contour file, and figures out which nodes or elements from the mesh  
     are inside this contour. 
-	usage:
-	[in_nod,in_elem]=ContourToMesh(index,x,y,contours,interptype,edgevalue);
-	
-	input:
-
-		index,x,y: delaunay triangulation.
-		contours: structure holding sets of vertices making open contours. 
-		interptype: string definining type of interpolation ('element', or 'node', or 'element and node');
-		edgevalue: integer (0, 1 or 2) defining the value associated to the nodes on the edges of the polygons
-
-	output:
-		in_nod: vector of flags (0 or 1), of size nods if interptype is set to 'node' or 'element and node', 
-				or of size 0 otherwise.
-		in_elem: vector of flags (0 or 1), of size nel if interptype is set to 'element' or 'element and node', 
-				or of size 0 otherwise.
 */
 	
 #include "./ContourToMesh.h"
 
+void ContourToMeshUsage(void){/*{{{*/
+	_printLine_("CONTOURTOMESH - Flag the elements or nodes inside a contour");
+	_printLine_("");
+	_printLine_("      Usage: ");
+	_printLine_("         [in_nod,in_elem]=ContourToMesh(index,x,y,contourname,interptype,edgevalue)\n");
+	_printLine_("");
+	_printLine_("         index,x,y: mesh triangulation.");
+	_printLine_("         contourname: name of .exp file containing the contours.");
+	_printLine_("         interptype: string definining type of interpolation ('element', or 'node').");
+	_printLine_("         edgevalue: integer (0, 1 or 2) defining the value associated to the nodes on the edges of the polygons.");
+	_printLine_("         in_nod: vector of flags (0 or 1), of size nods if interptype is set to 'node' or 'element and node', ");
+	_printLine_("            or of size 0 otherwise.");
+	_printLine_("         in_elem: vector of flags (0 or 1), of size nel if interptype is set to 'element' or 'element and node', ");
+	_printLine_("            or of size 0 otherwise.");
+	_printLine_("");
+	_printLine_("      Example: ");
+	_printLine_("         in_nod=ContourToMesh(md.elements,md.x,md.y,'Contour.exp','node',1)");
+	_printLine_("         in_elements=ContourToMesh(md.elements,md.x,md.y,'Contour.exp','element',0)");
+	_printLine_("         [in_nodes,in_elements]=ContourToMesh(md.elements,md.x,md.y,'Contour.exp','element and node',0)");
+	_printLine_("");
+}/*}}}*/
 WRAPPER(ContourToMesh){
 
@@ -56,5 +62,4 @@
 	}
 
-
 	/*Fetch inputs: */
 	FetchData(&index,&nel,NULL,INDEX);
@@ -88,26 +93,2 @@
 	
 }
-
-void ContourToMeshUsage(void)//{{{1
-{
-	_printLine_("CONTOURTOMESH - Flag the elements or nodes inside a contour");
-	_printLine_("");
-	_printLine_("      Usage: ");
-	_printLine_("         [in_nod,in_elem]=ContourToMesh(index,x,y,contourname,interptype,edgevalue)\n");
-	_printLine_("");
-	_printLine_("         index,x,y: mesh triangulation.");
-	_printLine_("         contourname: name of .exp file containing the contours.");
-	_printLine_("         interptype: string definining type of interpolation ('element', or 'node').");
-	_printLine_("         edgevalue: integer (0, 1 or 2) defining the value associated to the nodes on the edges of the polygons.");
-	_printLine_("         in_nod: vector of flags (0 or 1), of size nods if interptype is set to 'node' or 'element and node', ");
-	_printLine_("            or of size 0 otherwise.");
-	_printLine_("         in_elem: vector of flags (0 or 1), of size nel if interptype is set to 'element' or 'element and node', ");
-	_printLine_("            or of size 0 otherwise.");
-	_printLine_("");
-	_printLine_("      Example: ");
-	_printLine_("         in_nod=ContourToMesh(md.elements,md.x,md.y,'Contour.exp','node',1)");
-	_printLine_("         in_elements=ContourToMesh(md.elements,md.x,md.y,'Contour.exp','element',0)");
-	_printLine_("         [in_nodes,in_elements]=ContourToMesh(md.elements,md.x,md.y,'Contour.exp','element and node',0)");
-	_printLine_("");
-}
-//}}}
Index: /issm/trunk-jpl/src/modules/ContourToMesh/ContourToMesh.h
===================================================================
--- /issm/trunk-jpl/src/modules/ContourToMesh/ContourToMesh.h	(revision 13235)
+++ /issm/trunk-jpl/src/modules/ContourToMesh/ContourToMesh.h	(revision 13236)
@@ -63,7 +63,4 @@
 #define NRHS 6
 
-/* local prototypes: */
-void ContourToMeshUsage(void);
-
 #endif  /* _CONTOURTOMESH_H */
 
Index: /issm/trunk-jpl/src/modules/ContourToNodes/ContourToNodes.cpp
===================================================================
--- /issm/trunk-jpl/src/modules/ContourToNodes/ContourToNodes.cpp	(revision 13235)
+++ /issm/trunk-jpl/src/modules/ContourToNodes/ContourToNodes.cpp	(revision 13236)
@@ -1,28 +1,20 @@
 /*! \file  ContourtoNodes
     \brief: takes a  contour file, and figures out which nodes  (x,y list)
-    are inside this contour. 
-
-	usage:
-	[flags]=ContourToNodes(x,y,contours,interptype,edgevalue);
-	
-	where:
-
-	input:
-
-		x,y: node cooredinates
-		
-		contours: structure holding sets of vertices making open contours. 
-		
-		interptype: string definining type of interpolation ('element', or 'node', or 'element and node');
-
-		edgevalue: integer (0, 1 or 2) defining the value associated to the nodes on the edges of the polygons
-
-	output:
-		flags: vector of flags (0 or 1), of size nods 
 */
 	
 #include "./ContourToNodes.h"
 
-void mexFunction( int nlhs, mxArray* plhs[], int nrhs, const mxArray* prhs[]) {
+void ContourToNodesUsage(void){/*{{{*/
+	_printLine_("   usage:");
+	_printLine_("   [flags]=ContourToNodes(x,y,contourname,edgevalue);\n");
+	_printLine_("   where:");
+	_printLine_("      x,y: list of nodes.");
+	_printLine_("      contourname: name of .exp file containing the contours, or resulting structure from call to expread.");
+	_printLine_("      interptype: string definining type of interpolation ('element', or 'node').");
+	_printLine_("      edgevalue: integer (0, 1 or 2) defining the value associated to the nodes on the edges of the polygons.");
+	_printLine_("      flags: vector of flags (0 or 1), of size nods.");
+	_printLine_("");
+}/*}}}*/
+WRAPPER(ContourToNodes){
 
 	int i,j;
@@ -87,14 +79,2 @@
 	MODULEEND();
 }
-
-void ContourToNodesUsage(void){
-	_printLine_("   usage:");
-	_printLine_("   [flags]=ContourToNodes(x,y,contourname,edgevalue);\n");
-	_printLine_("   where:");
-	_printLine_("      x,y: list of nodes.");
-	_printLine_("      contourname: name of .exp file containing the contours, or resulting structure from call to expread.");
-	_printLine_("      interptype: string definining type of interpolation ('element', or 'node').");
-	_printLine_("      edgevalue: integer (0, 1 or 2) defining the value associated to the nodes on the edges of the polygons.");
-	_printLine_("      flags: vector of flags (0 or 1), of size nods.");
-	_printLine_("");
-}
Index: /issm/trunk-jpl/src/modules/ContourToNodes/ContourToNodes.h
===================================================================
--- /issm/trunk-jpl/src/modules/ContourToNodes/ContourToNodes.h	(revision 13235)
+++ /issm/trunk-jpl/src/modules/ContourToNodes/ContourToNodes.h	(revision 13236)
@@ -16,7 +16,4 @@
 #define PY_ARRAY_UNIQUE_SYMBOL PythonIOSymbol
 #endif
-
-/* local prototypes: */
-void ContourToNodesUsage(void);
 
 #include "../../c/include/globals.h"
Index: /issm/trunk-jpl/src/modules/ElementConnectivity/ElementConnectivity.cpp
===================================================================
--- /issm/trunk-jpl/src/modules/ElementConnectivity/ElementConnectivity.cpp	(revision 13235)
+++ /issm/trunk-jpl/src/modules/ElementConnectivity/ElementConnectivity.cpp	(revision 13236)
@@ -5,4 +5,9 @@
 #include "./ElementConnectivity.h"
 
+void ElementConnectivityUsage(void) {/*{{{*/
+	_pprintLine_("");
+	_pprintLine_("   usage: elementconnectivity = " << __FUNCT__ << "(elements, nodeconnectivity);");
+	_pprintLine_("");
+}/*}}}*/
 WRAPPER(ElementConnectivity){
 
@@ -35,8 +40,2 @@
 	MODULEEND();
 }
-
-void ElementConnectivityUsage(void) {
-	_pprintLine_("");
-	_pprintLine_("   usage: elementconnectivity = " << __FUNCT__ << "(elements, nodeconnectivity);");
-	_pprintLine_("");
-}
Index: /issm/trunk-jpl/src/modules/ElementConnectivity/ElementConnectivity.h
===================================================================
--- /issm/trunk-jpl/src/modules/ElementConnectivity/ElementConnectivity.h	(revision 13235)
+++ /issm/trunk-jpl/src/modules/ElementConnectivity/ElementConnectivity.h	(revision 13236)
@@ -53,6 +53,3 @@
 #define NRHS  2
 
-/* local prototypes: */
-void ElementConnectivityUsage(void);
-
 #endif  /* _ELEMENTCONNECTIVITY_H */
Index: /issm/trunk-jpl/src/modules/EnumToString/EnumToString.cpp
===================================================================
--- /issm/trunk-jpl/src/modules/EnumToString/EnumToString.cpp	(revision 13235)
+++ /issm/trunk-jpl/src/modules/EnumToString/EnumToString.cpp	(revision 13236)
@@ -5,4 +5,9 @@
 #include "./EnumToString.h"
 
+void EnumToStringUsage(void){/*{{{*/
+	_pprintLine_("");
+	_pprintLine_("   usage: " << __FUNCT__ << "string = EnumToString(enum);");
+	_pprintLine_("");
+}/*}}}*/
 WRAPPER(EnumToString){
 
@@ -28,8 +33,2 @@
 	MODULEEND();
 }
-
-void EnumToStringUsage(void){
-	_pprintLine_("");
-	_pprintLine_("   usage: " << __FUNCT__ << "string = EnumToString(enum);");
-	_pprintLine_("");
-}
Index: /issm/trunk-jpl/src/modules/EnumToString/EnumToString.h
===================================================================
--- /issm/trunk-jpl/src/modules/EnumToString/EnumToString.h	(revision 13235)
+++ /issm/trunk-jpl/src/modules/EnumToString/EnumToString.h	(revision 13236)
@@ -47,6 +47,3 @@
 #define NRHS  1
 
-/* local prototypes: */
-void EnumToStringUsage(void);
-
 #endif  /* _TEST_H */
Index: /issm/trunk-jpl/src/modules/Exp2Kml/Exp2Kml.cpp
===================================================================
--- /issm/trunk-jpl/src/modules/Exp2Kml/Exp2Kml.cpp	(revision 13235)
+++ /issm/trunk-jpl/src/modules/Exp2Kml/Exp2Kml.cpp	(revision 13236)
@@ -4,5 +4,29 @@
 #include "./Exp2Kml.h"
 
-void mexFunction( int nlhs, mxArray* plhs[], int nrhs, const mxArray* prhs[]){
+void Exp2KmlUsage(void){/*{{{*/
+	_pprintLine_("Exp2Kml - exp to kml file conversion module:");
+	_pprintLine_("");
+	_pprintLine_("   This module converts a file from exp to kml format.");
+	_pprintLine_("");
+	_pprintLine_("   Usage:");
+	_pprintLine_("      [ret]=Exp2Kml(filexp,filkml,sgn,'param name',param,...);");
+	_pprintLine_("");
+	_pprintLine_("      filexp      file name of exp file to be read (char)");
+	_pprintLine_("      filkml      file name of kml file to be written (char)");
+	_pprintLine_("      sgn         sign for hemisphere (double, +1 (north) or -1 (south))");
+	_pprintLine_("");
+	_pprintLine_("      central_meridian     central meridian (double, optional, but must specify with sp)");
+	_pprintLine_("      standard_parallel    standard parallel (double, optional, but must specify with cm)");
+	_pprintLine_("      holes       flag for treatment of multiple profiles (char, optional, 'yes' for holes))");
+	_pprintLine_("");
+	_pprintLine_("      ret         return code (non-zero for warning)");
+	_pprintLine_("");
+	_pprintLine_("   Examples:");
+	_pprintLine_("      [ret]=Exp2Kml('file.exp','file.kml', 1);");
+	_pprintLine_("      [ret]=Exp2Kml('file.exp','file.kml', 1,'central_meridian',45,'standard_parallel',70,'holes','yes');");
+	_pprintLine_("      [ret]=Exp2Kml('file.exp','file.kml',-1,'central_meridian', 0,'standard_parallel',71,'holes','yes');");
+	_pprintLine_("");
+}/*}}}*/
+WRAPPER(Exp2Kml){
 
 	int i,verbose=1;
@@ -71,28 +95,2 @@
 	MODULEEND();
 }
-
-void Exp2KmlUsage(void){
-	_pprintLine_("Exp2Kml - exp to kml file conversion module:");
-	_pprintLine_("");
-	_pprintLine_("   This module converts a file from exp to kml format.");
-	_pprintLine_("");
-	_pprintLine_("   Usage:");
-	_pprintLine_("      [ret]=Exp2Kml(filexp,filkml,sgn,'param name',param,...);");
-	_pprintLine_("");
-	_pprintLine_("      filexp      file name of exp file to be read (char)");
-	_pprintLine_("      filkml      file name of kml file to be written (char)");
-	_pprintLine_("      sgn         sign for hemisphere (double, +1 (north) or -1 (south))");
-	_pprintLine_("");
-	_pprintLine_("      central_meridian     central meridian (double, optional, but must specify with sp)");
-	_pprintLine_("      standard_parallel    standard parallel (double, optional, but must specify with cm)");
-	_pprintLine_("      holes       flag for treatment of multiple profiles (char, optional, 'yes' for holes))");
-	_pprintLine_("");
-	_pprintLine_("      ret         return code (non-zero for warning)");
-	_pprintLine_("");
-	_pprintLine_("   Examples:");
-	_pprintLine_("      [ret]=Exp2Kml('file.exp','file.kml', 1);");
-	_pprintLine_("      [ret]=Exp2Kml('file.exp','file.kml', 1,'central_meridian',45,'standard_parallel',70,'holes','yes');");
-	_pprintLine_("      [ret]=Exp2Kml('file.exp','file.kml',-1,'central_meridian', 0,'standard_parallel',71,'holes','yes');");
-	_pprintLine_("");
-}
-
Index: /issm/trunk-jpl/src/modules/Exp2Kml/Exp2Kml.h
===================================================================
--- /issm/trunk-jpl/src/modules/Exp2Kml/Exp2Kml.h	(revision 13235)
+++ /issm/trunk-jpl/src/modules/Exp2Kml/Exp2Kml.h	(revision 13236)
@@ -16,7 +16,4 @@
 #define PY_ARRAY_UNIQUE_SYMBOL PythonIOSymbol
 #endif
-
-/* local prototypes: */
-void Exp2KmlUsage(void);
 
 #include "../../c/include/globals.h"
Index: /issm/trunk-jpl/src/modules/HoleFiller/HoleFiller.cpp
===================================================================
--- /issm/trunk-jpl/src/modules/HoleFiller/HoleFiller.cpp	(revision 13235)
+++ /issm/trunk-jpl/src/modules/HoleFiller/HoleFiller.cpp	(revision 13236)
@@ -10,10 +10,16 @@
 */
 
-
 #include "./HoleFiller.h"
 
-void mexFunction( int nlhs, mxArray* plhs[],
-				  int nrhs, const mxArray* prhs[])
-{
+void HoleFillerUsage(void){/*{{{*/
+	_printLine_("   HoleFiller usage:");
+	_printLine_("   [image_out]=HoleFiller(image_in,smooth);\n");
+	_printLine_("   where:");
+	_printLine_("      image_in in double format");
+	_printLine_("      smooth: 1 to smooth with a box filer, 0 to leave data raw");
+	_printLine_("      image_out in double format");
+	_printLine_("");
+}/*}}}*/
+WRAPPER(HoleFiller){
 
 	int i,j;
@@ -56,14 +62,2 @@
 	MODULEEND();
 }
-
-
-void HoleFillerUsage(void)
-{
-	_printLine_("   HoleFiller usage:");
-	_printLine_("   [image_out]=HoleFiller(image_in,smooth);\n");
-	_printLine_("   where:");
-	_printLine_("      image_in in double format");
-	_printLine_("      smooth: 1 to smooth with a box filer, 0 to leave data raw");
-	_printLine_("      image_out in double format");
-	_printLine_("");
-}
Index: /issm/trunk-jpl/src/modules/HoleFiller/HoleFiller.h
===================================================================
--- /issm/trunk-jpl/src/modules/HoleFiller/HoleFiller.h	(revision 13235)
+++ /issm/trunk-jpl/src/modules/HoleFiller/HoleFiller.h	(revision 13236)
@@ -16,7 +16,4 @@
 #define PY_ARRAY_UNIQUE_SYMBOL PythonIOSymbol
 #endif
-
-/* local prototypes: */
-void HoleFillerUsage(void);
 
 #include "../../c/include/globals.h"
Index: /issm/trunk-jpl/src/modules/InternalFront/InternalFront.cpp
===================================================================
--- /issm/trunk-jpl/src/modules/InternalFront/InternalFront.cpp	(revision 13235)
+++ /issm/trunk-jpl/src/modules/InternalFront/InternalFront.cpp	(revision 13236)
@@ -5,5 +5,10 @@
 #include "./InternalFront.h"
 
-void mexFunction( int nlhs, mxArray* plhs[], int nrhs, const mxArray* prhs[]){
+void InternalFrontUsage(void) {/*{{{*/
+	_pprintLine_("");
+	_pprintLine_("   usage: icefront = " << __FUNCT__ << "(md);");
+	_pprintLine_("");
+}/*}}}*/
+WRAPPER(InternalFront){
 
 	bool*   elementonwater=NULL;
@@ -92,8 +97,2 @@
 	MODULEEND();
 }
-
-void InternalFrontUsage(void) {
-	_pprintLine_("");
-	_pprintLine_("   usage: icefront = " << __FUNCT__ << "(md);");
-	_pprintLine_("");
-}
Index: /issm/trunk-jpl/src/modules/InternalFront/InternalFront.h
===================================================================
--- /issm/trunk-jpl/src/modules/InternalFront/InternalFront.h	(revision 13235)
+++ /issm/trunk-jpl/src/modules/InternalFront/InternalFront.h	(revision 13236)
@@ -16,7 +16,4 @@
 #define PY_ARRAY_UNIQUE_SYMBOL PythonIOSymbol
 #endif
-
-/* local prototypes: */
-void InternalFrontUsage(void);
 
 #include "../../c/include/globals.h"
Index: /issm/trunk-jpl/src/modules/InterpFromGridToMesh/InterpFromGridToMesh.cpp
===================================================================
--- /issm/trunk-jpl/src/modules/InterpFromGridToMesh/InterpFromGridToMesh.cpp	(revision 13235)
+++ /issm/trunk-jpl/src/modules/InterpFromGridToMesh/InterpFromGridToMesh.cpp	(revision 13236)
@@ -1,24 +1,29 @@
 /*!\file InterpFromGridToMesh.c
  * \brief: data interpolation from a list of (x,y,values) into mesh vertices
- 
-	InterpFromGridToMesh.c
-
-	usage:
-	data_mesh=InterpFromGridToMesh(x,y,data,x_mesh,y_mesh);
-	
-	where:
-
-		input:
-		x,y: coordinates of matrix data
-		data - matrix holding the data to be interpolated onto the mesh.
-		x_mesh,y_mesh: coordinates of the mesh vertices onto which we interpolate.
-		
-		output: 
-		data_mesh:  vector of mesh interpolated data.
 */
 	
 #include "./InterpFromGridToMesh.h"
 
-void mexFunction( int nlhs, mxArray* plhs[], int nrhs, const mxArray* prhs[]) {
+void InterpFromGridToMeshUsage(void){/*{{{*/
+	_pprintLine_("INTERPFROMGRIDTOMESH - interpolation from a grid onto a list of points");
+	_pprintLine_("");
+	_pprintLine_("   This function is a multi-threaded mex file that interpolates a field");
+	_pprintLine_("   defined on a grid onto a list of points");
+	_pprintLine_("");
+	_pprintLine_("   Usage:");
+	_pprintLine_("      data_mesh=InterpFromGridToMesh(x,y,data,x_mesh,y_mesh,default_value);");
+	_pprintLine_("");
+	_pprintLine_("      data: matrix holding the data to be interpolated onto the mesh.");
+	_pprintLine_("      x,y: coordinates of matrix data. (x and y must be in increasing order)");
+	_pprintLine_("      x_mesh,y_mesh: coordinates of the points onto which we interpolate.");
+	_pprintLine_("      default_value: default value if no data is found (holes).");
+	_pprintLine_("      data_mesh: vector of mesh interpolated data.");
+	_pprintLine_("");
+	_pprintLine_("   Example:");
+	_pprintLine_("      load('velocities.mat');");
+	_pprintLine_("      md.inversion.vx_obs=InterpFromGridToMesh(x_n,y_m,vx,md.mesh.x,md.mesh.y,0);");
+	_pprintLine_("");
+}/*}}}*/
+WRAPPER(InterpFromGridToMesh){
 
 	int i,j;
@@ -71,24 +76,2 @@
 	MODULEEND();
 }
-
-void InterpFromGridToMeshUsage(void)
-{
-	_pprintLine_("INTERPFROMGRIDTOMESH - interpolation from a grid onto a list of points");
-	_pprintLine_("");
-	_pprintLine_("   This function is a multi-threaded mex file that interpolates a field");
-	_pprintLine_("   defined on a grid onto a list of points");
-	_pprintLine_("");
-	_pprintLine_("   Usage:");
-	_pprintLine_("      data_mesh=InterpFromGridToMesh(x,y,data,x_mesh,y_mesh,default_value);");
-	_pprintLine_("");
-	_pprintLine_("      data: matrix holding the data to be interpolated onto the mesh.");
-	_pprintLine_("      x,y: coordinates of matrix data. (x and y must be in increasing order)");
-	_pprintLine_("      x_mesh,y_mesh: coordinates of the points onto which we interpolate.");
-	_pprintLine_("      default_value: default value if no data is found (holes).");
-	_pprintLine_("      data_mesh: vector of mesh interpolated data.");
-	_pprintLine_("");
-	_pprintLine_("   Example:");
-	_pprintLine_("      load('velocities.mat');");
-	_pprintLine_("      md.inversion.vx_obs=InterpFromGridToMesh(x_n,y_m,vx,md.mesh.x,md.mesh.y,0);");
-	_pprintLine_("");
-}
Index: /issm/trunk-jpl/src/modules/InterpFromGridToMesh/InterpFromGridToMesh.h
===================================================================
--- /issm/trunk-jpl/src/modules/InterpFromGridToMesh/InterpFromGridToMesh.h	(revision 13235)
+++ /issm/trunk-jpl/src/modules/InterpFromGridToMesh/InterpFromGridToMesh.h	(revision 13236)
@@ -16,7 +16,4 @@
 #define PY_ARRAY_UNIQUE_SYMBOL PythonIOSymbol
 #endif
-
-/* local prototypes: */
-void InterpFromGridToMeshUsage(void);
 
 #include "../../c/include/globals.h"
Index: /issm/trunk-jpl/src/modules/InterpFromMesh2d/InterpFromMesh2d.cpp
===================================================================
--- /issm/trunk-jpl/src/modules/InterpFromMesh2d/InterpFromMesh2d.cpp	(revision 13235)
+++ /issm/trunk-jpl/src/modules/InterpFromMesh2d/InterpFromMesh2d.cpp	(revision 13236)
@@ -5,5 +5,20 @@
 #include "./InterpFromMesh2d.h"
 
-void mexFunction( int nlhs, mxArray* plhs[], int nrhs, const mxArray* prhs[]) {
+void InterpFromMesh2dUsage(void){/*{{{*/
+	_pprintLine_("   usage:");
+	_pprintLine_("         data_prime=InterpFromMesh2d(index,x,y,data,x_prime,y_prime);\n");
+	_pprintLine_("      or data_prime=InterpFromMesh2d(index,x,y,data,x_prime,y_prime,default_value);\n");
+	_pprintLine_("      or data_prime=InterpFromMesh2d(index,x,y,data,x_prime,y_prime,default_value,contourname);\n");
+	_pprintLine_("   where:");
+	_pprintLine_("      x,y: coordinates of the nodes where data is defined");
+	_pprintLine_("      index: index of the mesh where data is defined");
+	_pprintLine_("      data - vector holding the data to be interpolated onto the points.");
+	_pprintLine_("      x_prime,y_prime: coordinates of the mesh vertices onto which we interpolate.");
+	_pprintLine_("      default_value: a scalar or vector of size length(x_prime).");
+	_pprintLine_("      contourname: linear interpolation will happen on all x_interp,y_interp inside the contour, default value will be adopted on the rest of the mesh.");
+	_pprintLine_("      data_prime:  vector of prime interpolated data.");
+	_pprintLine_("");
+}/*}}}*/
+WRAPPER(InterpFromMesh2d){
 
 	/*input: */
@@ -135,19 +150,2 @@
 	MODULEEND();
 }
-
-void InterpFromMesh2dUsage(void)
-{
-	_pprintLine_("   usage:");
-	_pprintLine_("         data_prime=InterpFromMesh2d(index,x,y,data,x_prime,y_prime);\n");
-	_pprintLine_("      or data_prime=InterpFromMesh2d(index,x,y,data,x_prime,y_prime,default_value);\n");
-	_pprintLine_("      or data_prime=InterpFromMesh2d(index,x,y,data,x_prime,y_prime,default_value,contourname);\n");
-	_pprintLine_("   where:");
-	_pprintLine_("      x,y: coordinates of the nodes where data is defined");
-	_pprintLine_("      index: index of the mesh where data is defined");
-	_pprintLine_("      data - vector holding the data to be interpolated onto the points.");
-	_pprintLine_("      x_prime,y_prime: coordinates of the mesh vertices onto which we interpolate.");
-	_pprintLine_("      default_value: a scalar or vector of size length(x_prime).");
-	_pprintLine_("      contourname: linear interpolation will happen on all x_interp,y_interp inside the contour, default value will be adopted on the rest of the mesh.");
-	_pprintLine_("      data_prime:  vector of prime interpolated data.");
-	_pprintLine_("");
-}
Index: /issm/trunk-jpl/src/modules/InterpFromMesh2d/InterpFromMesh2d.h
===================================================================
--- /issm/trunk-jpl/src/modules/InterpFromMesh2d/InterpFromMesh2d.h	(revision 13235)
+++ /issm/trunk-jpl/src/modules/InterpFromMesh2d/InterpFromMesh2d.h	(revision 13236)
@@ -16,7 +16,4 @@
 #define PY_ARRAY_UNIQUE_SYMBOL PythonIOSymbol
 #endif
-
-/* local prototypes: */
-void InterpFromMesh2dUsage(void);
 
 #include "../../c/include/globals.h"
Index: /issm/trunk-jpl/src/modules/InterpFromMeshToGrid/InterpFromMeshToGrid.cpp
===================================================================
--- /issm/trunk-jpl/src/modules/InterpFromMeshToGrid/InterpFromMeshToGrid.cpp	(revision 13235)
+++ /issm/trunk-jpl/src/modules/InterpFromMeshToGrid/InterpFromMeshToGrid.cpp	(revision 13236)
@@ -5,5 +5,20 @@
 #include "./InterpFromMeshToGrid.h"
 
-void mexFunction( int nlhs, mxArray* plhs[], int nrhs, const mxArray* prhs[]){
+void InterpFromMeshToGridUsage(void){/*{{{*/
+	_pprintLine_("INTERPFROMMESHTOGRID - interpolation of a data defined on a mesh onto a grid");
+	_pprintLine_("");
+	_pprintLine_("   This function is a multi-threaded mex file that interpolates a field");
+	_pprintLine_("   defined on a triangular mesh onto a regular grid");
+	_pprintLine_("");
+	_pprintLine_("   Usage:");
+	_pprintLine_("      [x_m,y_m,griddata]=InterpFromMeshToGrid(index,x,y,data,xmin,ymax,xposting,yposting,nlines,ncols,default_value)");
+	_pprintLine_("");
+	_pprintLine_("      index,x,y: delaunay triangulation defining the mesh.");
+	_pprintLine_("      meshdata: vertex values of data to be interpolated.");
+	_pprintLine_("      xmin,ymax,posting,nlines,ncols: parameters that define the grid");
+	_pprintLine_("      default_value: value of points located out of the mesh.");
+	_pprintLine_("");
+}/*}}}*/
+WRAPPER(InterpFromMeshToGrid){
 
 	/*input datasets: */
@@ -61,19 +76,2 @@
 	MODULEEND();
 }
-
-void InterpFromMeshToGridUsage(void)
-{
-	_pprintLine_("INTERPFROMMESHTOGRID - interpolation of a data defined on a mesh onto a grid");
-	_pprintLine_("");
-	_pprintLine_("   This function is a multi-threaded mex file that interpolates a field");
-	_pprintLine_("   defined on a triangular mesh onto a regular grid");
-	_pprintLine_("");
-	_pprintLine_("   Usage:");
-	_pprintLine_("      [x_m,y_m,griddata]=InterpFromMeshToGrid(index,x,y,data,xmin,ymax,xposting,yposting,nlines,ncols,default_value)");
-	_pprintLine_("");
-	_pprintLine_("      index,x,y: delaunay triangulation defining the mesh.");
-	_pprintLine_("      meshdata: vertex values of data to be interpolated.");
-	_pprintLine_("      xmin,ymax,posting,nlines,ncols: parameters that define the grid");
-	_pprintLine_("      default_value: value of points located out of the mesh.");
-	_pprintLine_("");
-}
Index: /issm/trunk-jpl/src/modules/InterpFromMeshToGrid/InterpFromMeshToGrid.h
===================================================================
--- /issm/trunk-jpl/src/modules/InterpFromMeshToGrid/InterpFromMeshToGrid.h	(revision 13235)
+++ /issm/trunk-jpl/src/modules/InterpFromMeshToGrid/InterpFromMeshToGrid.h	(revision 13236)
@@ -16,7 +16,4 @@
 #define PY_ARRAY_UNIQUE_SYMBOL PythonIOSymbol
 #endif
-
-/* local prototypes: */
-void InterpFromMeshToGridUsage(void);
 
 #include "../../c/include/globals.h"
Index: /issm/trunk-jpl/src/modules/InterpFromMeshToMesh2d/InterpFromMeshToMesh2d.cpp
===================================================================
--- /issm/trunk-jpl/src/modules/InterpFromMeshToMesh2d/InterpFromMeshToMesh2d.cpp	(revision 13235)
+++ /issm/trunk-jpl/src/modules/InterpFromMeshToMesh2d/InterpFromMeshToMesh2d.cpp	(revision 13236)
@@ -4,5 +4,28 @@
 #include "./InterpFromMeshToMesh2d.h"
 
-
+void InterpFromMeshToMesh2dUsage(void){/*{{{*/
+	_pprintLine_("INTERFROMMESHTOMESH2D - interpolation from a 2d triangular mesh onto a list of point");
+	_pprintLine_("");
+	_pprintLine_("   This function is a multi-threaded mex file that interpolates a field");
+	_pprintLine_("   defined on a Delaunay triangulation onto a list of point");
+	_pprintLine_("");
+	_pprintLine_("   Usage:");
+	_pprintLine_("         data_interp=InterpFromMeshToMesh2d(index,x,y,data,x_interp,y_interp);");
+	_pprintLine_("      or data_interp=InterpFromMeshToMesh2d(index,x,y,data,x_interp,y_interp,OPTIONS);");
+	_pprintLine_("");
+	_pprintLine_("      index             : index of the mesh where data is defined");
+	_pprintLine_("      x,y               : coordinates of the nodes where data is defined");
+	_pprintLine_("      data              : matrix holding the data to be interpolated onto the mesh. (one column per field)");
+	_pprintLine_("      x_interp,y_interp : coordinates of the points onto which we interpolate.");
+	_pprintLine_("      data_interp       : vector of mesh interpolated data.");
+	_pprintLine_("      Available options :");
+	_pprintLine_("         - 'default' : default value if point is outsite of triangulation (instead of linear interolation)");
+	_pprintLine_("");
+	_pprintLine_("   Example:");
+	_pprintLine_("      load('temperature.mat');");
+	_pprintLine_("      md.initialization.temperature=InterpFromMeshToMesh2d(index,x,y,temperature,md.mesh.x,md.mesh.y);");
+	_pprintLine_("      md.initialization.temperature=InterpFromMeshToMesh2d(index,x,y,temperature,md.mesh.x,md.mesh.y,'default',253);");
+	_pprintLine_("");
+}/*}}}*/
 WRAPPER(InterpFromMeshToMesh2d){
 
@@ -55,28 +78,2 @@
 	MODULEEND();
 }
-
-void InterpFromMeshToMesh2dUsage(void){ /*{{{*/
-	_pprintLine_("INTERFROMMESHTOMESH2D - interpolation from a 2d triangular mesh onto a list of point");
-	_pprintLine_("");
-	_pprintLine_("   This function is a multi-threaded mex file that interpolates a field");
-	_pprintLine_("   defined on a Delaunay triangulation onto a list of point");
-	_pprintLine_("");
-	_pprintLine_("   Usage:");
-	_pprintLine_("         data_interp=InterpFromMeshToMesh2d(index,x,y,data,x_interp,y_interp);");
-	_pprintLine_("      or data_interp=InterpFromMeshToMesh2d(index,x,y,data,x_interp,y_interp,OPTIONS);");
-	_pprintLine_("");
-	_pprintLine_("      index             : index of the mesh where data is defined");
-	_pprintLine_("      x,y               : coordinates of the nodes where data is defined");
-	_pprintLine_("      data              : matrix holding the data to be interpolated onto the mesh. (one column per field)");
-	_pprintLine_("      x_interp,y_interp : coordinates of the points onto which we interpolate.");
-	_pprintLine_("      data_interp       : vector of mesh interpolated data.");
-	_pprintLine_("      Available options :");
-	_pprintLine_("         - 'default' : default value if point is outsite of triangulation (instead of linear interolation)");
-	_pprintLine_("");
-	_pprintLine_("   Example:");
-	_pprintLine_("      load('temperature.mat');");
-	_pprintLine_("      md.initialization.temperature=InterpFromMeshToMesh2d(index,x,y,temperature,md.mesh.x,md.mesh.y);");
-	_pprintLine_("      md.initialization.temperature=InterpFromMeshToMesh2d(index,x,y,temperature,md.mesh.x,md.mesh.y,'default',253);");
-	_pprintLine_("");
-}
-/*}}}*/
Index: /issm/trunk-jpl/src/modules/InterpFromMeshToMesh2d/InterpFromMeshToMesh2d.h
===================================================================
--- /issm/trunk-jpl/src/modules/InterpFromMeshToMesh2d/InterpFromMeshToMesh2d.h	(revision 13235)
+++ /issm/trunk-jpl/src/modules/InterpFromMeshToMesh2d/InterpFromMeshToMesh2d.h	(revision 13236)
@@ -16,7 +16,4 @@
 #define PY_ARRAY_UNIQUE_SYMBOL PythonIOSymbol
 #endif
-
-/* local prototypes: */
-void InterpFromMeshToMesh2dUsage(void);
 
 /*Header files: */
Index: /issm/trunk-jpl/src/modules/InterpFromMeshToMesh3d/InterpFromMeshToMesh3d.cpp
===================================================================
--- /issm/trunk-jpl/src/modules/InterpFromMeshToMesh3d/InterpFromMeshToMesh3d.cpp	(revision 13235)
+++ /issm/trunk-jpl/src/modules/InterpFromMeshToMesh3d/InterpFromMeshToMesh3d.cpp	(revision 13236)
@@ -1,25 +1,30 @@
 /*!\file InterpFromMeshToMesh3d.c
  * \brief: data interpolation from a list of (x,y,values) into mesh vertices
- 
-	InterpFromMeshToMesh3d.c
-
-	usage:
-	data_mesh=InterpFromMeshToMesh3d(index,x,y,z,data,x_mesh,y_mesh,z_mesh);
-	
-	where:
-
-		input:
-		x,y,z: coordinates of matrix data
-		data - matrix holding the data to be interpolated onto the mesh.
-		x_mesh,y_mesh,z_mesh: coordinates of the mesh vertices onto which we interpolate.
-		
-		output: 
-		data_mesh:  vector of mesh interpolated data.
-
 */
 	
 #include "./InterpFromMeshToMesh3d.h"
 
-void mexFunction( int nlhs, mxArray* plhs[], int nrhs, const mxArray* prhs[]) {
+void InterpFromMeshToMesh3dUsage(void){/*{{{*/
+	_pprintLine_("INTERPFROMMESHTOMESH3D - interpolation from a 3d hexahedron mesh onto a list of point");
+	_pprintLine_("");
+	_pprintLine_("   This function is a multi-threaded mex file that interpolates a field");
+	_pprintLine_("   defined on a triangular mesh onto a list of point");
+	_pprintLine_("");
+	_pprintLine_("   Usage:");
+	_pprintLine_("      data_prime=InterpFromMeshToMesh3d(index,x,y,z,data,x_prime,y_prime,z_prime,default_value);");
+	_pprintLine_("");
+	_pprintLine_("      index: index of the mesh where data is defined");
+	_pprintLine_("      x,y,z: coordinates of the nodes where data is defined");
+	_pprintLine_("      data: matrix holding the data to be interpolated onto the mesh.");
+	_pprintLine_("      x_prime,y_prime,z_prime: coordinates of the points onto which we interpolate.");
+	_pprintLine_("      default_value: default value if no data is found (holes).");
+	_pprintLine_("      data_prime: vector of mesh interpolated data.");
+	_pprintLine_("");
+	_pprintLine_("   Example:");
+	_pprintLine_("      load('temperature.mat');");
+	_pprintLine_("      md.initialization.temperature=InterpFromMeshToMesh3d(index,x,y,z,temperature,md.mesh.x,md.mesh.y,md.mesh.z,253);");
+	_pprintLine_("");
+}/*}}}*/
+WRAPPER(InterpFromMeshToMesh3d){
 
 	/*input: */
@@ -95,24 +100,2 @@
 	MODULEEND();
 }
-
-void InterpFromMeshToMesh3dUsage(void){
-	_pprintLine_("INTERPFROMMESHTOMESH3D - interpolation from a 3d hexahedron mesh onto a list of point");
-	_pprintLine_("");
-	_pprintLine_("   This function is a multi-threaded mex file that interpolates a field");
-	_pprintLine_("   defined on a triangular mesh onto a list of point");
-	_pprintLine_("");
-	_pprintLine_("   Usage:");
-	_pprintLine_("      data_prime=InterpFromMeshToMesh3d(index,x,y,z,data,x_prime,y_prime,z_prime,default_value);");
-	_pprintLine_("");
-	_pprintLine_("      index: index of the mesh where data is defined");
-	_pprintLine_("      x,y,z: coordinates of the nodes where data is defined");
-	_pprintLine_("      data: matrix holding the data to be interpolated onto the mesh.");
-	_pprintLine_("      x_prime,y_prime,z_prime: coordinates of the points onto which we interpolate.");
-	_pprintLine_("      default_value: default value if no data is found (holes).");
-	_pprintLine_("      data_prime: vector of mesh interpolated data.");
-	_pprintLine_("");
-	_pprintLine_("   Example:");
-	_pprintLine_("      load('temperature.mat');");
-	_pprintLine_("      md.initialization.temperature=InterpFromMeshToMesh3d(index,x,y,z,temperature,md.mesh.x,md.mesh.y,md.mesh.z,253);");
-	_pprintLine_("");
-}
Index: /issm/trunk-jpl/src/modules/InterpFromMeshToMesh3d/InterpFromMeshToMesh3d.h
===================================================================
--- /issm/trunk-jpl/src/modules/InterpFromMeshToMesh3d/InterpFromMeshToMesh3d.h	(revision 13235)
+++ /issm/trunk-jpl/src/modules/InterpFromMeshToMesh3d/InterpFromMeshToMesh3d.h	(revision 13236)
@@ -16,7 +16,4 @@
 #define PY_ARRAY_UNIQUE_SYMBOL PythonIOSymbol
 #endif
-
-/* local prototypes: */
-void InterpFromMeshToMesh3dUsage(void);
 
 #include "../../c/include/globals.h"
Index: /issm/trunk-jpl/src/modules/KMLFileRead/KMLFileRead.cpp
===================================================================
--- /issm/trunk-jpl/src/modules/KMLFileRead/KMLFileRead.cpp	(revision 13235)
+++ /issm/trunk-jpl/src/modules/KMLFileRead/KMLFileRead.cpp	(revision 13236)
@@ -4,5 +4,26 @@
 #include "./KMLFileRead.h"
 
-void mexFunction( int nlhs, mxArray* plhs[], int nrhs, const mxArray* prhs[]){
+void KMLFileReadUsage(void){/*{{{*/
+	_pprintLine_("KMLFileRead - KML file reader module:");
+	_pprintLine_("");
+	_pprintLine_("   This module reads a KML file.");
+	_pprintLine_("");
+	_pprintLine_("   Usage:");
+	_pprintLine_("      [ierror]=KMLFileRead(kmlfile,'param name',param,...);");
+	_pprintLine_("");
+	_pprintLine_("      kmlfile      file name of kml file to be read (char)");
+	_pprintLine_("");
+	_pprintLine_("      echo         echo command (char, optional, 'off'/'on')");
+	_pprintLine_("      deepecho     deep echo command (char, optional, 'off'/'on')");
+	_pprintLine_("      write        write command (char, optional, 'off'/'stdout'/kmlfile)");
+	_pprintLine_("");
+	_pprintLine_("      ierror       return code (non-zero for error)");
+	_pprintLine_("");
+	_pprintLine_("   Examples:");
+	_pprintLine_("      [ierror]=KMLFileRead('file.kml','deepecho','on');");
+	_pprintLine_("      [ierror]=KMLFileRead('filin.kml','echo','on','write','filout.kml');");
+	_pprintLine_("");
+}/*}}}*/
+WRAPPER(KMLFileRead){
 
 	int i,j,nnodes=0,verbose=1;
@@ -105,25 +126,2 @@
 	MODULEEND();
 }
-
-void KMLFileReadUsage(void){
-	_pprintLine_("KMLFileRead - KML file reader module:");
-	_pprintLine_("");
-	_pprintLine_("   This module reads a KML file.");
-	_pprintLine_("");
-	_pprintLine_("   Usage:");
-	_pprintLine_("      [ierror]=KMLFileRead(kmlfile,'param name',param,...);");
-	_pprintLine_("");
-	_pprintLine_("      kmlfile      file name of kml file to be read (char)");
-	_pprintLine_("");
-	_pprintLine_("      echo         echo command (char, optional, 'off'/'on')");
-	_pprintLine_("      deepecho     deep echo command (char, optional, 'off'/'on')");
-	_pprintLine_("      write        write command (char, optional, 'off'/'stdout'/kmlfile)");
-	_pprintLine_("");
-	_pprintLine_("      ierror       return code (non-zero for error)");
-	_pprintLine_("");
-	_pprintLine_("   Examples:");
-	_pprintLine_("      [ierror]=KMLFileRead('file.kml','deepecho','on');");
-	_pprintLine_("      [ierror]=KMLFileRead('filin.kml','echo','on','write','filout.kml');");
-	_pprintLine_("");
-}
-
Index: /issm/trunk-jpl/src/modules/KMLFileRead/KMLFileRead.h
===================================================================
--- /issm/trunk-jpl/src/modules/KMLFileRead/KMLFileRead.h	(revision 13235)
+++ /issm/trunk-jpl/src/modules/KMLFileRead/KMLFileRead.h	(revision 13236)
@@ -16,7 +16,4 @@
 #define PY_ARRAY_UNIQUE_SYMBOL PythonIOSymbol
 #endif
-
-/* local prototypes: */
-void KMLFileReadUsage(void);
 
 #include "../../c/include/globals.h"
Index: /issm/trunk-jpl/src/modules/KMLMeshWrite/KMLMeshWrite.cpp
===================================================================
--- /issm/trunk-jpl/src/modules/KMLMeshWrite/KMLMeshWrite.cpp	(revision 13235)
+++ /issm/trunk-jpl/src/modules/KMLMeshWrite/KMLMeshWrite.cpp	(revision 13236)
@@ -4,5 +4,30 @@
 #include "./KMLMeshWrite.h"
 
-void mexFunction( int nlhs, mxArray* plhs[], int nrhs, const mxArray* prhs[]){
+void KMLMeshWriteUsage(void){/*{{{*/
+	_pprintLine_("KMLMeshWrite - KML mesh writer module:");
+	_pprintLine_("");
+	_pprintLine_("   This module writes the mesh of a model as KML polygons into the specified KML file.");
+	_pprintLine_("");
+	_pprintLine_("   Usage:");
+	_pprintLine_("      ierror=KMLMeshWrite(name,notes,elem,nodecon,lat,long,part,data,cmap,kmlfile);");
+	_pprintLine_("");
+	_pprintLine_("      name       model name (string, may be empty)");
+	_pprintLine_("      notes      model notes (string or cell array of strings, may be empty)");
+	_pprintLine_("      elem       elements (double array)");
+	_pprintLine_("      nodecon    nodal connectivity array (double array, may be empty)");
+	_pprintLine_("      lat        nodal latititudes (double vector)");
+	_pprintLine_("      long       nodal longitudes (double vector)");
+	_pprintLine_("      part       nodal partitions (double vector, may be empty)");
+	_pprintLine_("      data       nodal or element data (double vector, may be empty)");
+	_pprintLine_("      cmap       color map (double nx3 array, may be empty)");
+	_pprintLine_("      kmlfile    KML file name (string)");
+	_pprintLine_("");
+	_pprintLine_("      ierror     error flag (double, non-zero for error)");
+	_pprintLine_("");
+	_pprintLine_("   Example:");
+	_pprintLine_("      KMLMeshWrite(md.name,md.notes,md.elements,md.nodeconnectivity,md.lat,md.long,md.part,md.fm_criterion,options.cmap,filekml);");
+	_pprintLine_("");
+}/*}}}*/
+WRAPPER(KMLMeshWrite){
 
 	int i,j,nnodes=0,verbose=1;
@@ -122,28 +147,2 @@
 	MODULEEND();
 }
-
-void KMLMeshWriteUsage(void){
-	_pprintLine_("KMLMeshWrite - KML mesh writer module:");
-	_pprintLine_("");
-	_pprintLine_("   This module writes the mesh of a model as KML polygons into the specified KML file.");
-	_pprintLine_("");
-	_pprintLine_("   Usage:");
-	_pprintLine_("      ierror=KMLMeshWrite(name,notes,elem,nodecon,lat,long,part,data,cmap,kmlfile);");
-	_pprintLine_("");
-	_pprintLine_("      name       model name (string, may be empty)");
-	_pprintLine_("      notes      model notes (string or cell array of strings, may be empty)");
-	_pprintLine_("      elem       elements (double array)");
-	_pprintLine_("      nodecon    nodal connectivity array (double array, may be empty)");
-	_pprintLine_("      lat        nodal latititudes (double vector)");
-	_pprintLine_("      long       nodal longitudes (double vector)");
-	_pprintLine_("      part       nodal partitions (double vector, may be empty)");
-	_pprintLine_("      data       nodal or element data (double vector, may be empty)");
-	_pprintLine_("      cmap       color map (double nx3 array, may be empty)");
-	_pprintLine_("      kmlfile    KML file name (string)");
-	_pprintLine_("");
-	_pprintLine_("      ierror     error flag (double, non-zero for error)");
-	_pprintLine_("");
-	_pprintLine_("   Example:");
-	_pprintLine_("      KMLMeshWrite(md.name,md.notes,md.elements,md.nodeconnectivity,md.lat,md.long,md.part,md.fm_criterion,options.cmap,filekml);");
-	_pprintLine_("");
-}
Index: /issm/trunk-jpl/src/modules/KMLMeshWrite/KMLMeshWrite.h
===================================================================
--- /issm/trunk-jpl/src/modules/KMLMeshWrite/KMLMeshWrite.h	(revision 13235)
+++ /issm/trunk-jpl/src/modules/KMLMeshWrite/KMLMeshWrite.h	(revision 13236)
@@ -16,7 +16,4 @@
 #define PY_ARRAY_UNIQUE_SYMBOL PythonIOSymbol
 #endif
-
-/* local prototypes: */
-void KMLMeshWriteUsage(void);
 
 #include "../../c/include/globals.h"
Index: /issm/trunk-jpl/src/modules/KMLOverlay/KMLOverlay.cpp
===================================================================
--- /issm/trunk-jpl/src/modules/KMLOverlay/KMLOverlay.cpp	(revision 13235)
+++ /issm/trunk-jpl/src/modules/KMLOverlay/KMLOverlay.cpp	(revision 13236)
@@ -4,5 +4,26 @@
 #include "./KMLOverlay.h"
 
-void mexFunction( int nlhs, mxArray* plhs[], int nrhs, const mxArray* prhs[]){
+void KMLOverlayUsage(void){/*{{{*/
+	_pprintLine_("KMLOverlay - KML file overlay module:");
+	_pprintLine_("");
+	_pprintLine_("   This module reads a list of image files and writes a KML or KMZ overlay file.");
+	_pprintLine_("");
+	_pprintLine_("   Usage:");
+	_pprintLine_("      ierror=KMLOverlay(kmlfile,'param name',param,...);");
+	_pprintLine_("");
+	_pprintLine_("      kmlfile     KML or KMZ file name (string)");
+	_pprintLine_("");
+	_pprintLine_("      lataxis     latitude axis (double vector [south north], required)");
+	_pprintLine_("      longaxis    longitude axis (double vector [west east], required)");
+	_pprintLine_("      images      relative or http image file names (string or array of strings or cell array of strings, required)");
+	_pprintLine_("      zip         flag to zip the doc.kml and image files into kmzfile (double, non-zero for kmz)");
+	_pprintLine_("");
+	_pprintLine_("      ierror     error flag (double, non-zero for error)");
+	_pprintLine_("");
+	_pprintLine_("   Example:");
+	_pprintLine_("      KMLOverlay(kmlfile,'lataxis',[south north],'longaxis',[west east],'images',{'file1.png','http://issm/file2.png'},'zip',1);");
+	_pprintLine_("");
+}/*}}}*/
+WRAPPER(KMLOverlay){
 
 	int i,verbose=1;
@@ -111,24 +132,2 @@
 	MODULEEND();
 }
-
-void KMLOverlayUsage(void){
-	_pprintLine_("KMLOverlay - KML file overlay module:");
-	_pprintLine_("");
-	_pprintLine_("   This module reads a list of image files and writes a KML or KMZ overlay file.");
-	_pprintLine_("");
-	_pprintLine_("   Usage:");
-	_pprintLine_("      ierror=KMLOverlay(kmlfile,'param name',param,...);");
-	_pprintLine_("");
-	_pprintLine_("      kmlfile     KML or KMZ file name (string)");
-	_pprintLine_("");
-	_pprintLine_("      lataxis     latitude axis (double vector [south north], required)");
-	_pprintLine_("      longaxis    longitude axis (double vector [west east], required)");
-	_pprintLine_("      images      relative or http image file names (string or array of strings or cell array of strings, required)");
-	_pprintLine_("      zip         flag to zip the doc.kml and image files into kmzfile (double, non-zero for kmz)");
-	_pprintLine_("");
-	_pprintLine_("      ierror     error flag (double, non-zero for error)");
-	_pprintLine_("");
-	_pprintLine_("   Example:");
-	_pprintLine_("      KMLOverlay(kmlfile,'lataxis',[south north],'longaxis',[west east],'images',{'file1.png','http://issm/file2.png'},'zip',1);");
-	_pprintLine_("");
-}
Index: /issm/trunk-jpl/src/modules/KMLOverlay/KMLOverlay.h
===================================================================
--- /issm/trunk-jpl/src/modules/KMLOverlay/KMLOverlay.h	(revision 13235)
+++ /issm/trunk-jpl/src/modules/KMLOverlay/KMLOverlay.h	(revision 13236)
@@ -16,7 +16,4 @@
 #define PY_ARRAY_UNIQUE_SYMBOL PythonIOSymbol
 #endif
-
-/* local prototypes: */
-void KMLOverlayUsage(void);
 
 #include "../../c/include/globals.h"
Index: /issm/trunk-jpl/src/modules/Kml2Exp/Kml2Exp.cpp
===================================================================
--- /issm/trunk-jpl/src/modules/Kml2Exp/Kml2Exp.cpp	(revision 13235)
+++ /issm/trunk-jpl/src/modules/Kml2Exp/Kml2Exp.cpp	(revision 13236)
@@ -4,5 +4,28 @@
 #include "./Kml2Exp.h"
 
-void mexFunction( int nlhs, mxArray* plhs[], int nrhs, const mxArray* prhs[]){
+void Kml2ExpUsage(void){/*{{{*/
+	_pprintLine_("Kml2Exp - kml to exp file conversion module:");
+	_pprintLine_("");
+	_pprintLine_("   This module converts a file from kml to exp format.");
+	_pprintLine_("");
+	_pprintLine_("   Usage:");
+	_pprintLine_("      [ret]=Kml2Exp(filexp,filkml,sgn,'param name',param,...);");
+	_pprintLine_("");
+	_pprintLine_("      filkml      file name of kml file to be read (char)");
+	_pprintLine_("      filexp      file name of exp file to be written (char)");
+	_pprintLine_("      sgn         sign for hemisphere (double, +1 (north) or -1 (south))");
+	_pprintLine_("");
+	_pprintLine_("      central_meridian     central meridian (double, optional, but must specify with sp)");
+	_pprintLine_("      standard_parallel    standard parallel (double, optional, but must specify with cm)");
+	_pprintLine_("");
+	_pprintLine_("      ret         return code (non-zero for warning)");
+	_pprintLine_("");
+	_pprintLine_("   Examples:");
+	_pprintLine_("      [ret]=Kml2Exp('file.kml','file.exp', 1);");
+	_pprintLine_("      [ret]=Kml2Exp('file.kml','file.exp', 1,'central_meridian',45,'standard_parallel',70);");
+	_pprintLine_("      [ret]=Kml2Exp('file.kml','file.exp',-1,'central_meridian', 0,'standard_parallel',71);");
+	_pprintLine_("");
+}/*}}}*/
+WRAPPER(Kml2Exp){
 
 	int i,verbose=1;
@@ -64,27 +87,2 @@
 	MODULEEND();
 }
-
-void Kml2ExpUsage(void){
-	_pprintLine_("Kml2Exp - kml to exp file conversion module:");
-	_pprintLine_("");
-	_pprintLine_("   This module converts a file from kml to exp format.");
-	_pprintLine_("");
-	_pprintLine_("   Usage:");
-	_pprintLine_("      [ret]=Kml2Exp(filexp,filkml,sgn,'param name',param,...);");
-	_pprintLine_("");
-	_pprintLine_("      filkml      file name of kml file to be read (char)");
-	_pprintLine_("      filexp      file name of exp file to be written (char)");
-	_pprintLine_("      sgn         sign for hemisphere (double, +1 (north) or -1 (south))");
-	_pprintLine_("");
-	_pprintLine_("      central_meridian     central meridian (double, optional, but must specify with sp)");
-	_pprintLine_("      standard_parallel    standard parallel (double, optional, but must specify with cm)");
-	_pprintLine_("");
-	_pprintLine_("      ret         return code (non-zero for warning)");
-	_pprintLine_("");
-	_pprintLine_("   Examples:");
-	_pprintLine_("      [ret]=Kml2Exp('file.kml','file.exp', 1);");
-	_pprintLine_("      [ret]=Kml2Exp('file.kml','file.exp', 1,'central_meridian',45,'standard_parallel',70);");
-	_pprintLine_("      [ret]=Kml2Exp('file.kml','file.exp',-1,'central_meridian', 0,'standard_parallel',71);");
-	_pprintLine_("");
-}
-
Index: /issm/trunk-jpl/src/modules/Kml2Exp/Kml2Exp.h
===================================================================
--- /issm/trunk-jpl/src/modules/Kml2Exp/Kml2Exp.h	(revision 13235)
+++ /issm/trunk-jpl/src/modules/Kml2Exp/Kml2Exp.h	(revision 13236)
@@ -16,7 +16,4 @@
 #define PY_ARRAY_UNIQUE_SYMBOL PythonIOSymbol
 #endif
-
-/* local prototypes: */
-void Kml2ExpUsage(void);
 
 #include "../../c/include/globals.h"
Index: /issm/trunk-jpl/src/modules/Kriging/Kriging.cpp
===================================================================
--- /issm/trunk-jpl/src/modules/Kriging/Kriging.cpp	(revision 13235)
+++ /issm/trunk-jpl/src/modules/Kriging/Kriging.cpp	(revision 13236)
@@ -4,5 +4,24 @@
 #include "./Kriging.h"
 
-void mexFunction( int nlhs, mxArray* plhs[], int nrhs, const mxArray* prhs[]){
+void KrigingUsage(void){/*{{{*/
+	_pprintLine_("");
+	_pprintLine_("   usage: predictions=" << __FUNCT__ << "(x,y,observations,x_interp,y_interp,'options');");
+	_pprintLine_("   available options:");
+	_pprintLine_("      -'model': Available variogram models 'gaussian' (default),'spherical','power','exponential'");
+	_pprintLine_("         -'nugget': nugget effect (default 0.2)");
+	_pprintLine_("         -'range':  for gaussian, spherical and exponential models (default sqrt(3))");
+	_pprintLine_("         -'sill':   for gaussian, spherical and exponential models (default 1)");
+	_pprintLine_("         -'slope':  for power model (default 1)");
+	_pprintLine_("         -'power':  for power model (default 1)");
+	_pprintLine_("      -'searchradius': search radius for each prediction (default is observations span)");
+	_pprintLine_("      -'boxlength':    minimum length of quadtree boxes (useful to decrease the number of observations)");
+	_pprintLine_("      -'maxdata':      minimum number of observations for a prediction (default is 50)");
+	_pprintLine_("      -'mindata':      maximum number of observations for a prediction (default is 1)");
+	_pprintLine_("      -'maxtrimming':  maximum trimming value (default is -1.e+21)");
+	_pprintLine_("      -'mintrimming':  minimum trimming value (default is +1.e+21)");
+	_pprintLine_("      -'minspacing':   minimum distance between observation (default is 0.01)");
+	_pprintLine_("");
+}/*}}}*/
+WRAPPER(Kriging){
 
 	/*Outputs*/
@@ -52,22 +71,2 @@
 	MODULEEND();
 }
-
-void KrigingUsage(void){
-	_pprintLine_("");
-	_pprintLine_("   usage: predictions=" << __FUNCT__ << "(x,y,observations,x_interp,y_interp,'options');");
-	_pprintLine_("   available options:");
-	_pprintLine_("      -'model': Available variogram models 'gaussian' (default),'spherical','power','exponential'");
-	_pprintLine_("         -'nugget': nugget effect (default 0.2)");
-	_pprintLine_("         -'range':  for gaussian, spherical and exponential models (default sqrt(3))");
-	_pprintLine_("         -'sill':   for gaussian, spherical and exponential models (default 1)");
-	_pprintLine_("         -'slope':  for power model (default 1)");
-	_pprintLine_("         -'power':  for power model (default 1)");
-	_pprintLine_("      -'searchradius': search radius for each prediction (default is observations span)");
-	_pprintLine_("      -'boxlength':    minimum length of quadtree boxes (useful to decrease the number of observations)");
-	_pprintLine_("      -'maxdata':      minimum number of observations for a prediction (default is 50)");
-	_pprintLine_("      -'mindata':      maximum number of observations for a prediction (default is 1)");
-	_pprintLine_("      -'maxtrimming':  maximum trimming value (default is -1.e+21)");
-	_pprintLine_("      -'mintrimming':  minimum trimming value (default is +1.e+21)");
-	_pprintLine_("      -'minspacing':   minimum distance between observation (default is 0.01)");
-	_pprintLine_("");
-}
Index: /issm/trunk-jpl/src/modules/Kriging/Kriging.h
===================================================================
--- /issm/trunk-jpl/src/modules/Kriging/Kriging.h	(revision 13235)
+++ /issm/trunk-jpl/src/modules/Kriging/Kriging.h	(revision 13236)
@@ -1,4 +1,4 @@
 /*
-	KrigingUsage.h
+	Kriging.h
 */
 
@@ -16,7 +16,4 @@
 #define PY_ARRAY_UNIQUE_SYMBOL PythonIOSymbol
 #endif
-
-/* local prototypes: */
-void KrigingUsage(void);
 
 #include "../../c/include/globals.h"
Index: /issm/trunk-jpl/src/modules/Ll2xy/Ll2xy.cpp
===================================================================
--- /issm/trunk-jpl/src/modules/Ll2xy/Ll2xy.cpp	(revision 13235)
+++ /issm/trunk-jpl/src/modules/Ll2xy/Ll2xy.cpp	(revision 13236)
@@ -4,5 +4,29 @@
 #include "./Ll2xy.h"
 
-void mexFunction( int nlhs, mxArray* plhs[], int nrhs, const mxArray* prhs[]){
+void Ll2xyUsage(void){/*{{{*/
+	_pprintLine_("Ll2xy - lat/long to x/y coordinate transformation module:");
+	_pprintLine_("");
+	_pprintLine_("   This module transforms lat/long to x/y coordinates.");
+	_pprintLine_("");
+	_pprintLine_("   Usage:");
+	_pprintLine_("      [x,y]=Ll2xy(lat,lon,sgn,'param name',param,...);");
+	_pprintLine_("");
+	_pprintLine_("      lat         latitude coordinates (double vector)");
+	_pprintLine_("      lon         longitude coordinates (double vector)");
+	_pprintLine_("      sgn         sign for hemisphere (double, +1 (north) or -1 (south))");
+	_pprintLine_("");
+	_pprintLine_("      central_meridian     central meridian (double, optional, but must specify with sp)");
+	_pprintLine_("      standard_parallel    standard parallel (double, optional, but must specify with cm)");
+	_pprintLine_("");
+	_pprintLine_("      x           x coordinates (double vector)");
+	_pprintLine_("      y           y coordinates (double vector)");
+	_pprintLine_("");
+	_pprintLine_("   Examples:");
+	_pprintLine_("      [x,y]=Ll2xy(lat,lon, 1);");
+	_pprintLine_("      [x,y]=Ll2xy(lat,lon, 1,'central_meridian',45,'standard_parallel',70);");
+	_pprintLine_("      [x,y]=Ll2xy(lat,lon,-1,'central_meridian', 0,'standard_parallel',71);");
+	_pprintLine_("");
+}/*}}}*/
+WRAPPER(Ll2xy){
 
 	int i,verbose=1;
@@ -72,27 +96,2 @@
 	MODULEEND();
 }
-
-void Ll2xyUsage(void){
-	_pprintLine_("Ll2xy - lat/long to x/y coordinate transformation module:");
-	_pprintLine_("");
-	_pprintLine_("   This module transforms lat/long to x/y coordinates.");
-	_pprintLine_("");
-	_pprintLine_("   Usage:");
-	_pprintLine_("      [x,y]=Ll2xy(lat,lon,sgn,'param name',param,...);");
-	_pprintLine_("");
-	_pprintLine_("      lat         latitude coordinates (double vector)");
-	_pprintLine_("      lon         longitude coordinates (double vector)");
-	_pprintLine_("      sgn         sign for hemisphere (double, +1 (north) or -1 (south))");
-	_pprintLine_("");
-	_pprintLine_("      central_meridian     central meridian (double, optional, but must specify with sp)");
-	_pprintLine_("      standard_parallel    standard parallel (double, optional, but must specify with cm)");
-	_pprintLine_("");
-	_pprintLine_("      x           x coordinates (double vector)");
-	_pprintLine_("      y           y coordinates (double vector)");
-	_pprintLine_("");
-	_pprintLine_("   Examples:");
-	_pprintLine_("      [x,y]=Ll2xy(lat,lon, 1);");
-	_pprintLine_("      [x,y]=Ll2xy(lat,lon, 1,'central_meridian',45,'standard_parallel',70);");
-	_pprintLine_("      [x,y]=Ll2xy(lat,lon,-1,'central_meridian', 0,'standard_parallel',71);");
-	_pprintLine_("");
-}
Index: /issm/trunk-jpl/src/modules/Ll2xy/Ll2xy.h
===================================================================
--- /issm/trunk-jpl/src/modules/Ll2xy/Ll2xy.h	(revision 13235)
+++ /issm/trunk-jpl/src/modules/Ll2xy/Ll2xy.h	(revision 13236)
@@ -16,7 +16,4 @@
 #define PY_ARRAY_UNIQUE_SYMBOL PythonIOSymbol
 #endif
-
-/* local prototypes: */
-void Ll2xyUsage(void);
 
 #include "../../c/include/globals.h"
Index: /issm/trunk-jpl/src/modules/MeshPartition/MeshPartition.cpp
===================================================================
--- /issm/trunk-jpl/src/modules/MeshPartition/MeshPartition.cpp	(revision 13235)
+++ /issm/trunk-jpl/src/modules/MeshPartition/MeshPartition.cpp	(revision 13236)
@@ -1,28 +1,17 @@
 /*!\file:  MeshPartition.cpp
  * \brief: partition mesh according to number of areas, using Metis library.
-
-	usage:
-	[element_partitioning,node_partitioning]=MeshPartition(model,numareas)
-	
-	%Info needed from model are the following: 
-	%mesh info: 
-	numberofelements,numberofvertices,elements,elements_width
-	%Non-extruded 2d mesh info
-	nel2d,nods2d,elements2d,
-	%Extruded 2d mesh info
-	nel2d_ext,nods2d_ext,elements2d_ext,
-	%Diverse
-	numberoflayers,dim)
-
-	output:
-	vector of partitioning area numbers, for every element.
-	vector of partitioning area numbers, for every node.
 */
 	
 #include "./MeshPartition.h"
 
-
-void mexFunction( int nlhs, mxArray* plhs[], int nrhs, const mxArray* prhs[]) {
-
+void MeshPartitionUsage(void){/*{{{*/
+	_printLine_("   usage:");
+	_printString_("   [element_partitioning,node_partitioning]=MeshPartition(md.mesh,numpartitions)");
+	_printLine_("   where:");
+	_printLine_("      element_partitioning is a vector of partitioning area numbers, for every element.");
+	_printLine_("      node_partitioning is a vector of partitioning area numbers, for every node.");
+	_printLine_("");
+}/*}}}*/
+WRAPPER(MeshPartition){
 
 	/*Indexing: */
@@ -94,11 +83,2 @@
 	MODULEEND();
 }
-
-void MeshPartitionUsage(void){
-	_printLine_("   usage:");
-	_printString_("   [element_partitioning,node_partitioning]=MeshPartition(md.mesh,numpartitions)");
-	_printLine_("   where:");
-	_printLine_("      element_partitioning is a vector of partitioning area numbers, for every element.");
-	_printLine_("      node_partitioning is a vector of partitioning area numbers, for every node.");
-	_printLine_("");
-}
Index: /issm/trunk-jpl/src/modules/MeshPartition/MeshPartition.h
===================================================================
--- /issm/trunk-jpl/src/modules/MeshPartition/MeshPartition.h	(revision 13235)
+++ /issm/trunk-jpl/src/modules/MeshPartition/MeshPartition.h	(revision 13236)
@@ -17,7 +17,4 @@
 #endif
 
-/* local prototypes: */
-void MeshPartitionUsage(void);
-
 #include "../../c/include/globals.h"
 #include "../../c/modules/modules.h"
@@ -25,7 +22,4 @@
 #include "../../c/shared/shared.h"
 #include "../../c/issm-binding.h"
-
-#undef CLEANUP
-#define CLEANUP MeshPartitionLocalCleanup();
 
 #undef __FUNCT__ 
Index: /issm/trunk-jpl/src/modules/MeshProfileIntersection/MeshProfileIntersection.cpp
===================================================================
--- /issm/trunk-jpl/src/modules/MeshProfileIntersection/MeshProfileIntersection.cpp	(revision 13235)
+++ /issm/trunk-jpl/src/modules/MeshProfileIntersection/MeshProfileIntersection.cpp	(revision 13236)
@@ -18,5 +18,17 @@
 #include "./MeshProfileIntersection.h"
 
-void mexFunction( int nlhs, mxArray* plhs[], int nrhs, const mxArray* prhs[]) {
+void MeshProfileIntersectionUsage(void){/*{{{*/
+	_printLine_("   usage:");
+	_printLine_("   [segments]=MeshProfileIntersection(index,x,y,filename);");
+	_printLine_("   where:");
+	_printLine_("   input:");
+	_printLine_("        index,x,y is a triangulation");
+	_printLine_("        filename: name of Argus style .exp file containing the segments (can be groups of disconnected segments)");
+	_printLine_("   output:");
+	_printLine_("        segments: array made of x1,y1,x2,y2,element_id lines (x1,y1) and (x2,y2) are segment extremitis for a segment ");
+	_printLine_("        belonging to the elemnt_id element. there are as many lines in segments as there are segments intersecting the ");
+	_printLine_("        mesh.");
+}/*}}}*/
+WRAPPER(MeshProfileIntersection){
 
 	int i,j;
@@ -100,15 +112,2 @@
 
 }
-
-void MeshProfileIntersectionUsage(void){
-	_printLine_("   usage:");
-	_printLine_("   [segments]=MeshProfileIntersection(index,x,y,filename);");
-	_printLine_("   where:");
-	_printLine_("   input:");
-	_printLine_("        index,x,y is a triangulation");
-	_printLine_("        filename: name of Argus style .exp file containing the segments (can be groups of disconnected segments)");
-	_printLine_("   output:");
-	_printLine_("        segments: array made of x1,y1,x2,y2,element_id lines (x1,y1) and (x2,y2) are segment extremitis for a segment ");
-	_printLine_("        belonging to the elemnt_id element. there are as many lines in segments as there are segments intersecting the ");
-	_printLine_("        mesh.");
-}
Index: /issm/trunk-jpl/src/modules/MeshProfileIntersection/MeshProfileIntersection.h
===================================================================
--- /issm/trunk-jpl/src/modules/MeshProfileIntersection/MeshProfileIntersection.h	(revision 13235)
+++ /issm/trunk-jpl/src/modules/MeshProfileIntersection/MeshProfileIntersection.h	(revision 13236)
@@ -16,7 +16,4 @@
 #define PY_ARRAY_UNIQUE_SYMBOL PythonIOSymbol
 #endif
-
-/* local prototypes: */
-void MeshProfileIntersectionUsage(void);
 
 #include "../../c/include/globals.h"
Index: /issm/trunk-jpl/src/modules/NodeConnectivity/NodeConnectivity.cpp
===================================================================
--- /issm/trunk-jpl/src/modules/NodeConnectivity/NodeConnectivity.cpp	(revision 13235)
+++ /issm/trunk-jpl/src/modules/NodeConnectivity/NodeConnectivity.cpp	(revision 13236)
@@ -5,4 +5,9 @@
 #include "./NodeConnectivity.h"
 
+void NodeConnectivityUsage(void){/*{{{*/
+	_pprintLine_("");
+	_pprintLine_("   usage: connectivity = " << __FUNCT__ << "(elements, numnodes);");
+	_pprintLine_("");
+}/*}}}*/
 WRAPPER(NodeConnectivity){
 
@@ -35,8 +40,2 @@
 	MODULEEND();
 }
-
-void NodeConnectivityUsage(void) {
-	_pprintLine_("");
-	_pprintLine_("   usage: connectivity = " << __FUNCT__ << "(elements, numnodes);");
-	_pprintLine_("");
-}
Index: /issm/trunk-jpl/src/modules/NodeConnectivity/NodeConnectivity.h
===================================================================
--- /issm/trunk-jpl/src/modules/NodeConnectivity/NodeConnectivity.h	(revision 13235)
+++ /issm/trunk-jpl/src/modules/NodeConnectivity/NodeConnectivity.h	(revision 13236)
@@ -16,4 +16,7 @@
 #define PY_ARRAY_UNIQUE_SYMBOL PythonIOSymbol
 #endif
+
+#undef __FUNCT__ 
+#define __FUNCT__  "NodeConnectivity"
 
 /*Header files: */
@@ -44,7 +47,4 @@
 #endif
 
-#undef __FUNCT__ 
-#define __FUNCT__  "NodeConnectivity"
-
 /* serial arg counts: */
 #undef NLHS
@@ -53,6 +53,3 @@
 #define NRHS  2
 
-/* local prototypes: */
-void NodeConnectivityUsage(void);
-
 #endif  /* _NODECONNECTIVITY_H */
Index: /issm/trunk-jpl/src/modules/PointCloudFindNeighbors/PointCloudFindNeighbors.cpp
===================================================================
--- /issm/trunk-jpl/src/modules/PointCloudFindNeighbors/PointCloudFindNeighbors.cpp	(revision 13235)
+++ /issm/trunk-jpl/src/modules/PointCloudFindNeighbors/PointCloudFindNeighbors.cpp	(revision 13236)
@@ -5,5 +5,15 @@
 #include "./PointCloudFindNeighbors.h"
 
-void mexFunction( int nlhs, mxArray* plhs[], int nrhs, const mxArray* prhs[]) {
+void PointCloudFindNeighborsUsage(void){/*{{{*/
+	_printLine_("   usage:");
+	_printLine_("   [flags]=PointCloudFindNeighbors(x,y,mindistance,multithread);\n");
+	_printLine_("   where:");
+	_printLine_("      x,y: list of points.");
+	_printLine_("      mindistance: minimum distance that should exist between points in the cloud.");
+	_printLine_("      multithread: run multithreaded or not. with multithreads, flags can get 1 and 2 values in duplicates.");
+	_printLine_("      flags: array of flags (flag==1 means point is within mindistance of another point)");
+	_printLine_("");
+}/*}}}*/
+WRAPPER(PointCloudFindNeighbors){
 
 	int i,j;
@@ -40,13 +50,2 @@
 	MODULEEND();
 }
-
-void PointCloudFindNeighborsUsage(void){
-	_printLine_("   usage:");
-	_printLine_("   [flags]=PointCloudFindNeighbors(x,y,mindistance,multithread);\n");
-	_printLine_("   where:");
-	_printLine_("      x,y: list of points.");
-	_printLine_("      mindistance: minimum distance that should exist between points in the cloud.");
-	_printLine_("      multithread: run multithreaded or not. with multithreads, flags can get 1 and 2 values in duplicates.");
-	_printLine_("      flags: array of flags (flag==1 means point is within mindistance of another point)");
-	_printLine_("");
-}
Index: /issm/trunk-jpl/src/modules/PointCloudFindNeighbors/PointCloudFindNeighbors.h
===================================================================
--- /issm/trunk-jpl/src/modules/PointCloudFindNeighbors/PointCloudFindNeighbors.h	(revision 13235)
+++ /issm/trunk-jpl/src/modules/PointCloudFindNeighbors/PointCloudFindNeighbors.h	(revision 13236)
@@ -16,7 +16,4 @@
 #define PY_ARRAY_UNIQUE_SYMBOL PythonIOSymbol
 #endif
-
-/* local prototypes: */
-void PointCloudFindNeighborsUsage(void);
 
 #include "../../c/include/globals.h"
Index: /issm/trunk-jpl/src/modules/PropagateFlagsFromConnectivity/PropagateFlagsFromConnectivity.cpp
===================================================================
--- /issm/trunk-jpl/src/modules/PropagateFlagsFromConnectivity/PropagateFlagsFromConnectivity.cpp	(revision 13235)
+++ /issm/trunk-jpl/src/modules/PropagateFlagsFromConnectivity/PropagateFlagsFromConnectivity.cpp	(revision 13236)
@@ -5,5 +5,10 @@
 #include "./PropagateFlagsFromConnectivity.h"
 
-void mexFunction( int nlhs, mxArray* plhs[], int nrhs, const mxArray* prhs[]){
+void PropagateFlagsFromConnectivityUsage(void) {/*{{{*/
+	_printLine_("");
+	_printLine_("   usage: [pool] = " << __FUNCT__ << "(connectivity,pool,index,flags);");;
+	_printLine_("");
+}/*}}}*/
+WRAPPER(PropagateFlagsFromConnectivity){
 
 	/*input/output datasets: */
@@ -40,8 +45,2 @@
 	MODULEEND();
 }
-
-void PropagateFlagsFromConnectivityUsage(void) {
-	_printLine_("");
-	_printLine_("   usage: [pool] = " << __FUNCT__ << "(connectivity,pool,index,flags);");;
-	_printLine_("");
-}
Index: /issm/trunk-jpl/src/modules/PropagateFlagsFromConnectivity/PropagateFlagsFromConnectivity.h
===================================================================
--- /issm/trunk-jpl/src/modules/PropagateFlagsFromConnectivity/PropagateFlagsFromConnectivity.h	(revision 13235)
+++ /issm/trunk-jpl/src/modules/PropagateFlagsFromConnectivity/PropagateFlagsFromConnectivity.h	(revision 13236)
@@ -16,7 +16,4 @@
 #define PY_ARRAY_UNIQUE_SYMBOL PythonIOSymbol
 #endif
-
-/* local prototypes: */
-void PropagateFlagsFromConnectivityUsage(void);
 
 #include "../../c/include/globals.h"
Index: /issm/trunk-jpl/src/modules/Scotch/Scotch.cpp
===================================================================
--- /issm/trunk-jpl/src/modules/Scotch/Scotch.cpp	(revision 13235)
+++ /issm/trunk-jpl/src/modules/Scotch/Scotch.cpp	(revision 13236)
@@ -8,21 +8,15 @@
 #error "Cannot compile with HAVE_CONFIG_H symbol! run configure first!"
 #endif
-
-
 #include "./Scotch.h"
 
-/******************************/
-/*                            */
-/* This is the main function. */
-/*                            */
-/******************************/
-
-void mexFunction( int nlhs,
-				  mxArray *plhs[],
-				  int nrhs,
-				  const mxArray *prhs[] )
-{
-
-#ifndef _HAVE_SCOTCH_ //only works if scotch library has been compiled in.
+void GmapUsage(void){/*{{{*/
+	mexPrintf("\n");
+	mexPrintf("Usage: [maptab]=Scotch(adjmat,vertlb,vertwt,edgewt,archtyp,archpar,\n");
+	mexPrintf("                         Scotch-specific parameters);\n");
+	mexPrintf("\n");
+}/*}}}*/
+void mexFunction( int nlhs, mxArray *plhs[], int nrhs, const mxArray *prhs[]){
+
+	#ifndef _HAVE_SCOTCH_ //only works if scotch library has been compiled in.
 	_error_("Scotch not available! Cannot carry out Scotch partitioning!");
 	#else
@@ -42,5 +36,5 @@
 	/* Check for proper number of arguments */
    
-	if      (nrhs == 0 && nlhs == 0) {
+	if (nrhs == 0 && nlhs == 0) {
 		GmapUsage();
 		return;
@@ -254,14 +248,2 @@
 #endif //#ifndef _HAVE_SCOTCH_
 }
-
-void GmapUsage( void )
-{
-
-    mexPrintf("\n");
-    mexPrintf("Usage: [maptab]=Scotch(adjmat,vertlb,vertwt,edgewt,archtyp,archpar,\n");
-    mexPrintf("                         Scotch-specific parameters);\n");
-    mexPrintf("\n");
-
-    return;
-}
-
Index: /issm/trunk-jpl/src/modules/Scotch/Scotch.h
===================================================================
--- /issm/trunk-jpl/src/modules/Scotch/Scotch.h	(revision 13235)
+++ /issm/trunk-jpl/src/modules/Scotch/Scotch.h	(revision 13236)
@@ -6,11 +6,7 @@
 #define _SCOTCH_H
 
-/* local prototypes: */
-void GmapUsage(void);
-
 #include <stdio.h>
 #include <string.h>    /*  strcasecmp  */
 #include <time.h>      /*  clock,time,difftime  */
-
 #include "../../c/include/globals.h"
 #include "../../c/modules/modules.h"
Index: /issm/trunk-jpl/src/modules/Shp2Kml/Shp2Kml.cpp
===================================================================
--- /issm/trunk-jpl/src/modules/Shp2Kml/Shp2Kml.cpp	(revision 13235)
+++ /issm/trunk-jpl/src/modules/Shp2Kml/Shp2Kml.cpp	(revision 13236)
@@ -11,5 +11,28 @@
 #include "./Shp2Kml.h"
 
-void mexFunction( int nlhs, mxArray* plhs[], int nrhs, const mxArray* prhs[]){
+void Shp2KmlUsage(void){/*{{{*/
+	_pprintLine_("Shp2Kml - shp to kml file conversion module:");
+	_pprintLine_("");
+	_pprintLine_("   This module converts a file from shp to kml format.");
+	_pprintLine_("");
+	_pprintLine_("   Usage:");
+	_pprintLine_("      [ret]=Shp2Kml(filshp,filkml,sgn,'param name',param,...);");
+	_pprintLine_("");
+	_pprintLine_("      filshp      file name of shp file to be read (char, extension optional)");
+	_pprintLine_("      filkml      file name of kml file to be written (char)");
+	_pprintLine_("      sgn         sign for hemisphere (double, +1 (north); -1 (south); or 0 (no translation))");
+	_pprintLine_("");
+	_pprintLine_("      central_meridian     central meridian (double, optional, but must specify with sp)");
+	_pprintLine_("      standard_parallel    standard parallel (double, optional, but must specify with cm)");
+	_pprintLine_("");
+	_pprintLine_("      ret         return code (non-zero for warning)");
+	_pprintLine_("");
+	_pprintLine_("   Examples:");
+	_pprintLine_("      [ret]=Shp2Kml('file.shp','file.kml', 0);");
+	_pprintLine_("      [ret]=Shp2Kml('file.shp','file.kml', 1,'central_meridian',45,'standard_parallel',70);");
+	_pprintLine_("      [ret]=Shp2Kml('file.shp','file.kml',-1,'central_meridian', 0,'standard_parallel',71);");
+	_pprintLine_("");
+}/*}}}*/
+WRAPPER(Shp2Kml){
 
 	int i,verbose=1;
@@ -75,26 +98,2 @@
 	MODULEEND();
 }
-
-void Shp2KmlUsage(void){
-	_pprintLine_("Shp2Kml - shp to kml file conversion module:");
-	_pprintLine_("");
-	_pprintLine_("   This module converts a file from shp to kml format.");
-	_pprintLine_("");
-	_pprintLine_("   Usage:");
-	_pprintLine_("      [ret]=Shp2Kml(filshp,filkml,sgn,'param name',param,...);");
-	_pprintLine_("");
-	_pprintLine_("      filshp      file name of shp file to be read (char, extension optional)");
-	_pprintLine_("      filkml      file name of kml file to be written (char)");
-	_pprintLine_("      sgn         sign for hemisphere (double, +1 (north); -1 (south); or 0 (no translation))");
-	_pprintLine_("");
-	_pprintLine_("      central_meridian     central meridian (double, optional, but must specify with sp)");
-	_pprintLine_("      standard_parallel    standard parallel (double, optional, but must specify with cm)");
-	_pprintLine_("");
-	_pprintLine_("      ret         return code (non-zero for warning)");
-	_pprintLine_("");
-	_pprintLine_("   Examples:");
-	_pprintLine_("      [ret]=Shp2Kml('file.shp','file.kml', 0);");
-	_pprintLine_("      [ret]=Shp2Kml('file.shp','file.kml', 1,'central_meridian',45,'standard_parallel',70);");
-	_pprintLine_("      [ret]=Shp2Kml('file.shp','file.kml',-1,'central_meridian', 0,'standard_parallel',71);");
-	_pprintLine_("");
-}
Index: /issm/trunk-jpl/src/modules/Shp2Kml/Shp2Kml.h
===================================================================
--- /issm/trunk-jpl/src/modules/Shp2Kml/Shp2Kml.h	(revision 13235)
+++ /issm/trunk-jpl/src/modules/Shp2Kml/Shp2Kml.h	(revision 13236)
@@ -16,7 +16,4 @@
 #define PY_ARRAY_UNIQUE_SYMBOL PythonIOSymbol
 #endif
-
-/* local prototypes: */
-void Shp2KmlUsage(void);
 
 #include "../../c/include/globals.h"
Index: /issm/trunk-jpl/src/modules/StringToEnum/StringToEnum.cpp
===================================================================
--- /issm/trunk-jpl/src/modules/StringToEnum/StringToEnum.cpp	(revision 13235)
+++ /issm/trunk-jpl/src/modules/StringToEnum/StringToEnum.cpp	(revision 13236)
@@ -5,4 +5,9 @@
 #include "./StringToEnum.h"
 
+void StringToEnumUsage(void){/*{{{*/
+	_pprintLine_("");
+	_pprintLine_("   usage: " << __FUNCT__ << "enum = StringToEnum(string);");
+	_pprintLine_("");
+}/*}}}*/
 WRAPPER(StringToEnum){
 
@@ -28,9 +33,2 @@
 	MODULEEND();
 }
-
-void StringToEnumUsage(void)
-{
-	_pprintLine_("");
-	_pprintLine_("   usage: " << __FUNCT__ << "enum = StringToEnum(string);");
-	_pprintLine_("");
-}
Index: /issm/trunk-jpl/src/modules/StringToEnum/StringToEnum.h
===================================================================
--- /issm/trunk-jpl/src/modules/StringToEnum/StringToEnum.h	(revision 13235)
+++ /issm/trunk-jpl/src/modules/StringToEnum/StringToEnum.h	(revision 13236)
@@ -47,6 +47,3 @@
 #define NRHS  1
 
-/* local prototypes: */
-void StringToEnumUsage(void);
-
 #endif  /* _TEST_H */
Index: /issm/trunk-jpl/src/modules/TriMesh/TriMesh.cpp
===================================================================
--- /issm/trunk-jpl/src/modules/TriMesh/TriMesh.cpp	(revision 13235)
+++ /issm/trunk-jpl/src/modules/TriMesh/TriMesh.cpp	(revision 13236)
@@ -5,4 +5,13 @@
 #include "./TriMesh.h"
 
+void TriMeshUsage(void){/*{{{*/
+	_printLine_("");
+	_printLine_("   usage: [index,x,y,segments,segmentmarkers]=TriMesh(domainoutlinefilename,rifts,area) ");
+	_printLine_("      where: index,x,y defines a triangulation, segments is an array made ");
+	_printLine_("      of exterior segments to the mesh domain outline, segmentmarkers is an array flagging each segment, ");
+	_printLine_("      outlinefilename an Argus domain outline file, ");
+	_printLine_("      area is the maximum area desired for any element of the resulting mesh, ");
+	_printLine_("");
+}/*}}}*/
 WRAPPER(TriMesh){
 	
@@ -60,14 +69,2 @@
 	MODULEEND();
 }
-
-void TriMeshUsage(void) //{{{1
-{
-	_printLine_("");
-	_printLine_("   usage: [index,x,y,segments,segmentmarkers]=TriMesh(domainoutlinefilename,rifts,area) ");
-	_printLine_("      where: index,x,y defines a triangulation, segments is an array made ");
-	_printLine_("      of exterior segments to the mesh domain outline, segmentmarkers is an array flagging each segment, ");
-	_printLine_("      outlinefilename an Argus domain outline file, ");
-	_printLine_("      area is the maximum area desired for any element of the resulting mesh, ");
-	_printLine_("");
-}
-//}}}
Index: /issm/trunk-jpl/src/modules/TriMesh/TriMesh.h
===================================================================
--- /issm/trunk-jpl/src/modules/TriMesh/TriMesh.h	(revision 13235)
+++ /issm/trunk-jpl/src/modules/TriMesh/TriMesh.h	(revision 13236)
@@ -63,6 +63,3 @@
 #define NRHS  3
 
-/* local prototypes: */
-void TriMeshUsage(void);
-
 #endif  /* _TRIMESH_H */
Index: /issm/trunk-jpl/src/modules/TriMeshProcessRifts/TriMeshProcessRifts.cpp
===================================================================
--- /issm/trunk-jpl/src/modules/TriMeshProcessRifts/TriMeshProcessRifts.cpp	(revision 13235)
+++ /issm/trunk-jpl/src/modules/TriMeshProcessRifts/TriMeshProcessRifts.cpp	(revision 13236)
@@ -5,5 +5,11 @@
 #include "./TriMeshProcessRifts.h"
 
-void mexFunction(	int nlhs, mxArray* plhs[], int nrhs, const mxArray* prhs[] ){
+void TriMeshProcessRiftsUsage(void){/*{{{*/
+	_printLine_("");
+	_printLine_("   usage: [index2,x2,y2,segments2,segmentmarkers2,rifts2]=TriMeshProcessrifts(index1,x1,y1,segments1,segmentmarkers1) ");
+	_printLine_("      where: (index1,x1,y1,segments1,segmentmarkers1) is an initial triangulation.");
+	_printLine_("      index2,x2,y2,segments2,segmentmarkers2,rifts2 is the resulting triangulation where rifts have been processed.");
+}/*}}}*/
+WRAPPER(TriMeshProcessRifts){
 
 	/*Matlab arrays: */
@@ -245,9 +251,2 @@
 	return;
 }
-
-void TriMeshProcessRiftsUsage(void){
-	_printLine_("");
-	_printLine_("   usage: [index2,x2,y2,segments2,segmentmarkers2,rifts2]=TriMeshProcessrifts(index1,x1,y1,segments1,segmentmarkers1) ");
-	_printLine_("      where: (index1,x1,y1,segments1,segmentmarkers1) is an initial triangulation.");
-	_printLine_("      index2,x2,y2,segments2,segmentmarkers2,rifts2 is the resulting triangulation where rifts have been processed.");
-}
Index: /issm/trunk-jpl/src/modules/TriMeshProcessRifts/TriMeshProcessRifts.h
===================================================================
--- /issm/trunk-jpl/src/modules/TriMeshProcessRifts/TriMeshProcessRifts.h	(revision 13235)
+++ /issm/trunk-jpl/src/modules/TriMeshProcessRifts/TriMeshProcessRifts.h	(revision 13236)
@@ -9,5 +9,4 @@
 #include "triangle.h"
 #include "string.h"
-
 #include "../../c/include/globals.h"
 #include "../../c/modules/modules.h"
@@ -17,5 +16,4 @@
 #include "../../c/EnumDefinitions/EnumDefinitions.h"
 
-void TriMeshProcessRiftsUsage(void);
 #undef __FUNCT__ 
 #define __FUNCT__ "TriMeshProcessRifts"
Index: /issm/trunk-jpl/src/modules/TriaSearch/TriaSearch.cpp
===================================================================
--- /issm/trunk-jpl/src/modules/TriaSearch/TriaSearch.cpp	(revision 13235)
+++ /issm/trunk-jpl/src/modules/TriaSearch/TriaSearch.cpp	(revision 13236)
@@ -4,5 +4,15 @@
 #include "./TriaSearch.h"
 
-void mexFunction( int nlhs, mxArray* plhs[], int nrhs, const mxArray* prhs[]){
+void TriaSearchUsage(void){/*{{{*/
+	_pprintLine_("TriaSearch- find triangle holding a point (x0,y0) in a mesh");
+	_pprintLine_("");
+	_pprintLine_("   Usage:");
+	_pprintLine_("         tria=TriaSearch(index,x,y,x0,y0);");
+	_pprintLine_("      index,x,y: mesh triangulatrion");
+	_pprintLine_("      x0,y0: coordinates of the point for which we are trying to find a triangle");
+	_pprintLine_("      x0,y0 can be an array of points");
+	_pprintLine_("");
+}/*}}}*/
+WRAPPER(TriaSearch){
 
 	int i;
@@ -49,13 +59,2 @@
 	MODULEEND();
 }
-
-void TriaSearchUsage(void){
-	_pprintLine_("TriaSearch- find triangle holding a point (x0,y0) in a mesh");
-	_pprintLine_("");
-	_pprintLine_("   Usage:");
-	_pprintLine_("         tria=TriaSearch(index,x,y,x0,y0);");
-	_pprintLine_("      index,x,y: mesh triangulatrion");
-	_pprintLine_("      x0,y0: coordinates of the point for which we are trying to find a triangle");
-	_pprintLine_("      x0,y0 can be an array of points");
-	_pprintLine_("");
-}
Index: /issm/trunk-jpl/src/modules/TriaSearch/TriaSearch.h
===================================================================
--- /issm/trunk-jpl/src/modules/TriaSearch/TriaSearch.h	(revision 13235)
+++ /issm/trunk-jpl/src/modules/TriaSearch/TriaSearch.h	(revision 13236)
@@ -15,7 +15,4 @@
 #define PY_ARRAY_UNIQUE_SYMBOL PythonIOSymbol
 #endif
-
-/* local prototypes: */
-void TriaSearchUsage(void);
 
 #include "../../c/include/globals.h"
Index: /issm/trunk-jpl/src/modules/Xy2ll/Xy2ll.cpp
===================================================================
--- /issm/trunk-jpl/src/modules/Xy2ll/Xy2ll.cpp	(revision 13235)
+++ /issm/trunk-jpl/src/modules/Xy2ll/Xy2ll.cpp	(revision 13236)
@@ -4,5 +4,29 @@
 #include "./Xy2ll.h"
 
-void mexFunction( int nlhs, mxArray* plhs[], int nrhs, const mxArray* prhs[]){
+void Xy2llUsage(void){/*{{{*/
+	_pprintLine_("Xy2ll - x/y to lat/long coordinate transformation module:");
+	_pprintLine_("");
+	_pprintLine_("   This module transforms x/y to lat/long coordinates.");
+	_pprintLine_("");
+	_pprintLine_("   Usage:");
+	_pprintLine_("      [lat,lon]=Xy2ll(x,y,sgn,'param name',param,...);");
+	_pprintLine_("");
+	_pprintLine_("      x           x coordinates (double vector)");
+	_pprintLine_("      y           y coordinates (double vector)");
+	_pprintLine_("      sgn         sign for hemisphere (double, +1 (north) or -1 (south))");
+	_pprintLine_("");
+	_pprintLine_("      central_meridian     central meridian (double, optional, but must specify with sp)");
+	_pprintLine_("      standard_parallel    standard parallel (double, optional, but must specify with cm)");
+	_pprintLine_("");
+	_pprintLine_("      lat         latitude coordinates (double vector)");
+	_pprintLine_("      lon         longitude coordinates (double vector)");
+	_pprintLine_("");
+	_pprintLine_("   Examples:");
+	_pprintLine_("      [lat,lon]=Xy2ll(x,y, 1);");
+	_pprintLine_("      [lat,lon]=Xy2ll(x,y, 1,'central_meridian',45,'standard_parallel',70);");
+	_pprintLine_("      [lat,lon]=Xy2ll(x,y,-1,'central_meridian', 0,'standard_parallel',71);");
+	_pprintLine_("");
+}/*}}}*/
+WRAPPER(Xy2ll){
 
 	int i,verbose=1;
@@ -71,28 +95,2 @@
 	MODULEEND();
 }
-
-void Xy2llUsage(void){
-	_pprintLine_("Xy2ll - x/y to lat/long coordinate transformation module:");
-	_pprintLine_("");
-	_pprintLine_("   This module transforms x/y to lat/long coordinates.");
-	_pprintLine_("");
-	_pprintLine_("   Usage:");
-	_pprintLine_("      [lat,lon]=Xy2ll(x,y,sgn,'param name',param,...);");
-	_pprintLine_("");
-	_pprintLine_("      x           x coordinates (double vector)");
-	_pprintLine_("      y           y coordinates (double vector)");
-	_pprintLine_("      sgn         sign for hemisphere (double, +1 (north) or -1 (south))");
-	_pprintLine_("");
-	_pprintLine_("      central_meridian     central meridian (double, optional, but must specify with sp)");
-	_pprintLine_("      standard_parallel    standard parallel (double, optional, but must specify with cm)");
-	_pprintLine_("");
-	_pprintLine_("      lat         latitude coordinates (double vector)");
-	_pprintLine_("      lon         longitude coordinates (double vector)");
-	_pprintLine_("");
-	_pprintLine_("   Examples:");
-	_pprintLine_("      [lat,lon]=Xy2ll(x,y, 1);");
-	_pprintLine_("      [lat,lon]=Xy2ll(x,y, 1,'central_meridian',45,'standard_parallel',70);");
-	_pprintLine_("      [lat,lon]=Xy2ll(x,y,-1,'central_meridian', 0,'standard_parallel',71);");
-	_pprintLine_("");
-}
-
Index: /issm/trunk-jpl/src/modules/Xy2ll/Xy2ll.h
===================================================================
--- /issm/trunk-jpl/src/modules/Xy2ll/Xy2ll.h	(revision 13235)
+++ /issm/trunk-jpl/src/modules/Xy2ll/Xy2ll.h	(revision 13236)
@@ -16,7 +16,4 @@
 #define PY_ARRAY_UNIQUE_SYMBOL PythonIOSymbol
 #endif
-
-/* local prototypes: */
-void Xy2llUsage(void);
 
 #include "../../c/include/globals.h"
