int myargc=0;
float aboutl=0.0;
float abouts;
float aboute;
float aboutxs;
float aboutxe;
float aboutfd;
char gfont[60];/*fontname or filename*/

struct _ARGS {
 char option[3];
 char content[30];
};

typedef struct _ARGS Args;

Args myarg[5]={"-s","0.167","-e","0.91","-x","0.167+0.91","-l","0.00","-d","0.88"};


int is_arg(char *arg){
 int i;



 for( i=0; i < 5; i++){

  if( !strcmp(myarg[i].option,arg) )
   return i;
 }

 return -1;
}

void do_arg(int argc, char *argv[]){
 int i;
 int ret;

 if( argc < 2 || argc > 12 ){
   copyright();
   #ifdef CWPT1
   printf("Usage: cwpt1 fontname [options]\n");
   #else
       printf("Usage: cwpt1u fontname [options]\n");
   #endif
   printf("\tfontname:m, bb, b, f......\n");
   printf("\t   options: -s -e, the same as afm2tfm\n");
   printf("\t    option: -x,   options -s and -e combined, syntax: -x 0.196+0.91\n");
   printf("\t    option: -d, syntax: -d 0.85, cwtex font fd parameter\n");
   printf("\t    option: -l, syntax: -l (-)0.135, \n");
   printf("\t     (lower)raise the font by 0.135 x the height of each character\n");
   exit(1);
  }

  for( i=1; i < argc ; i++){
    if( (ret=is_arg(argv[i])) != -1  ){

      if( argv[i+1][0] == '-' || (i+1) == argc ){

       printf("Warning: the option %s needs an argument! give up....\n", argv[i]);
       exit(1);
      }
      else
       { strcpy(myarg[ret].content,argv[++i]); }
    }
    else{ myargc++; strcpy(gfont,argv[i]);

    }
  }

  if( myargc > 1 ){
    printf("Warning: more than one fontname was specified, giving up...\n");
    exit(1);
  }

}
/*
Args myarg[4]={"-s","0.167","-e","0.91","-x","0.167+0.91","-l","0.00"};
int myargc=0;
float aboutl=0.0;
float abouts;
float aboute;
float aboutx;
*/
void dump_content(){
 int i;


  sscanf(myarg[0].content, "%f", &abouts);
  sscanf(myarg[1].content, "%f", &aboute);
  sscanf(myarg[3].content, "%f", &aboutl);
  sscanf(myarg[4].content, "%f", &aboutfd);
  if(   sscanf(myarg[2].content, "%f+%f", &aboutxs,&aboutxe) != 2 )
   { printf("Warning: unknow spefication about the option -x, giving up....\n"); exit(1);}



}
