BEGIN {
    print "# Autogenerated by gengetopt.awk"
    print "purpose \"Image Viewer using OpenGL\"";
    print;
}

/^STR / {
    match($0, /^.*"(.*)".*"(.*)".*"(.*)".*"(.*)"/, array);
    printf "option \"%s\" %s \"%s\" string typestr=\"%s\" no\n", $2, $3, array[1], array[2];
}

/^OSTR / {
    match($0, /^.*"(.*)".*"(.*)".*"(.*)".*"(.*)"/, array);
    printf "option \"%s\" %s \"%s\" string typestr=\"%s\" no argoptional\n", $2, $3, array[1], array[2];
}

/^FLAG / {
    match($0, /"(.*)"/, array);
    printf "option \"%s\" %s \"%s\" string typestr=\"on|off\" no argoptional\n", $2, $3, array[1];
}
