Index: issm/trunk-jpl/src/wrappers/BamgMesher/BamgMesher.h
===================================================================
--- issm/trunk-jpl/src/wrappers/BamgMesher/BamgMesher.h	(revision 14996)
+++ issm/trunk-jpl/src/wrappers/BamgMesher/BamgMesher.h	(revision 22877)
@@ -45,4 +45,16 @@
 #endif
 
+#ifdef _HAVE_JAVASCRIPT_MODULES_
+/* serial input macros: */
+#define BAMGMESHIN Vertices_mesh_in,VerticesSize_mesh_in,Edges_mesh_in,EdgesSize_mesh_in,Triangles_mesh_in,TrianglesSize_mesh_in,CrackedEdges_mesh_in,CrackedEdgesSize_mesh_in,VerticesOnGeomEdge_mesh_in,VerticesOnGeomEdgeSize_mesh_in,VerticesOnGeomVertex_mesh_in,VerticesOnGeomVertexSize_mesh_in,EdgesOnGeomEdge_mesh_in,EdgesOnGeomEdgeSize_mesh_in,IssmSegments_mesh_in,IssmSegmentsSize_mesh_in
+#define BAMGGEOMIN Vertices_geom_in,VerticesSize_geom_in,Edges_geom_in,EdgesSize_geom_in,Corners_geom_in,CornersSize_geom_in,RequiredVertices_geom_in,RequiredVerticesSize_geom_in,RequiredCrackedEdges_geom_in,RequiredCrackedEdgesSize_geom_in,CrackedEdges_geom_in,CrackedEdgesSize_geom_in,SubDomains_geom_in,SubDomainsSize_geom_in
+#define BAMGOPTIONS pbamgopts,anisomax,cutoff,coeff,errg,gradation,Hessiantype,maxnbv,maxsubdiv,Metrictype,nbjacobi,nbsmooth,omega,power,verbose,Crack,KeepVertices,splitcorners,hmin,hmax,hminVertices,hmaxVertices,hVertices,metric,field,err
+/* serial output macros: */
+#define BAMGMESHOUT Vertices_mesh_out,VerticesSize_mesh_out,Edges_mesh_out,EdgesSize_mesh_out,Triangles_mesh_out,TrianglesSize_mesh_out,CrackedEdges_mesh_out,CrackedEdgesSize_mesh_out,VerticesOnGeomEdge_mesh_out,VerticesOnGeomEdgeSize_mesh_out,VerticesOnGeomVertex_mesh_out,VerticesOnGeomVertexSize_mesh_out,EdgesOnGeomEdge_mesh_out,EdgesOnGeomEdgeSize_mesh_out,IssmSegments_mesh_out,IssmSegmentsSize_mesh_out
+#define BAMGGEOMOUT Vertices_geom_out,VerticesSize_geom_out,Edges_geom_out,EdgesSize_geom_out,Corners_geom_out,CornersSize_geom_out,RequiredVertices_geom_out,RequiredVerticesSize_geom_out,RequiredCrackedEdges_geom_out,RequiredCrackedEdgesSize_geom_out,CrackedEdges_geom_out,CrackedEdgesSize_geom_out,SubDomains_geom_out,SubDomainsSize_geom_out
+#define WRAPPER(modulename) extern "C" { int  BamgMesherModule(double* Vertices_mesh_out, int* VerticesSize_mesh_out, double* Edges_mesh_out, int* EdgesSize_mesh_out, double* Triangles_mesh_out, int* TrianglesSize_mesh_out, double* CrackedEdges_mesh_out, int* CrackedEdgesSize_mesh_out, double* VerticesOnGeomEdge_mesh_out, int* VerticesOnGeomEdgeSize_mesh_out, double* VerticesOnGeomVertex_mesh_out, int* VerticesOnGeomVertexSize_mesh_out, double* EdgesOnGeomEdge_mesh_out, int* EdgesOnGeomEdgeSize_mesh_out, double* IssmSegments_mesh_out, int* IssmSegmentsSize_mesh_out, double* Vertices_geom_out, int* VerticesSize_geom_out, double* Edges_geom_out, int* EdgesSize_geom_out, double* Corners_geom_out, int* CornersSize_geom_out, double* RequiredVertices_geom_out, int* RequiredVerticesSize_geom_out, double* RequiredCrackedEdges_geom_out, int* RequiredCrackedEdgesSize_geom_out, double* CrackedEdges_geom_out, int* CrackedEdgesSize_geom_out, double* SubDomains_geom_out, int* SubDomainsSize_geom_out, double* Vertices_mesh_in, int* VerticesSize_mesh_in, double* Edges_mesh_in, int* EdgesSize_mesh_in, double* Triangles_mesh_in, int* TrianglesSize_mesh_in, double* CrackedEdges_mesh_in, int* CrackedEdgesSize_mesh_in, double* VerticesOnGeomEdge_mesh_in, int* VerticesOnGeomEdgeSize_mesh_in, double* VerticesOnGeomVertex_mesh_in, int* VerticesOnGeomVertexSize_mesh_in, double* EdgesOnGeomEdge_mesh_in, int* EdgesOnGeomEdgeSize_mesh_in, double* IssmSegments_mesh_in, int* IssmSegmentsSize_mesh_in, double* Vertices_geom_in, int* VerticesSize_geom_in, double* Edges_geom_in, int* EdgesSize_geom_in, double* Corners_geom_in, int* CornersSize_geom_in, double* RequiredVertices_geom_in, int* RequiredVerticesSize_geom_in, double* RequiredCrackedEdges_geom_in, int* RequiredCrackedEdgesSize_geom_in, double* CrackedEdges_geom_in, int* CrackedEdgesSize_geom_in, double* SubDomains_geom_in, int* SubDomainsSize_geom_in, double anisomax, double cutoff, double coeff, double errg, double gradation, int Hessiantype, int maxnbv, double maxsubdiv, int Metrictype, int nbjacobi, int nbsmooth, double omega, double power, int verbose, int Crack, int KeepVertices, int splitcorners, double hmin, double hmax, double* hminVertices, double* hmaxVertices, double* hVertices, double* metric, double* field, double err)
+#define _DO_NOT_LOAD_GLOBALS_//we only load globals for TriangleModule.js, not other modules!
+#endif
+
 /* serial arg counts: */
 #undef NLHS
