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

#include "macro.H"
#include "params.h"

int tag_width=4;
int rob_size=16;

// optimization tricks
// setting a trick-variable to one enables a certain optimization

int trick1=0, trick2=0;

int checkparam(const char *param)
 {
  char *tptr, tempstr[100];

  strcpy(tempstr, param);
  tptr=strchr(tempstr, '=');
  if(tptr!=NULL) 
    *(tptr++)=0;
  else
    tptr=0;

  if(strcasecmp(tempstr, "--tag")==0)
   {
    tag_width=atoi(tptr);
    rob_size=power2(tag_width);
    return FALSE;
   }
  else if(strcasecmp(param, "--trick1")==0)
   {
    trick1=TRUE;
    return FALSE;
   }
  else if(strcasecmp(param, "--trick2")==0)
   {
    trick2=TRUE;
    return FALSE;
   }

  return TRUE;
 }
