Commits

Satish Balay committed 6444bdc

AutoCheckin

Comments (0)

Files changed (7)

src/fortran/custom/zdraw.c

-/*$Id: zdraw.c,v 1.35 1999/11/24 21:55:52 bsmith Exp bsmith $*/
+/*$Id: zdraw.c,v 1.36 2000/01/11 21:03:48 bsmith Exp balay $*/
 
 #include "src/fortran/custom/zpetsc.h"
 
 
 EXTERN_C_BEGIN
 
-static void (*f1)(Draw *,void *,int *);
+static void (PETSC_STDCALL *f1)(Draw *,void *,int *);
 static int ourdrawzoom(Draw draw,void *ctx)
 {
   int ierr = 0;
   return 0;
 }
 
-void PETSC_STDCALL drawzoom_(Draw *draw,void (*f)(Draw *,void *,int *),void *ctx,int *ierr)
+void PETSC_STDCALL drawzoom_(Draw *draw,void (PETSC_STDCALL *f)(Draw *,void *,int *),void *ctx,int *ierr)
 {
   f1      = f;
   *ierr = DrawZoom(*draw,ourdrawzoom,ctx);

src/fortran/custom/zksp.c

-/*$Id: zksp.c,v 1.47 2000/09/21 18:45:32 bsmith Exp bsmith $*/
+/*$Id: zksp.c,v 1.48 2000/09/21 18:47:30 bsmith Exp balay $*/
 
 #include "src/fortran/custom/zpetsc.h"
 #include "petscksp.h"
   *ierr = KSPCreate((MPI_Comm)PetscToPointerComm(*comm),ksp);
 }
 
