#include <glib.h>
#include <stdio.h>

int main(int argc, char *argv[]){
  GError *error = NULL; 
  GKeyFile *keyFile;
  int test0;
  int test1;

  if(argc != 2){
    fprintf(stderr, "usage %s file\n", argv[0]);
    return -1;
  }

  keyFile = g_key_file_new (); 
  if(g_key_file_load_from_file(keyFile,
			       argv[1],
			       G_KEY_FILE_NONE,
			       &error) == FALSE){
    return -1;
  }

  test0   = g_key_file_get_integer (keyFile, "plop", "test0", &error);
  g_print("test0 = %d\n", test0);

  test1   = g_key_file_get_integer (keyFile, "plop", "test1", &error);
  g_print("test1 = %d\n", test1);

  return 0;
}
/*
#use this in file (do not remove the space after the first 42
[plop]
test0=42 
test1=42
*/
