#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
#include <string.h>
int main( int argc, char *argv[] )
{ int opt;
  char *optlist ="a:b:f:h";
  int  a = 1, b = 0;
  char *nom = NULL;
  while ( ( opt = getopt( argc, argv , optlist) ) > 0  )
	  switch( opt ){
	  case 'a': a  = atoi( optarg ); break;
	  case 'b': b  = atoi( optarg ); break;
          case 'f': nom = strdup(optarg); break;
	  case 'h': printf("\nhelp:");
	  default : printf("\nusage de %s : %s\n", argv[0], optlist); 
	            exit ( 1 );
	  }
  
  printf("a=%d b=%d f=%s", a, b, nom);
  printf("\n");
  return 0;
}
