summaryrefslogtreecommitdiffstats
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/gen-doc.c18
1 files changed, 11 insertions, 7 deletions
diff --git a/tools/gen-doc.c b/tools/gen-doc.c
index d9b6b41..86d6ff9 100644
--- a/tools/gen-doc.c
+++ b/tools/gen-doc.c
@@ -124,25 +124,29 @@ int main(int argc, char *argv[])
{
UcaPluginManager *manager;
UcaCamera *camera;
+ gchar *name;
GError *error = NULL;
g_type_init();
+ manager = uca_plugin_manager_new ();
if (argc < 2) {
- print_usage();
- return 1;
+ name = g_strdup ("Basic camera");
+ camera = g_object_new (UCA_TYPE_CAMERA, NULL);
+ }
+ else {
+ name = argv[1];
+ camera = uca_plugin_manager_new_camera (manager, name, &error);
}
-
- manager = uca_plugin_manager_new ();
- camera = uca_plugin_manager_new_camera (manager, argv[1], &error);
if (camera == NULL) {
g_print("Error during initialization: %s\n", error->message);
+ print_usage();
return 1;
}
- g_print (html_header, argv[1]);
- g_print ("<div id=\"header\"><h1 class=\"title\">Property documentation of %s</h1>", argv[1]);
+ g_print (html_header, name);
+ g_print ("<div id=\"header\"><h1 class=\"title\">Property documentation of %s</h1>", name);
print_properties (camera);
g_print ("%s\n", html_footer);