Added errno.h
[idzebra-moved-to-github.git] / index / dir.c
index a13c74c..66d0316 100644 (file)
@@ -4,7 +4,13 @@
  * Sebastian Hammer, Adam Dickmeiss
  *
  * $Log: dir.c,v $
- * Revision 1.7  1995-09-28 09:19:40  adam
+ * Revision 1.9  1995-10-30 13:42:12  adam
+ * Added errno.h
+ *
+ * Revision 1.8  1995/10/10  13:59:23  adam
+ * Function rset_open changed its wflag parameter to general flags.
+ *
+ * Revision 1.7  1995/09/28  09:19:40  adam
  * xfree/xmalloc used everywhere.
  * Extract/retrieve method seems to work for text records.
  *
@@ -33,6 +39,7 @@
 #include <dirent.h>
 #include <sys/stat.h>
 #include <sys/types.h>
+#include <errno.h>
 #include <fcntl.h>
 #include <ctype.h>
 
@@ -43,7 +50,7 @@ struct dir_entry *dir_open (const char *rep)
 {
     DIR *dir;
     struct dirent *dent;
-    size_t entry_max = 50;
+    size_t entry_max = 500;
     size_t idx = 0;
     struct dir_entry *entry;
 
@@ -65,7 +72,7 @@ struct dir_entry *dir_open (const char *rep)
         {
             struct dir_entry *entry_n;
 
-            entry_n = xmalloc (sizeof(*entry) * (entry_max + 400));
+            entry_n = xmalloc (sizeof(*entry) * (entry_max + 1000));
             memcpy (entry_n, entry, idx * sizeof(*entry));
             xfree (entry);
             entry = entry_n;