column-utils: add space to improve readability.
[metze/wireshark/wip.git] / fileset.c
index 1c1a69fb4f03254433dab039e7cc69c349cdcec5..b1e636c3d5978feae05e050c631e5fc9306ebc51 100644 (file)
--- a/fileset.c
+++ b/fileset.c
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
  */
 
-#include "config.h"
-
-#ifdef HAVE_UNISTD_H
-#include <unistd.h>
-#endif
-
-#ifdef HAVE_FCNTL_H
-#include <fcntl.h>
-#endif
-
-#ifdef HAVE_DIRENT_H
-#include <dirent.h>
-#endif
-
-#ifdef HAVE_SYS_STAT_H
-# include <sys/stat.h>
-#endif
+#include <config.h>
 
 #ifdef HAVE_SYS_WAIT_H
 # include <sys/wait.h>
@@ -44,7 +28,6 @@
 
 #include <stdio.h>
 #include <string.h>
-#include <ctype.h>
 
 #include <glib.h>
 
@@ -109,7 +92,7 @@ fileset_filename_match_pattern(const char *fname)
     while(minlen--) {
         baselen--;
 
-        if(!isdigit( (guchar) filename[baselen])) {
+        if(!g_ascii_isdigit( filename[baselen])) {
             g_free(filename);
             return FALSE;
         }
@@ -271,7 +254,7 @@ void fileset_update_dlg(void *window)
     GList         *le;
 
 
-    /* add all entires to the dialog */
+    /* add all entries to the dialog */
     le = g_list_first(set.entries);
     while(le) {
         fileset_dlg_add_file((fileset_entry *)le->data, window);
@@ -292,8 +275,8 @@ fileset_add_dir(const char *fname, void *window)
 
 
     /* get (convert) directory name, but don't touch the given string */
-    fname_dup = get_dirname(g_strdup(fname));
-    dirname = g_string_new(fname_dup);
+    fname_dup = g_strdup(fname);
+    dirname = g_string_new(get_dirname(fname_dup));
     g_free(fname_dup);
 
     set.dirname = g_strdup(dirname->str);
@@ -344,7 +327,7 @@ fileset_get_current(void)
     fileset_entry *entry;
 
 
-    /* add all entires to the dialog */
+    /* add all entries to the dialog */
     le = g_list_first(set.entries);
     while(le) {
         entry = (fileset_entry *)le->data;
@@ -429,3 +412,16 @@ void fileset_delete(void)
         set.dirname = NULL;
     }
 }
+
+/*
+ * Editor modelines  -  http://www.wireshark.org/tools/modelines.html
+ *
+ * Local variables:
+ * c-basic-offset: 4
+ * tab-width: 8
+ * indent-tabs-mode: nil
+ * End:
+ *
+ * vi: set shiftwidth=4 tabstop=8 expandtab:
+ * :indentSize=4:tabSize=8:noTabs=true:
+ */