diff --git a/docs/api/Makefile.am b/docs/api/Makefile.am index 76d63b256d..baf21123c3 100644 --- a/docs/api/Makefile.am +++ b/docs/api/Makefile.am @@ -34,15 +34,14 @@ OTHER_FILES= \ $(top_srcdir)/tools/doc-generator.xsl \ $(top_srcdir)/introspection/generic-types.xml -GENERATED_FILES = spec.html settings-spec.html +GENERATED_FILES = spec.html settings-spec.xml spec.html: $(XMLS) $(OTHER_FILES) $(XSLTPROC) $(top_srcdir)/tools/doc-generator.xsl $(top_srcdir)/introspection/all.xml > $@ cp $(builddir)/$@ $(builddir)/html/ -settings-spec.html: generate-settings-spec $(top_builddir)/libnm-util/libnm-util.la +settings-spec.xml: generate-settings-spec $(top_builddir)/libnm-util/libnm-util.la $(builddir)/generate-settings-spec $(builddir)/$@ - cp $(builddir)/$@ $(builddir)/html/ all: $(GENERATED_FILES) @@ -63,6 +62,7 @@ MKTMPL_OPTIONS= # Non-autogenerated SGML files to be included in $(DOC_MAIN_SGML_FILE) content_files = \ version.xml \ + settings-spec.xml \ $(NULL) include $(top_srcdir)/gtk-doc.make diff --git a/docs/api/generate-settings-spec.c b/docs/api/generate-settings-spec.c index 5e229c12ff..09dee00a4c 100644 --- a/docs/api/generate-settings-spec.c +++ b/docs/api/generate-settings-spec.c @@ -96,7 +96,6 @@ static TypeNameElement name_map[] = { static void write_one_setting (FILE *f, SettingNewFunc func) { - int w; NMSetting *s; GParamSpec **props, **iter; guint num; @@ -104,13 +103,21 @@ write_one_setting (FILE *f, SettingNewFunc func) s = func (); /* write out section header */ - w = fprintf (f, "

Setting name: '%s'

\n", nm_setting_get_name (s)); + (void) fprintf (f, + "\n" + " %s setting\n" + " \n" + " \n" + " \n" + " Key Name\n" + " Value Type\n" + " Default Value\n" + " Value Description\n" + " \n" + " \n" + " \n", + nm_setting_get_name (s)); - w = fprintf (f, "
\n"); - w = fprintf (f, "\n"); - w = fprintf (f, "\n"); - w = fprintf (f, "\n"); - w = fprintf (f, "\n"); props = g_object_class_list_properties (G_OBJECT_GET_CLASS (G_OBJECT (s)), &num); for (iter = props; iter && *iter; iter++) { const char *key_name, *value_type, *value_desc; @@ -143,17 +150,23 @@ write_one_setting (FILE *f, SettingNewFunc func) g_object_get (G_OBJECT (s), NM_SETTING_NAME, &default_value, NULL); } - w = fprintf (f, "\n"); - w = fprintf (f, "\n", key_name); - w = fprintf (f, "\n", value_type); - w = fprintf (f, "\n", default_value ? default_value : ""); - w = fprintf (f, "\n", value_desc); - w = fprintf (f, "\n"); + (void) fprintf (f, + " \n" + " %s\n" + " %s\n" + " %s\n" + " %s\n" + " \n", + key_name, value_type, default_value ? default_value : "", value_desc); g_free (default_value); } - w = fprintf (f, "
Key NameValue TypeDefault ValueValue Description
%s%s%s%s

\n"); + (void) fprintf (f, + " \n" + " \n" + "\n"); + g_object_unref (s); } @@ -162,7 +175,6 @@ main (int argc, char *argv[]) { GError *error = NULL; FILE *f; - int w; SettingNewFunc *fptr; if (argc != 2) { @@ -183,14 +195,22 @@ main (int argc, char *argv[]) _exit (3); } - w = fprintf (f, "\n\n"); - w = fprintf (f, "NetworkManager " PACKAGE_VERSION " Settings Specification"); - w = fprintf (f, "\n\n"); + (void) fprintf (f, + "\n" + "" + "]>" + "
\n" + " NetworkManager " PACKAGE_VERSION " Settings Specification\n" + " \n"); for (fptr = funcs; fptr && *fptr; fptr++) write_one_setting (f, *fptr); - w = fprintf (f, "\n\n"); + (void) fprintf (f, + " \n" + "
\n"); fclose (f); _exit (0); diff --git a/docs/api/network-manager-docs.xml b/docs/api/network-manager-docs.xml index 92618f01fa..0099f54cb8 100644 --- a/docs/api/network-manager-docs.xml +++ b/docs/api/network-manager-docs.xml @@ -75,7 +75,7 @@ the "Connection". - +