/* FarTest.c **************************************************************** * * FarTest ------- Debugging functions for programs which don't * have links to their environment. * * FarPrint demonstration program. * * Author -------- Olaf Barthel of MXM * Brabeckstrasse 35 * D-3000 Hannover 71 * * Federal Republic of Germany. * * This program truly is in the PUBLIC DOMAIN. Written on a sunny * September day in 1989, updated 27 January 1990. * * Compiled using Aztec C 3.6a, CygnusEd Professional 2 & ARexx. * ****************************************************************************/ /* FarPrint.Library base pointer. */ long FarBase; /* main(argc,argv): * * This is meant to be the main demonstration * part for this program. */ void main(argc,argv) long argc; char *argv[]; { char Tempo[81]; long i; if(!(FarBase = OpenLibrary("farprint.library",0))) exit(0); /* Send some dummy text. */ for(i = 0 ; i < 14 ; i++) SendText("%ld",i << i); /* Send the first calling argument to FarPrint. */ /* Request a number and print it. */ printf("%d\n",RequestNumber("FarTest")); /* Request a text and print it. */ printf("%s\n",RequestString("FarTest",Tempo)); CloseLibrary(FarBase); }