/[ascend]/trunk/models/johnpye/extfn/extfntest.c
ViewVC logotype

Diff of /trunk/models/johnpye/extfn/extfntest.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 381 by johnpye, Sun Mar 19 23:01:39 2006 UTC revision 466 by johnpye, Sun Apr 16 15:07:48 2006 UTC
# Line 1  Line 1 
1  #include <stdio.h>  #include <stdio.h>
2    
 #define ASC_USE_IMPORTED_ERROR_REPORTER  
3  #include <utilities/error.h>  #include <utilities/error.h>
4    
   
5  #include <utilities/ascConfig.h>  #include <utilities/ascConfig.h>
6    
7  #include <compiler/fractions.h>  #include <compiler/fractions.h>
# Line 27  int addone_calc(struct Slv_Interp *slv_i Line 25  int addone_calc(struct Slv_Interp *slv_i
25  */  */
26    
27  extern int  extern int
28  DLEXPORT extfntest_register(  DLEXPORT extfntest_register(){
     const CreateUserFunction_fptr_t CreateUserFunction_fptr  
     ,const ErrorReporter_fptr_t ErrorReporter_fptr  
 ){  
29      const char *addone_help = "This is a test of the dynamic user packages functionality";      const char *addone_help = "This is a test of the dynamic user packages functionality";
30      int result = 0;      int result = 0;
31    
     extern ErrorReporter_fptr_t g_ErrorReporter_fptr;  
     g_ErrorReporter_fptr = ErrorReporter_fptr;  
   
32      ERROR_REPORTER_HERE(ASC_PROG_NOTE,"Initialising EXTFNTEST...\n");      ERROR_REPORTER_HERE(ASC_PROG_NOTE,"Initialising EXTFNTEST...\n");
33    
34      result += (CreateUserFunction_fptr)("add_one",      result += CreateUserFunction("add_one",
35                    (ExtEvalFunc *)addone_prepare,                    (ExtEvalFunc *)addone_prepare,
36                    (ExtEvalFunc **)addone_calc,                    (ExtEvalFunc **)addone_calc,
37                    (ExtEvalFunc **)NULL,                    (ExtEvalFunc **)NULL,

Legend:
Removed from v.381  
changed lines
  Added in v.466

john.pye@anu.edu.au
ViewVC Help
Powered by ViewVC 1.1.22