]> git.sur5r.net Git - bacula/bacula/blobdiff - bacula/src/lib/sellist.c
Change copyright as per agreement with FSFE
[bacula/bacula] / bacula / src / lib / sellist.c
index e3e2589c87d8a21fc040ea6b8799055f2ab427a3..d8f13908b87e81b8da05cf4b4b8e666e8a78a6a8 100644 (file)
@@ -1,17 +1,20 @@
 /*
-   Bacula® - The Network Backup Solution
+   Bacula(R) - The Network Backup Solution
 
-   Copyright (C) 2011-2014 Free Software Foundation Europe e.V.
+   Copyright (C) 2000-2016 Kern Sibbald
 
-   The main author of Bacula is Kern Sibbald, with contributions from many
-   others, a complete list can be found in the file AUTHORS.
+   The original author of Bacula is Kern Sibbald, with contributions
+   from many others, a complete list can be found in the file AUTHORS.
 
    You may use this file and others of this release according to the
    license defined in the LICENSE file, which includes the Affero General
    Public License, v3.0 ("AGPLv3") and some additional permissions and
    terms pursuant to its AGPLv3 Section 7.
 
-   Bacula® is a registered trademark of Kern Sibbald.
+   This notice must be preserved when any source code is 
+   conveyed and/or propagated.
+
+   Bacula(R) is a registered trademark of Kern Sibbald.
 */
 /*
  *  Kern Sibbald, January  MMXII
@@ -211,7 +214,8 @@ char *sellist::get_expanded_list()
 
 #ifdef TEST_PROGRAM
 
-const char *sin[] = {
+/* Test input string */
+const char *sinp[] = {
    "1,70",
    "1",
    "256",
@@ -227,6 +231,7 @@ const char *sin[] = {
    NULL
 };
 
+/* Scanned output string -- or ERROR if input is illegal */
 const char *sout[] = {
    "1,70",
    "1",
@@ -249,16 +254,16 @@ int main(int argc, char **argv, char **env)
    sellist sl;
    int x;
 
-   for (x=0; sin[x] != NULL; x++) {
-      if (!sl.set_string(sin[x], true)) {
-         printf("ERR: input: %s ERR=%s", sin[x], sl.get_errmsg());
+   for (x=0; sinp[x] != NULL; x++) {
+      if (!sl.set_string(sinp[x], true)) {
+         printf("ERR: input: %s ERR=%s", sinp[x], sl.get_errmsg());
          continue;
       }
       msg = sl.get_expanded_list();
       if (sl.get_errmsg() == NULL && strcmp(msg, sout[x]) == 0) {
-         printf("OK: input: %s output: %s\n", sin[x], msg);
+         printf("OK: input: %s output: %s\n", sinp[x], msg);
       } else {
-         printf("ERR: input: %s gave output: %s ERR=%s\n", sin[x], msg,
+         printf("ERR: input: %s gave output: %s ERR=%s\n", sinp[x], msg,
             sl.get_errmsg());
       }
    }