/[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 470 by johnpye, Sun Apr 16 15:07:48 2006 UTC revision 471 by ben.allan, Mon Apr 17 03:44:25 2006 UTC
# Line 26  int addone_calc(struct Slv_Interp *slv_i Line 26  int addone_calc(struct Slv_Interp *slv_i
26    
27  extern int  extern int
28  DLEXPORT extfntest_register(){  DLEXPORT extfntest_register(){
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    
32      ERROR_REPORTER_HERE(ASC_PROG_NOTE,"Initialising EXTFNTEST...\n");      ERROR_REPORTER_HERE(ASC_PROG_NOTE,"Initialising EXTFNTEST...\n");
33    
34    /*
35      result += CreateUserFunction("add_one",      result += CreateUserFunction("add_one",
36                    (ExtEvalFunc *)addone_prepare,                    (ExtEvalFunc *)addone_prepare,
37                    (ExtEvalFunc **)addone_calc,                    (ExtEvalFunc **)addone_calc,
38                    (ExtEvalFunc **)NULL,                    (ExtEvalFunc **)NULL,
39                    (ExtEvalFunc **)NULL,                    (ExtEvalFunc **)NULL,
40                    1,1,addone_help);                    1,1,addone_help);
41    */
42        result += CreateUserFunctionBlackBox(
43                "add_one",
44                addone_prepare,
45                addone_calc,
46                (ExtBBoxFunc*)NULL, /* no grad */
47                (ExtBBoxFunc*)NULL, /* no hess */
48                (ExtBBoxFunc*)NULL, /* no final */
49                1,1,addone_help);
50    
51    
52      ERROR_REPORTER_HERE(ASC_PROG_NOTE,"CreateUserFunction result = %d\n",result);      ERROR_REPORTER_HERE(ASC_PROG_NOTE,"CreateUserFunction result = %d\n",result);
53      return result;      return result;

Legend:
Removed from v.470  
changed lines
  Added in v.471

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