/*
**      $VER: AssignName 37.2 (20.4.2006)
**
**      Demonstrates usage of AKCC_FPrintf()
**
**      (C) Copyright 1989-2006 Andreas R. Kleinert
**      All Rights Reserved.
*/


#define __USE_SYSBASE

#include <akccplus/akccplus_all.h>

#ifdef __MORPHOS__
#include <clib/akccplus_protos.h>
#include <ppcinline/akccplus.h>
#else
#include <proto/akccplus.h>
#endif

#include <stdlib.h>

#include <proto/exec.h>
#include <proto/dos.h>


struct AKCCPlusBase *AKCCPlusBase = N;

int main(long argc, char **argv)
{
 AKCCPlusBase = (struct AKCCPlusBase *) OpenLibrary("akccplus.library", 37);
 if(AKCCPlusBase)
  {
   char parsed_string[256];
   ULONG fp_args[2];

   AKCC_FPrintf(Output(), "\nFPrintf V37.2, FREEWARE, (c) 1993-2006 by Andreas R. Kleinert.\n", N);

   AKCC_ParseText("\nAll output is done via the \\B\\U%s\\N function"
                  "\ninstead of printf() and is parsed through the"
                  "\n\\B\\U%s\\N function for styling.\n", parsed_string);

   fp_args[0] = (ULONG) "AKCC_FPrintf()";
   fp_args[1] = (ULONG) "AKCC_ParseText()";

   AKCC_FPrintf(Output(), parsed_string, &fp_args[0]);

   CloseLibrary((APTR) AKCCPlusBase);
  }else
  {
   puts("\n Can't open \42akccplus.library\42 V37+ !\n");
  }

 return(0);
}
