/**
 * @file   SFLAMUPC.c
 * @brief  Sample program in c to run the FLAMUP for C
 * @author limes datentechnik gmbh
 **********************************************************************/

#include<stdio.h>
#include<stdlib.h>

#include "FLM4UP.h"

/**
 * This test program takes one parameter from command line to run
 * the FLAM subprogram.
 *
 * @param argc must be 2
 * @param argv contains the string for flamupc
 * @return flucup error
 */
int main(int argc, char** argv)
{
   int i;

   if (argc!=2) {
      fprintf(stderr,"Parameter count (%d) not correct (2) to run this sample program\n",argc);
      fprintf(stderr,"Given parameter:\n");
      for (i=0;i<argc;i++) fprintf(stderr,"--> P%2.2d(%s)\n",i,argv[i]);
      fprintf(stderr,"Required parameter:\n");
      fprintf(stderr,"   :> %s \"flam parameter string\"\n",argv[0]);
      fprintf(stderr,"See FLAM command documentation for more information\n");
      exit(20);
   }
   return(flamupc(argv[1]));
}
