Annotation of freem/examples/libfreem/freem_function/freem_function.c, revision 1.1.1.1

1.1       snw         1: /*
                      2: * @Author: John P. Willis
                      3: * @Date:   2020-04-03 15:59:49
                      4: * @Last Modified by:   John P. Willis
                      5: * @Last Modified time: 2020-04-03 16:23:44
                      6: */
                      7: 
                      8: 
                      9: #include <stdio.h>
                     10: #include <string.h>
                     11: #include <freem.h>
                     12: 
                     13: int main(int argc, char **argv, char **envp)
                     14: {
                     15:     freem_ent_t ent;
                     16:     
                     17:     /* equivalent to $$ADDTWO^%ZFRMSAMP(2,2) */
                     18: 
                     19:     sprintf (ent.name, "ADDTWO^%%ZFRMSAMP");
                     20:     sprintf (ent.arguments[0], "2");
                     21:     sprintf (ent.arguments[1], "2");
                     22: 
                     23:     ent.argument_count = 2;
                     24: 
                     25:     freem_init ("USER");
                     26:     freem_function (&ent);
                     27: 
                     28:     printf ("Return value from $$%s(2,2) is '%s'\n", ent.name, ent.value);
                     29: 
                     30: }

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>