]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/tools/testls.c
Replace explicit checks for "/" with calls to IsPathSeparator, strchr with first_path...
[bacula/bacula] / bacula / src / tools / testls.c
index dafee9c899c15118f9d35dc1b9599038676086bf..54d46fa0f16a965ca316cb5063870567ed370971 100755 (executable)
 #include "bacula.h"
 #include "findlib/find.h"
 
-#if defined(HAVE_CYGWIN) || defined(HAVE_WIN32)
-int win32_client = 1;
-#else
-int win32_client = 0;
-#endif
-
 /* Dummy functions */
 int generate_daemon_event(JCR *jcr, const char *event) { return 1; }
 int generate_job_event(JCR *jcr, const char *event) { return 1; }
@@ -73,6 +67,10 @@ main (int argc, char *const *argv)
    char *exc = NULL;
    FILE *fd;
 
+   setlocale(LC_ALL, "");
+   bindtextdomain("bacula", LOCALEDIR);
+   textdomain("bacula");
+
    while ((ch = getopt(argc, argv, "ad:e:i:?")) != -1) {
       switch (ch) {
       case 'a':                       /* print extended attributes *debug* */
@@ -121,9 +119,9 @@ main (int argc, char *const *argv)
       }
    }
    if (inc) {
-      fd = fopen(inc, "r");
+      fd = fopen(inc, "rb");
       if (!fd) {
-         printf("Could not open include file: %s\n", inc);
+         printf(_("Could not open include file: %s\n"), inc);
          exit(1);
       }
       while (fgets(name, sizeof(name)-1, fd)) {
@@ -134,9 +132,9 @@ main (int argc, char *const *argv)
    }
 
    if (exc) {
-      fd = fopen(exc, "r");
+      fd = fopen(exc, "rb");
       if (!fd) {
-         printf("Could not open exclude file: %s\n", exc);
+         printf(_("Could not open exclude file: %s\n"), exc);
          exit(1);
       }
       while (fgets(name, sizeof(name)-1, fd)) {