/* * Plug-in */ #include /* for fprintf */ #include "vpplug.h" /* * Identifica a esta libreria como plug-in valido */ M_P_EXPORT short VPPLUGIN_MAGIC=VPPLUGIN_MAGIC_VALUE; M_P_EXPORT char *VPPLUGIN_NAME="Plug-in Sample"; /* * Globales */ static int foo; /* * Prototipos locales */ static int not (int i); /* * Punto de entrada principal */ M_P_EXPORT VPFLOAT VPPLUGIN_MAIN(VPFLOAT x, VPFLOAT min, VPFLOAT max) { return ((x-min)*(VPFLOAT)90.0/(max-min)); } /* * Inicializacion * Es llamado en la carga del modulo */ M_P_EXPORT int VPPLUGIN_INIT(void) { foo = not( foo ); fprintf(stderr,"%s: init\n", VPPLUGIN_NAME); return 0; } /* * Eliminacion * Es llamado en la descarga del modulo */ M_P_EXPORT int VPPLUGIN_FLUSH(void) { fprintf(stderr,"%s: flush\n", VPPLUGIN_NAME); return 0; } /* * Funciones locales * Deben ser static */ static int not (int i) { return(!i); }