From Xiao Xiangquan:
[obnox/wireshark/wip.git] / fileset.c
index e6b63e9fca5f9de0a63b488d98c0ed47f70aea7f..43243a97c7169bd2c39d79539fae40d1befe96f4 100644 (file)
--- a/fileset.c
+++ b/fileset.c
 
 
 typedef struct _fileset {
-  GList   *entries;
-  char    *dirname;
+    GList   *entries;
+    char    *dirname;
 } fileset;
 
 /* this is the fileset's global data */
-fileset set = { NULL, NULL};
+static fileset set = { NULL, NULL};
 
 
 /* is this a probable file of a file set (does the naming pattern match)? */
@@ -177,7 +177,7 @@ static fileset_entry *
 fileset_add_file(const char *dirname, const char *fname, gboolean current)
 {
     int fh, result;
-    struct stat buf;
+    ws_statb64 buf;
     char *path;
     fileset_entry *entry = NULL;
 
@@ -188,7 +188,7 @@ fileset_add_file(const char *dirname, const char *fname, gboolean current)
     if(fh !=  -1) {
 
         /* Get statistics */
-        result = fstat( fh, &buf );
+        result = ws_fstat64( fh, &buf );
 
         /* Show statistics if they are valid */
         if( result == 0 ) {
@@ -263,8 +263,8 @@ fileset_add_dir(const char *fname)
     if(fileset_filename_match_pattern(fname)) {
         /* yes, go through the files in the directory and check if the file in question is part of the current file set */
         if ((dir = ws_dir_open(dirname->str, 0, NULL)) != NULL) {
-               while ((file = ws_dir_read_name(dir)) != NULL) {
-                   name = ws_dir_get_name(file);
+            while ((file = ws_dir_read_name(dir)) != NULL) {
+                name = ws_dir_get_name(file);
                 if(fileset_filename_match_pattern(name) && fileset_is_file_in_set(name, get_basename(fname))) {
                     fileset_add_file(dirname->str, name, strcmp(name, get_basename(fname))== 0 /* current */);
                 }