Imported Upstream version 3.3.3
[debian/amanda] / client-src / calcsize.c
index f14fd17743bb819b0e9211582448cd5ff5b5dfc7..08e8d053c14c74355da4c84545eca56cc6972e42 100644 (file)
@@ -1,6 +1,7 @@
 /*
  * Amanda, The Advanced Maryland Automatic Network Disk Archiver
  * Copyright (c) 1991-1998 University of Maryland at College Park
+ * Copyright (c) 2007-2012 Zmanda, Inc.  All Rights Reserved.
  * All Rights Reserved.
  *
  * Permission to use, copy, modify, distribute, and sell this software and its
@@ -35,7 +36,7 @@
 #include "match.h"
 #include "conffile.h"
 #include "fsusage.h"
-#include "sl.h"
+#include "am_sl.h"
 #include "util.h"
 
 #define ROUND(n,x)     ((x) + (n) - 1 - (((x) + (n) - 1) % (n)))
@@ -108,12 +109,12 @@ void add_file_name_unknown(int, char *);
 void add_file_unknown(int, struct stat *);
 off_t final_size_unknown(int, char *);
 
-sl_t *calc_load_file(char *filename);
+am_sl_t *calc_load_file(char *filename);
 int calc_check_exclude(char *filename);
 
 int use_star_excl = 0;
 int use_gtar_excl = 0;
-sl_t *include_sl=NULL, *exclude_sl=NULL;
+am_sl_t *include_sl=NULL, *exclude_sl=NULL;
 
 int
 main(
@@ -171,6 +172,11 @@ main(
     char *amname=NULL, *qamname=NULL;
     char *filename=NULL, *qfilename = NULL;
 
+    if (argc > 1 && argv && argv[1] && g_str_equal(argv[1], "--version")) {
+       printf("calcsize-%s\n", VERSION);
+       return (0);
+    }
+
     safe_fd(-1, 0);
     safe_cd();
 
@@ -677,13 +683,13 @@ final_size_unknown(
 /*
  * =========================================================================
  */
-sl_t *
+am_sl_t *
 calc_load_file(
     char *     filename)
 {
     char pattern[1025];
 
-    sl_t *sl_list;
+    am_sl_t *sl_list;
 
     FILE *file = fopen(filename, "r");