Actual source code: dlregispetsc.c

  1: /*$Id: dlregispetsc.c,v 1.14 2001/03/23 23:20:05 balay Exp $*/

  3: #include "petsc.h"

  5: 
  6: EXTERN_C_BEGIN
  7: /*
  8:   PetscDLLibraryRegister - This function is called when the dynamic library it is in is opened.

 10:   This one registers all the draw and PetscViewer objects.

 12:   Input Parameter:
 13:   path - library path
 14:  */
 15: int PetscDLLibraryRegister(char *path)
 16: {

 19:   PetscInitializeNoArguments(); if (ierr) return 1;

 21:   /* this follows the Initialize() to make sure PETSc was setup first */
 23:   /*
 24:       If we got here then PETSc was properly loaded
 25:   */
 26:   PetscDrawRegisterAll(path);
 27:   PetscViewerRegisterAll(path);
 28:   return(0);
 29: }
 30: EXTERN_C_END

 32: /* --------------------------------------------------------------------------*/
 33: static char *contents = "PETSc Graphics and PetscViewer libraries. n
 34:      ASCII, Binary, Sockets, X-windows, ...n";

 36: #include "src/sys/src/utils/dlregis.h"

 38: #if !defined(PETSC_USE_DYNAMIC_LIBRARIES)
 39: int PetscDLLibraryRegister_Petsc(char *path)
 40: {

 44:   PetscDrawRegisterAll(path);
 45:   PetscViewerRegisterAll(path);
 46:   return(0);
 47: }
 48: #endif