@c Generator: GNU source-highlight, by Lorenzo Bettini, http://www.gnu.org/software/src-highlite
@smallexample
@r{@i{/*}}@r{@i{ test_conf_parser_ov2.c test }}@r{@i{*/}}

@r{@i{/*}}@r{@i{ test all kinds of options and the conf file parser }}@r{@i{*/}}
@r{@i{/*}}@r{@i{ differently from test_conf_parser_ov.c, first scan the conf file and}}
@r{@i{   then the command line }}@r{@i{*/}}

@b{#include} @t{<stdlib.h>}
@b{#include} @t{<stdio.h>}

@b{#include} @t{"test_conf_parser_cmd.h"}

@b{static} @b{struct} my_args_info args_info;

@b{int}
main (@b{int} argc, @b{char} **argv)
@{  
  @r{@i{/*}}@r{@i{ do not override command line options, initialize args_info }}@r{@i{*/}}
  @b{if} (test_conf_parser_cmd_parser_configfile
      (@t{"./test_conf2.conf"}, &args_info, 0, 1, 0) != 0)
    exit(1);

  @b{if} (test_conf_parser_cmd_parser2 (argc, argv, &args_info, 1, 0, 1) != 0)
    exit(1) ;

  printf (@t{"value of required: %s\n"}, args_info.required_arg);
  printf (@t{"value of string: %s\n"}, args_info.string_arg);
  printf (@t{"value of no-short_given: %d\n"}, args_info.no_short_given);
  printf (@t{"value of int: %d\n"}, args_info.int_arg);
  printf (@t{"value of float: %f\n"}, args_info.float_arg);

  test_conf_parser_cmd_parser_free (&args_info);

  @b{return} 0;
@}

@end smallexample