[project @ 2006-01-09 14:31:37 by simonmar]
[ghc-hetmet.git] / glafp-utils / lndir / lndir.c
index 6728638..c65715e 100644 (file)
@@ -44,6 +44,7 @@ in this Software without prior written authorization from the X Consortium.
 */
 
 #include "lndir-Xos.h"
+#include <stdlib.h>
 #include <stdio.h>
 #include <sys/stat.h>
 #include <sys/param.h>
@@ -243,6 +244,10 @@ int rel;                   /* if true, prepend "../" to fn before using */
                    continue;
                if (!strcmp (dp->d_name, "CVS"))
                    continue;
+               if (!strcmp (dp->d_name, ".svn"))
+                   continue;
+               if (!strcmp (dp->d_name, "_darcs"))
+                   continue;
                if (!strcmp (dp->d_name, "CVS.adm"))
                    continue;
                ocurdir = rcurdir;
@@ -334,18 +339,17 @@ char **av;
 #endif
 
     while (++av, --ac) {
-       if (strcmp(*av, "-silent") == 0)
-           silent = 1;
-       if (strcmp(*av, "-f") == 0)
-           force = 1;
-       else if (strcmp(*av, "-ignorelinks") == 0)
-           ignore_links = 1;
-       else if (strcmp(*av, "--") == 0) {
-           ++av, --ac;
-           break;
-       }
-       else
-           break;
+      if (strcmp(*av, "-silent") == 0)
+         silent = 1;
+      else if (strcmp(*av, "-f") == 0)
+         force = 1;
+      else if (strcmp(*av, "-ignorelinks") == 0)
+         ignore_links = 1;
+      else if (strcmp(*av, "--") == 0) {
+         ++av, --ac;
+         break;
+      } else
+         break;
     }
 
     if (ac < 1 || ac > 2)