-static void (*f2)(KSP*,int*,double*,KSPConvergedReason*,void*,int*);
+static void (PETSC_STDCALL *f2)(KSP*,int*,double*,KSPConvergedReason*,void*,int*);
 static int ourtest(KSP ksp,int i,double d,KSPConvergedReason *reason,void* ctx)
 {
   int ierr;
   return 0;
 }
 void PETSC_STDCALL kspsetconvergencetest_(KSP *ksp,
-      void (*converge)(KSP*,int*,double*,KSPConvergedReason*,void*,int*),void *cctx,int *ierr)
+      void (PETSC_STDCALL *converge)(KSP*,int*,double*,KSPConvergedReason*,void*,int*),void *cctx,int *ierr)
 {
   if ((void *)converge == (void *)kspdefaultconverged_) {
     *ierr = KSPSetConvergenceTest(*ksp,KSPDefaultConverged,0);
   *ierr = KSPVecViewMonitor(*ksp,*it,*norm,ctx);
 }
 
-static void (*f1)(KSP*,int*,double*,void*,int*);
+static void (PETSC_STDCALL *f1)(KSP*,int*,double*,void*,int*);
 static int ourmonitor(KSP ksp,int i,double d,void* ctx)
 {
   int ierr = 0;
   (*f1)(&ksp,&i,&d,ctx,&ierr);CHKERRQ(ierr);
   return 0;
 }
-static void (*f21)(void*,int*);
+static void (PETSC_STDCALL *f21)(void*,int*);
 static int ourdestroy(void* ctx)
 {
   int ierr = 0;
   return 0;
 }
 
-void PETSC_STDCALL kspsetmonitor_(KSP *ksp,void (*monitor)(KSP*,int*,double*,void*,int*),
-                    void *mctx,void (*monitordestroy)(void *,int *),int *ierr)
+void PETSC_STDCALL kspsetmonitor_(KSP *ksp,void (PETSC_STDCALL *monitor)(KSP*,int*,double*,void*,int*),
+                    void *mctx,void (PETSC_STDCALL *monitordestroy)(void *,int *),int *ierr)
 {
   if ((void*)monitor == (void*)kspdefaultmonitor_) {
     *ierr = KSPSetMonitor(*ksp,KSPDefaultMonitor,0,0);
 #endif
 }
 
-static void (*f109)(KSP*,int*,int*,double*,void*,int*);
+static void (PETSC_STDCALL *f109)(KSP*,int*,int*,double*,void*,int*);
 static int ourmodify(KSP ksp,int i,int i2,double d,void* ctx)
 {
   int ierr = 0;
   return 0;
 }
 
-static void (*f210)(void*,int*);
+static void (PETSC_STDCALL *f210)(void*,int*);
 static int ourmoddestroy(void* ctx)
 {
   int ierr = 0;
   *ierr = KSPFGMRESModifyPCSLES(*ksp,*total_its,*loc_its,*res_norm,dummy);
 }
 
-void PETSC_STDCALL kspfgmressetmodifypc_(KSP *ksp,void (*fcn)(KSP*,int*,int*,double*,void*,int*),void* ctx,void (*d)(void*,int*),int *ierr)
+void PETSC_STDCALL kspfgmressetmodifypc_(KSP *ksp,void (PETSC_STDCALL *fcn)(KSP*,int*,int*,double*,void*,int*),void* ctx,void (PETSC_STDCALL *d)(void*,int*),int *ierr)
 {
   if ((void*)fcn == (void*)kspfgmresmodifypcsles_) {
     *ierr = KSPFGMRESSetModifyPC(*ksp,KSPFGMRESModifyPCSLES,0,0);

src/fortran/custom/zmat.c

-/*$Id: zmat.c,v 1.83 2000/07/25 15:08:46 bsmith Exp bsmith $*/
+/*$Id: zmat.c,v 1.84 2000/08/01 20:58:32 bsmith Exp balay $*/
 
 #include "src/fortran/custom/zpetsc.h"
 #include "petscmat.h"
 static int ourmult(Mat mat,Vec x,Vec y)
 {
   int              ierr = 0;
-  (*(int (*)(Mat*,Vec*,Vec*,int*))(((PetscObject)mat)->fortran_func_pointers[0]))(&mat,&x,&y,&ierr);
+  (*(int (PETSC_STDCALL *)(Mat*,Vec*,Vec*,int*))(((PetscObject)mat)->fortran_func_pointers[0]))(&mat,&x,&y,&ierr);
   return ierr;
 }
 
-void PETSC_STDCALL matshellsetoperation_(Mat *mat,MatOperation *op,int (*f)(Mat*,Vec*,Vec*,int*),int *ierr)
+void PETSC_STDCALL matshellsetoperation_(Mat *mat,MatOperation *op,int (PETSC_STDCALL *f)(Mat*,Vec*,Vec*,int*),int *ierr)
 {
   if (*op == MATOP_MULT) {
     *ierr = MatShellSetOperation(*mat,*op,(void *)ourmult);
    USER CAN HAVE ONLY ONE MatFDColoring in code Because there is no place to hang f7!
 */
 
-static void (*f7)(TS*,double*,Vec*,Vec*,void*,int*);
+static void (PETSC_STDCALL *f7)(TS*,double*,Vec*,Vec*,void*,int*);
 
 static int ourmatfdcoloringfunctionts(TS ts,double t,Vec x,Vec y,void *ctx)
 {
   return ierr;
 }
 
-void PETSC_STDCALL matfdcoloringsetfunctionts_(MatFDColoring *fd,void (*f)(TS*,double*,Vec*,Vec*,void*,int*),
+void PETSC_STDCALL matfdcoloringsetfunctionts_(MatFDColoring *fd,void (PETSC_STDCALL *f)(TS*,double*,Vec*,Vec*,void*,int*),
                                  void *ctx,int *ierr)
 {
   f7 = f;
   *ierr = MatFDColoringSetFunction(*fd,(int (*)(void))ourmatfdcoloringfunctionts,ctx);
 }
 
-static void (*f8)(SNES*,Vec*,Vec*,void*,int*);
+static void (PETSC_STDCALL *f8)(SNES*,Vec*,Vec*,void*,int*);
 
 static int ourmatfdcoloringfunctionsnes(SNES ts,Vec x,Vec y,void *ctx)
 {
 }
 
 
-void PETSC_STDCALL matfdcoloringsetfunctionsnes_(MatFDColoring *fd,void (*f)(SNES*,Vec*,Vec*,void*,int*),
+void PETSC_STDCALL matfdcoloringsetfunctionsnes_(MatFDColoring *fd,void (PETSC_STDCALL *f)(SNES*,Vec*,Vec*,void*,int*),
                                  void *ctx,int *ierr)
 {
   f8 = f;

src/fortran/custom/zpc.c

-/*$Id: zpc.c,v 1.38 2000/05/05 22:26:47 balay Exp bsmith $*/
+/*$Id: zpc.c,v 1.39 2000/08/01 20:58:32 bsmith Exp balay $*/
 
 #include "src/fortran/custom/zpetsc.h"
 #include "petscsles.h"
 }
 
 
-static void (*f1)(void *,Vec*,Vec*,int*);
+static void (PETSC_STDCALL *f1)(void *,Vec*,Vec*,int*);
 static int ourshellapply(void *ctx,Vec x,Vec y)
 {
   int              ierr = 0;
   return 0;
 }
 
-void PETSC_STDCALL pcshellsetapply_(PC *pc,void (*apply)(void*,Vec *,Vec *,int*),void *ptr,
+void PETSC_STDCALL pcshellsetapply_(PC *pc,void (PETSC_STDCALL *apply)(void*,Vec *,Vec *,int*),void *ptr,
                       int *ierr)
 {
   f1 = apply;
   *ierr = PCShellSetApply(*pc,ourshellapply,ptr);
 }
 
-static void (*f9)(void *,int*);
+static void (PETSC_STDCALL *f9)(void *,int*);
 static int ourshellsetup(void *ctx)
 {
   int              ierr = 0;
   return 0;
 }
 
-void PETSC_STDCALL pcshellsetsetup_(PC *pc,void (*setup)(void*,int*),int *ierr)
+void PETSC_STDCALL pcshellsetsetup_(PC *pc,void (PETSC_STDCALL *setup)(void*,int*),int *ierr)
 {
   f9 = setup;
   *ierr = PCShellSetSetUp(*pc,ourshellsetup);
 }
 
 /* -----------------------------------------------------------------*/
-static void (*f2)(void*,Vec*,Vec*,Vec*,int*,int*);
+static void (PETSC_STDCALL *f2)(void*,Vec*,Vec*,Vec*,int*,int*);
 static int ourapplyrichardson(void *ctx,Vec x,Vec y,Vec w,int m)
 {
   int              ierr = 0;
 }
 
 void PETSC_STDCALL pcshellsetapplyrichardson_(PC *pc,
-         void (*apply)(void*,Vec *,Vec *,Vec *,int*,int*),
+         void (PETSC_STDCALL *apply)(void*,Vec *,Vec *,Vec *,int*,int*),
          void *ptr,int *ierr)
 {
   f2 = apply;

src/fortran/custom/zsnes.c

-/*$Id: zsnes.c,v 1.52 2000/09/06 15:37:49 balay Exp balay $*/
+/*$Id: zsnes.c,v 1.53 2000/09/06 23:01:02 balay Exp balay $*/
 
 #include "src/fortran/custom/zpetsc.h"
 #include "petscsnes.h"
   *ierr = SNESVecViewUpdateMonitor(*snes,*its,*fgnorm,dummy);
 }
 
-static void (*f7)(SNES*,int*,double*,void*,int*);
+static void (PETSC_STDCALL *f7)(SNES*,int*,double*,void*,int*);
 static int oursnesmonitor(SNES snes,int i,double d,void*ctx)
 {
   int              ierr = 0;
   (*f7)(&snes,&i,&d,ctx,&ierr);CHKERRQ(ierr);
   return 0;
 }
-static void (*f71)(void*,int*);
+static void (PETSC_STDCALL *f71)(void*,int*);
 static int ourmondestroy(void* ctx)
 {
   int              ierr = 0;
   return 0;
 }
 
-void PETSC_STDCALL snessetmonitor_(SNES *snes,void (*func)(SNES*,int*,double*,void*,int*),
-                    void *mctx,void (*mondestroy)(void *,int *),int *ierr)
+void PETSC_STDCALL snessetmonitor_(SNES *snes,void (PETSC_STDCALL *func)(SNES*,int*,double*,void*,int*),
+                    void *mctx,void (PETSC_STDCALL *mondestroy)(void *,int *),int *ierr)
 {
   if ((void *)func == (void *)snesdefaultmonitor_) {
     *ierr = SNESSetMonitor(*snes,SNESDefaultMonitor,0,0);
   *ierr = SNESNoLineSearchNoNorms(*snes,lsctx,*x,*f,*g,*y,*w,*fnorm,ynorm,gnorm,flag);
 }
 
-void (*f73)(SNES*,void *,Vec*,Vec*,Vec*,Vec*,Vec*,double*,double*,double*,int*,int*);
+void (PETSC_STDCALL *f73)(SNES*,void *,Vec*,Vec*,Vec*,Vec*,Vec*,double*,double*,double*,int*,int*);
 int OurSNESLineSearch(SNES snes,void *ctx,Vec x,Vec f,Vec g,Vec y,Vec w,double fnorm,double*ynorm,double*gnorm,int *flag)
 {
   int ierr = 0;
   return 0;
 }
 
-void PETSC_STDCALL snessetlinesearch_(SNES *snes,void (*f)(SNES*,void *,Vec*,Vec*,Vec*,Vec*,Vec*,double*,double*,double*,int*,int*),void *ctx,int *ierr)
+void PETSC_STDCALL snessetlinesearch_(SNES *snes,void (PETSC_STDCALL *f)(SNES*,void *,Vec*,Vec*,Vec*,Vec*,Vec*,double*,double*,double*,int*,int*),void *ctx,int *ierr)
 {
   if ((void *) f == (void *) snescubiclinesearch_) {
     *ierr = SNESSetLineSearch(*snes,SNESCubicLineSearch,0);
   *ierr = SNESConverged_EQ_LS(*snes,*a,*b,*c,r,ct);
 }
 
-static void (*f8)(SNES*,double*,double*,double*,SNESConvergedReason*,void*,int*);
+static void (PETSC_STDCALL *f8)(SNES*,double*,double*,double*,SNESConvergedReason*,void*,int*);
 static int oursnestest(SNES snes,double a,double d,double c,SNESConvergedReason*reason,void*ctx)
 {
   int              ierr = 0;
 }
 
 void PETSC_STDCALL snessetconvergencetest_(SNES *snes,
-       void (*func)(SNES*,double*,double*,double*,SNESConvergedReason*,void*,int*),
+       void (PETSC_STDCALL *func)(SNES*,double*,double*,double*,SNESConvergedReason*,void*,int*),
        void *cctx,int *ierr)
 {
   if ((void*)func == (void *)snesconverged_eq_ls_){
   *ierr = SNESGetSLES(*snes,sles);
 }
 
-static void (*f6)(SNES *,Vec *,Mat *,Mat *,int*,void*,int*);
+static void (PETSC_STDCALL *f6)(SNES *,Vec *,Mat *,Mat *,int*,void*,int*);
 static int oursneshessianfunction(SNES snes,Vec x,Mat* mat,Mat* pmat,
                                   MatStructure* st,void *ctx)
 {
   return 0;
 }
 
-void PETSC_STDCALL snessethessian_(SNES *snes,Mat *A,Mat *B,void (*func)(SNES*,Vec*,Mat*,Mat*,int*,void*,int*),
+void PETSC_STDCALL snessethessian_(SNES *snes,Mat *A,Mat *B,void (PETSC_STDCALL *func)(SNES*,Vec*,Mat*,Mat*,int*,void*,int*),
                      void *ctx,int *ierr)
 {
   f6 = func;
   *ierr = SNESSetHessian(*snes,*A,*B,oursneshessianfunction,ctx);
 }
 
-static void (*f5)(SNES*,Vec*,Vec *,void*,int*);
+static void (PETSC_STDCALL *f5)(SNES*,Vec*,Vec *,void*,int*);
 static int oursnesgradientfunction(SNES snes,Vec x,Vec d,void *ctx)
 {
   int ierr = 0;
   return 0;
 }
 
-void PETSC_STDCALL snessetgradient_(SNES *snes,Vec *r,void (*func)(SNES*,Vec*,Vec*,void*,int*),void *ctx,int *ierr){
+void PETSC_STDCALL snessetgradient_(SNES *snes,Vec *r,void (PETSC_STDCALL *func)(SNES*,Vec*,Vec*,void*,int*),void *ctx,int *ierr){
   f5 = func;
   *ierr = SNESSetGradient(*snes,*r,oursnesgradientfunction,ctx);
 }
 
-static void (*f4)(SNES*,Vec*,double*,void*,int*);
+static void (PETSC_STDCALL *f4)(SNES*,Vec*,double*,void*,int*);
 static int oursnesminfunction(SNES snes,Vec x,double* d,void *ctx)
 {
   int ierr = 0;
 }
 
 void PETSC_STDCALL snessetminimizationfunction_(SNES *snes,
-          void (*func)(SNES*,Vec*,double*,void*,int*),void *ctx,int *ierr){
+          void (PETSC_STDCALL *func)(SNES*,Vec*,double*,void*,int*),void *ctx,int *ierr){
   f4 = func;
   *ierr = SNESSetMinimizationFunction(*snes,oursnesminfunction,ctx);
 }
 
 /* ---------------------------------------------------------*/
 
-static void (*f2)(SNES*,Vec*,Vec*,void*,int*);
+static void (PETSC_STDCALL *f2)(SNES*,Vec*,Vec*,void*,int*);
 static int oursnesfunction(SNES snes,Vec x,Vec f,void *ctx)
 {
   int ierr = 0;
   (*f2)(&snes,&x,&f,ctx,&ierr);CHKERRQ(ierr);
   return 0;
 }
-void PETSC_STDCALL snessetfunction_(SNES *snes,Vec *r,void (*func)(SNES*,Vec*,Vec*,void*,int*),
+void PETSC_STDCALL snessetfunction_(SNES *snes,Vec *r,void (PETSC_STDCALL *func)(SNES*,Vec*,Vec*,void*,int*),
                       void *ctx,int *ierr){
    f2 = func;
    *ierr = SNESSetFunction(*snes,*r,oursnesfunction,ctx);
 
 /* ---------------------------------------------------------*/
 
-static void (*f11)(SNES*,Vec*,Vec*,void*,int*);
+static void (PETSC_STDCALL *f11)(SNES*,Vec*,Vec*,void*,int*);
 static int ourmatsnesmffunction(SNES snes,Vec x,Vec f,void *ctx)
 {
   int ierr = 0;
   (*f11)(&snes,&x,&f,ctx,&ierr);CHKERRQ(ierr);
   return 0;
 }
-void PETSC_STDCALL matsnesmfsetfunction_(Mat *mat,Vec *r,void (*func)(SNES*,Vec*,Vec*,void*,int*),
+void PETSC_STDCALL matsnesmfsetfunction_(Mat *mat,Vec *r,void (PETSC_STDCALL *func)(SNES*,Vec*,Vec*,void*,int*),
                       void *ctx,int *ierr){
    f11 = func;
    *ierr = MatSNESMFSetFunction(*mat,*r,ourmatsnesmffunction,ctx);
   *ierr = SNESDefaultComputeJacobianColor(*snes,*x,m,p,type,*(MatFDColoring*)ctx);
 }
 
-static void (*f3)(SNES*,Vec*,Mat*,Mat*,MatStructure*,void*,int*);
+static void (PETSC_STDCALL *f3)(SNES*,Vec*,Mat*,Mat*,MatStructure*,void*,int*);
 static int oursnesjacobian(SNES snes,Vec x,Mat* m,Mat* p,MatStructure* type,void*ctx)
 {
   int              ierr = 0;
   return 0;
 }
 
-void PETSC_STDCALL snessetjacobian_(SNES *snes,Mat *A,Mat *B,void (*func)(SNES*,Vec*,Mat*,Mat*,
+void PETSC_STDCALL snessetjacobian_(SNES *snes,Mat *A,Mat *B,void (PETSC_STDCALL *func)(SNES*,Vec*,Mat*,Mat*,
             MatStructure*,void*,int*),void *ctx,int *ierr)
 {
   if ((void*)func == (void*)snesdefaultcomputejacobian_) {

src/fortran/custom/zts.c

-/*$Id: zts.c,v 1.32 2000/05/26 18:15:15 bsmith Exp balay $*/
+/*$Id: zts.c,v 1.33 2000/06/24 03:57:08 balay Exp balay $*/
 
 #include "src/fortran/custom/zpetsc.h"
 #include "petscts.h"
 static int ourtsbcfunction(TS ts,double d,Vec x,void *ctx)
 {
   int ierr = 0;
-  (*(void (*)(TS*,double*,Vec*,void*,int*))(((PetscObject)ts)->fortran_func_pointers[0]))(&ts,&d,&x,ctx,&ierr);
+  (*(void (PETSC_STDCALL *)(TS*,double*,Vec*,void*,int*))(((PetscObject)ts)->fortran_func_pointers[0]))(&ts,&d,&x,ctx,&ierr);
   return 0;
 }
 
-void PETSC_STDCALL tssetrhsboundaryconditions_(TS *ts,int (*f)(TS*,double*,Vec*,void*,int*),void *ctx,int *ierr)
+void PETSC_STDCALL tssetrhsboundaryconditions_(TS *ts,int (PETSC_STDCALL *f)(TS*,double*,Vec*,void*,int*),void *ctx,int *ierr)
 {
   ((PetscObject)*ts)->fortran_func_pointers[0] = (void*)f;
   *ierr = TSSetRHSBoundaryConditions(*ts,ourtsbcfunction,ctx);
 static int ourtsfunction(TS ts,double d,Vec x,Vec f,void *ctx)
 {
   int ierr = 0;
-  (*(void (*)(TS*,double*,Vec*,Vec*,void*,int*))(((PetscObject)ts)->fortran_func_pointers[1]))(&ts,&d,&x,&f,ctx,&ierr);
+  (*(void (PETSC_STDCALL *)(TS*,double*,Vec*,Vec*,void*,int*))(((PetscObject)ts)->fortran_func_pointers[1]))(&ts,&d,&x,&f,ctx,&ierr);
   return 0;
 }
 
-void PETSC_STDCALL tssetrhsfunction_(TS *ts,int (*f)(TS*,double*,Vec*,Vec*,void*,int*),void*fP,int *ierr)
+void PETSC_STDCALL tssetrhsfunction_(TS *ts,int (PETSC_STDCALL *f)(TS*,double*,Vec*,Vec*,void*,int*),void*fP,int *ierr)
 {
   ((PetscObject)*ts)->fortran_func_pointers[1] = (void*)f;
   *ierr = TSSetRHSFunction(*ts,ourtsfunction,fP);
 static int ourtsmatrix(TS ts,double d,Mat* m,Mat* p,MatStructure* type,void*ctx)
 {
   int ierr = 0;
-  (*(void (*)(TS*,double*,Mat*,Mat*,MatStructure*,void*,int*))(((PetscObject)ts)->fortran_func_pointers[2]))(&ts,&d,m,p,type,ctx,&ierr);
+  (*(void (PETSC_STDCALL *)(TS*,double*,Mat*,Mat*,MatStructure*,void*,int*))(((PetscObject)ts)->fortran_func_pointers[2]))(&ts,&d,m,p,type,ctx,&ierr);
   return 0;
 }
 
-void PETSC_STDCALL tssetrhsmatrix_(TS *ts,Mat *A,Mat *B,int (*f)(TS*,double*,Mat*,Mat*,MatStructure*,
+void PETSC_STDCALL tssetrhsmatrix_(TS *ts,Mat *A,Mat *B,int (PETSC_STDCALL *f)(TS*,double*,Mat*,Mat*,MatStructure*,
                                                    void*,int *),void*fP,int *ierr)
 {
   if (FORTRANNULLFUNCTION(f)) {
 static int ourtsjacobian(TS ts,double d,Vec x,Mat* m,Mat* p,MatStructure* type,void*ctx)
 {
   int ierr = 0;
-  (*(void (*)(TS*,double*,Vec*,Mat*,Mat*,MatStructure*,void*,int*))(((PetscObject)ts)->fortran_func_pointers[3]))(&ts,&d,&x,m,p,type,ctx,&ierr);
+  (*(void (PETSC_STDCALL *)(TS*,double*,Vec*,Mat*,Mat*,MatStructure*,void*,int*))(((PetscObject)ts)->fortran_func_pointers[3]))(&ts,&d,&x,m,p,type,ctx,&ierr);
   return 0;
 }
 
-void PETSC_STDCALL tssetrhsjacobian_(TS *ts,Mat *A,Mat *B,void (*f)(TS*,double*,Vec*,Mat*,Mat*,MatStructure*,
+void PETSC_STDCALL tssetrhsjacobian_(TS *ts,Mat *A,Mat *B,void (PETSC_STDCALL *f)(TS*,double*,Vec*,Mat*,Mat*,MatStructure*,
                void*,int*),void*fP,int *ierr)
 {
   if (FORTRANNULLFUNCTION(f)) {
 {
   int        ierr = 0;
   void       *mctx = ((PetscObject)ts)->fortran_func_pointers[6];
-  (*(void (*)(TS*,int*,double*,Vec*,void*,int*))(((PetscObject)ts)->fortran_func_pointers[4]))(&ts,&i,&d,&v,mctx,&ierr);
+  (*(void (PETSC_STDCALL *)(TS*,int*,double*,Vec*,void*,int*))(((PetscObject)ts)->fortran_func_pointers[4]))(&ts,&i,&d,&v,mctx,&ierr);
   return 0;
 }
 
   int         ierr = 0;
   TS          ts = (TS)ctx;
   void        *mctx = ((PetscObject)ts)->fortran_func_pointers[6];
-  (*(void (*)(void*,int*))(((PetscObject)ts)->fortran_func_pointers[5]))(mctx,&ierr);
+  (*(void (PETSC_STDCALL *)(void*,int*))(((PetscObject)ts)->fortran_func_pointers[5]))(mctx,&ierr);
   return 0;
 }
 
-void PETSC_STDCALL tssetmonitor_(TS *ts,void (*func)(TS*,int*,double*,Vec*,void*,int*),void *mctx,void (*d)(void*,int*),int *ierr)
+void PETSC_STDCALL tssetmonitor_(TS *ts,void (PETSC_STDCALL *func)(TS*,int*,double*,Vec*,void*,int*),void *mctx,void (PETSC_STDCALL *d)(void*,int*),int *ierr)
 {
   if ((void*)func == (void*)tsdefaultmonitor_) {
     *ierr = TSSetMonitor(*ts,TSDefaultMonitor,0,0);

src/mat/examples/tests/ex76.c

-/*$Id: ex76.c,v 1.1 2000/09/20 20:15:37 balay Exp hzhang $*/
+/*$Id: ex76.c,v 1.2 2000/09/21 14:05:06 hzhang Exp balay $*/
 
 static char help[] = "Tests vatious sequential routines in MatSBAIJ format. Same as ex74.c except introducing a matrix permutation for factorization and solve.\n";
 
   /* Test MatReordering() */
   ierr = MatGetOrdering(A,MATORDERING_NATURAL,&perm,&iscol);CHKERRA(ierr); 
   ierr = ISDestroy(iscol);CHKERRA(ierr); 
+
   if(reorder){
     /* MatView(sA, VIEWER_STDOUT_SELF); */
     ISGetIndices(perm,&ip_ptr);      
-    i = ip_ptr[1]; ip_ptr[1] = ip_ptr[n-2]; ip_ptr[n-2] = i; 
-    i = ip_ptr[0]; ip_ptr[0] = ip_ptr[n-1]; ip_ptr[n-1] = i;
-    /* i = ip_ptr[2]; ip_ptr[2] = ip_ptr[n-3]; ip_ptr[n-3] = i; */    
+    i = ip_ptr[1]; ip_ptr[1] = ip_ptr[mbs-2]; ip_ptr[mbs-2] = i; 
+    i = ip_ptr[0]; ip_ptr[0] = ip_ptr[mbs-1]; ip_ptr[mbs-1] = i;
+    /* i = ip_ptr[2]; ip_ptr[2] = ip_ptr[mbs-3]; ip_ptr[mbs-3] = i; */    
     ierr= ISRestoreIndices(perm,&ip_ptr);CHKERRA(ierr);    
   }  
   
+
   /* Test MatCholeskyFactor(), MatIncompleteCholeskyFactor() */
   if (bs == 1) {
     for (lf=-1; lf<16; lf += 2){   
     } 
   }
 
-  ierr = ISDestroy(perm);CHKERRA(ierr);
 
+  ierr = ISDestroy(perm);CHKERRA(ierr);
   ierr = MatDestroy(A);CHKERRA(ierr);
   ierr = MatDestroy(sA);CHKERRA(ierr);
   ierr = VecDestroy(x);CHKERRA(ierr);
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.