[Openvas-commits] r2526 - in trunk/openvas-client: . nessus

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Thu Feb 19 10:09:30 CET 2009


Author: felix
Date: 2009-02-19 10:09:27 +0100 (Thu, 19 Feb 2009)
New Revision: 2526

Modified:
   trunk/openvas-client/ChangeLog
   trunk/openvas-client/nessus/preferences.c
Log:
Minor documentation and reformatting of preferences module.

* nessus/preferences.c: Minor documentation and reformatting.


Modified: trunk/openvas-client/ChangeLog
===================================================================
--- trunk/openvas-client/ChangeLog	2009-02-18 22:13:28 UTC (rev 2525)
+++ trunk/openvas-client/ChangeLog	2009-02-19 09:09:27 UTC (rev 2526)
@@ -1,3 +1,9 @@
+2009-02-19  Felix Wolfsteller <felix.wolfsteller at intevation.de>
+
+	Minor documentation and reformatting of preferences module.
+	
+	* nessus/preferences.c: Minor documentation and reformatting.
+
 2009-02-18  Felix Wolfsteller <felix.wolfsteller at intevation.de>
 
 	Added tooltip to timeout spinner in plugin info dialog.
@@ -7,7 +13,7 @@
 
 2009-02-18  Felix Wolfsteller <felix.wolfsteller at intevation.de>
 
-	Reolved compiler warning via gtk cast.
+	Resolved compiler warning via gtk cast.
 	
 	* src/gui/nvt_pref_sshlogin.c (nvt_pref_sshlogin_rebuild_gui): Cast
 	GtkTable to GtkWidget to eliminate compiler warning.

Modified: trunk/openvas-client/nessus/preferences.c
===================================================================
--- trunk/openvas-client/nessus/preferences.c	2009-02-18 22:13:28 UTC (rev 2525)
+++ trunk/openvas-client/nessus/preferences.c	2009-02-19 09:09:27 UTC (rev 2526)
@@ -26,10 +26,13 @@
  * file, but you are not obligated to do so.  If you do not wish to
  * do so, delete this exception statement from your version.
  *
- * Preferences  -- maps the content of the openvasrc file to memory
- *
  */
 
+/**
+ * @file
+ * Maps the content of the openvasrc file to memory.
+ */
+
 #include <includes.h>
 
 #ifdef USE_GTK
@@ -54,8 +57,7 @@
 char * preferences_get_filename(struct context *);
 
 int
-preferences_init(context)
-  struct context *context;
+preferences_init (struct context *context)
 {
   int result;
 
@@ -102,9 +104,7 @@
 }
 
 char *
-preferences_get_altname(context, ext)
-  struct context *context;
-  const char *ext;
+preferences_get_altname (struct context *context, const char *ext)
 {
   char *nessusrc = preferences_get_filename(context);
 
@@ -122,8 +122,7 @@
 }
 
 static int
-preferences_new(context)
-  struct context *context;
+preferences_new (struct context* context)
 {
   FILE *f;
   char *fn = preferences_get_filename(context);
@@ -179,16 +178,13 @@
 }
 
 int
-preferences_process(context)
-  struct context *context;
+preferences_process (struct context *context)
 {
   return preferences_process_filename(context, NULL);
 }
 
 int
-preferences_process_filename(context, filename)
-  struct context *context;
-  char *filename;
+preferences_process_filename (struct context *context, char *filename)
 {
   FILE *fd;
   char *buffer;
@@ -284,10 +280,7 @@
 }
 
 static int
-prefs_add_subcategory(arglist, fd, keep_order)
-  struct arglist *arglist;
-  FILE *fd;
-  int keep_order;
+prefs_add_subcategory (struct arglist *arglist, FILE *fd, int keep_order)
 {
   char *buffer = emalloc(4096);
   int flag = 0;
@@ -330,10 +323,7 @@
 }
 
 static int
-prefs_buffer_parse(buffer, arglist, keep_order)
-  char *buffer;
-  struct arglist *arglist;
-  int keep_order;
+prefs_buffer_parse (char *buffer, struct arglist *arglist, int keep_order)
 {
   char *t;
   char *opt;
@@ -397,9 +387,7 @@
 
 
 static void
-new_pluginset(pluginset, plugins)
-  struct arglist *pluginset;
-  struct nessus_plugin *plugins;
+new_pluginset (struct arglist *pluginset, struct nessus_plugin *plugins)
 {
   while(plugins != NULL )
   {
@@ -412,10 +400,8 @@
 }
 
 struct arglist *
-prefs_get_pluginset(context, name, plugins)
-  struct context *context;
-  char *name;
-  struct nessus_plugin *plugins;
+prefs_get_pluginset (struct context *context, char *name,
+                     struct nessus_plugin *plugins)
 {
   struct arglist *plugin_set = arg_get_value(context->prefs, name);
 
@@ -462,15 +448,13 @@
   return NULL;
 }
 
-/*
- * update arglists "PLUGIN_SET" or "SCANNER_SET"
+/**
+ * Update arglists "PLUGIN_SET" or "SCANNER_SET"
  * from context->plugins or context->scanners
  */
 void
-pluginset_reload(context, name, plugins)
-  struct context *context;
-  char *name;
-  struct nessus_plugin *plugins;
+pluginset_reload (struct context *context, char *name, 
+                  struct nessus_plugin *plugins)
 {
   struct arglist *pluginset;
   struct hash **hash;
@@ -513,8 +497,7 @@
 }
 
 void
-preferences_save(context)
-  struct context *context;
+preferences_save (struct context *context)
 {
   char *filename = preferences_get_filename(context);
 
@@ -595,9 +578,7 @@
 
 
 int
-preferences_generate_new_file(context, name)
-  struct context *context;
-  const char *name;
+preferences_generate_new_file (struct context *context, const char *name)
 {
   struct context *copy_from = context->parent;
 
@@ -648,9 +629,7 @@
 #endif /* USE_GTK */
 
 void *
-prefs_get_default(context, name)
-  struct context *context;
-  const char *name;
+prefs_get_default (struct context *context, const char *name)
 {
   if(!strcmp(name, "name"))
   {
@@ -836,8 +815,8 @@
 }
 
 
-/*
- * get_username : returns the name of the current user
+/**
+ * @return The name of the current user or empty string if none found.
  */
 static char *
 get_username(void)
@@ -862,7 +841,7 @@
 }
 
 char *
-prefs_get_nessushome(void)
+prefs_get_nessushome (void)
 {
   char *home;
   struct passwd *pwd;



More information about the Openvas-commits mailing list