]> git.sur5r.net Git - bacula/bacula/commitdiff
- Move Python variables from Job to Bacula. They are
authorKern Sibbald <kern@sibbald.com>
Mon, 18 Jul 2005 11:49:31 +0000 (11:49 +0000)
committerKern Sibbald <kern@sibbald.com>
Mon, 18 Jul 2005 11:49:31 +0000 (11:49 +0000)
  DirName, Version, ConfigFile, and WorkingDir
- Fix delete of bootstrap to only occur on Bacula created
  filenames.
- Allow cancelling a Job name that is not active. It is
  sent to the daemons.

git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@2210 91ce42f0-d328-0410-95d8-f526ca767f89

15 files changed:
bacula/examples/python/DirStartUp.py
bacula/kernstodo
bacula/kes-1.37
bacula/src/dird/fd_cmds.c
bacula/src/dird/job.c
bacula/src/dird/protos.h
bacula/src/dird/pythondir.c
bacula/src/dird/ua_cmds.c
bacula/src/filed/filed.c
bacula/src/lib/pythonlib.c
bacula/src/tools/bsmtp.c
bacula/src/tools/dbcheck.c
bacula/src/tools/fstype.c
bacula/src/tools/testfind.c
bacula/src/version.h

index e364f7b8ee81c584b72c7d4357417d731bc19cc8..00cedc1b05ea9eed9c3c981cb040b27cb329573a 100644 (file)
@@ -54,6 +54,7 @@ class JobEvents:
      if (job.JobId < 2):
         startid = job.run("run kernsave")
         job.JobReport = "Python started new Job: jobid=%d\n" % startid
+     print "name=%s version=%s conf=%s working=%s" % (bacula.Name, bacula.Version, bacula.ConfigFile, bacula.WorkingDir)
 
   def JobRun(self, job):
      noop = 1
@@ -82,7 +83,6 @@ class JobEvents:
      self.fd = open('m.py', 'rb')
      jobid = self.job.JobId
      print "Open: JobId=%d" % jobid
-     print "name=%s" % bacula.name
 
   # Read file data into Bacula memory buffer (mem)
   #  return length read. 0 => EOF, -1 => error
index 67fc9569b6329f65cd3bc94409bdaed5ba185380..514adabb7fa13de6829f22bab3839cd7463044aa 100644 (file)
@@ -1,22 +1,15 @@
                     Kern's ToDo List
-                     15 July 2005
+                     18 July 2005
 
 Major development:      
 Project                     Developer
 =======                     =========                         
-TLS                         Landon Fuller
-Unicode in Win32            Thorsten Engel (done)
-VSS                         Thorsten Engel (in beta testing)
 Version 1.37                Kern (see below)
 ========================================================
 
 Final items for 1.37 before release:
-1. Fix the remaining bugs that I am aware of and new ones that come up 
-    during testing.
+1. Fix bugs
 -  --without-openssl breaks at least on Solaris.
--  bsr-opt-test fails. bsr deleted. Fix.
--  Allow cancel of unknown Job
--  State not saved when closing Win32 FD by icon
 -  Move Python daemon variables from Job to Bacula object.
    WorkingDir, ConfigFile
 
@@ -24,7 +17,7 @@ Final items for 1.37 before release:
 7. Write a bacula-web document
 8. Take one more try at making DVD writing work.
 9. Run the regression scripts on Solaris and FreeBSD
--  Figure out how to package docs and gui programs.
+-  Figure out how to package gui, and rescue programs.
 -  Test TLS.
 
 Document:
@@ -1373,3 +1366,7 @@ Block Position: 0
 - Port limiting -m in iptables to prevent DoS attacks
   could cause broken pipes on Bacula.
 6. Build and test the Volume Shadow Copy (VSS) for Win32. 
+-  Allow cancel of unknown Job
+-  State not saved when closing Win32 FD by icon
+-  bsr-opt-test fails. bsr deleted. Fix.
+
index 05c83d6770d761c99601a8896fe9f5575e07837b..6e7ad8f133fe46b9ae900b8c9bdbb13139bb38b7 100644 (file)
@@ -4,6 +4,13 @@
 General:
 
 Changes to 1.37.31:
+18Jul05
+- Move Python variables from Job to Bacula. They are
+  DirName, Version, ConfigFile, and WorkingDir
+- Fix delete of bootstrap to only occur on Bacula created
+  filenames.
+- Allow cancelling a Job name that is not active. It is
+  sent to the daemons.
 17Jul05
 - Fix name space pollution by OpenSSL 0.9.8 reported by
   Matthias Kurz -- applied his patch.
index 5e813666a965a1d7a216e388e320d64500541e93..c2f55318f7ef5ddc9778db0f28a0cd0434a98067 100644 (file)
@@ -449,7 +449,10 @@ bool send_bootstrap_file(JCR *jcr)
    }
    bnet_sig(fd, BNET_EOD);
    fclose(bs);
-   unlink(jcr->RestoreBootstrap);
+   if (jcr->unlink_bsr) {
+      unlink(jcr->RestoreBootstrap);
+      jcr->unlink_bsr = false;
+   }                         
    if (!response(jcr, fd, OKbootstrap, "Bootstrap", DISPLAY_ERROR)) {
       set_jcr_job_status(jcr, JS_ErrorTerminated);
       return 0;
index 659dd931dbb005ce8928f7905c962969eca3333c..03cbfac60ccb6c2953c669f1f21a214547c91912 100644 (file)
@@ -356,10 +356,10 @@ bail_out:
  * Cancel a job -- typically called by the UA (Console program), but may also
  *              be called by the job watchdog.
  *
- *  Returns: 1 if cancel appears to be successful
- *           0 on failure. Message sent to ua->jcr.
+ *  Returns: true  if cancel appears to be successful
+ *           false on failure. Message sent to ua->jcr.
  */
-int cancel_job(UAContext *ua, JCR *jcr)
+bool cancel_job(UAContext *ua, JCR *jcr)
 {
    BSOCK *sd, *fd;
 
@@ -376,7 +376,7 @@ int cancel_job(UAContext *ua, JCR *jcr)
       bsendmsg(ua, _("JobId %d, Job %s marked to be canceled.\n"),
               jcr->JobId, jcr->Job);
       jobq_remove(&job_queue, jcr); /* attempt to remove it from queue */
-      return 1;
+      return true;
 
    default:
 
@@ -407,7 +407,7 @@ int cancel_job(UAContext *ua, JCR *jcr)
          }
          if (!connect_to_storage_daemon(ua->jcr, 10, SDConnectTimeout, 1)) {
             bsendmsg(ua, _("Failed to connect to Storage daemon.\n"));
-            return 0;
+            return false;
          }
          Dmsg0(200, "Connected to storage daemon\n");
          sd = ua->jcr->store_bsock;
@@ -421,7 +421,7 @@ int cancel_job(UAContext *ua, JCR *jcr)
       }
    }
 
-   return 1;
+   return true;
 }
 
 
index bfe42e9b015f080a3be8008d05d5c4872f7dffd8..0d983686faa5f8de66865e4e4b9a95dd34ab39fc 100644 (file)
@@ -68,7 +68,7 @@ int variable_expansion(JCR *jcr, char *inp, POOLMEM **exp);
 
 /* fd_cmds.c */
 extern int connect_to_file_daemon(JCR *jcr, int retry_interval,
-                                 int max_retry_time, int verbose);
+                                  int max_retry_time, int verbose);
 extern bool send_include_list(JCR *jcr);
 extern bool send_exclude_list(JCR *jcr);
 extern bool send_bootstrap_file(JCR *jcr);
@@ -76,7 +76,7 @@ extern bool send_level_command(JCR *jcr);
 extern int get_attributes_and_put_in_catalog(JCR *jcr);
 extern int get_attributes_and_compare_to_catalog(JCR *jcr, JobId_t JobId);
 extern int put_file_into_catalog(JCR *jcr, long file_index, char *fname,
-                         char *link, char *attr, int stream);
+                          char *link, char *attr, int stream);
 extern void get_level_since_time(JCR *jcr, char *since, int since_len);
 extern int send_run_before_and_after_commands(JCR *jcr);
 
@@ -94,7 +94,7 @@ extern void update_job_end_record(JCR *jcr);
 extern bool get_or_create_client_record(JCR *jcr);
 extern bool get_or_create_fileset_record(JCR *jcr, FILESET_DBR *fsr);
 extern JobId_t run_job(JCR *jcr);
-extern int cancel_job(UAContext *ua, JCR *jcr);
+extern bool cancel_job(UAContext *ua, JCR *jcr);
 extern void init_jcr_job_record(JCR *jcr);
 extern void copy_storage(JCR *new_jcr, JCR *old_jcr);
 extern void set_storage(JCR *jcr, STORE *store);
@@ -110,7 +110,7 @@ extern void mount_request(JCR *jcr, BSOCK *bs, char *buf);
 
 /* msgchan.c */
 extern bool connect_to_storage_daemon(JCR *jcr, int retry_interval,
-                             int max_retry_time, int verbose);
+                              int max_retry_time, int verbose);
 extern int start_storage_daemon_job(JCR *jcr, alist *store, int append);
 extern int start_storage_daemon_message_thread(JCR *jcr);
 extern int bget_dirmsg(BSOCK *bs);
@@ -172,28 +172,28 @@ JCR *new_control_jcr(const char *base_name, int job_type);
 void free_ua_context(UAContext *ua);
 
 /* ua_select.c */
-STORE  *select_storage_resource(UAContext *ua);
-JOB    *select_job_resource(UAContext *ua);
-JOB    *select_restore_job_resource(UAContext *ua);
-CLIENT *select_client_resource(UAContext *ua);
+STORE   *select_storage_resource(UAContext *ua);
+JOB     *select_job_resource(UAContext *ua);
+JOB     *select_restore_job_resource(UAContext *ua);
+CLIENT  *select_client_resource(UAContext *ua);
 FILESET *select_fileset_resource(UAContext *ua);
-int    select_pool_and_media_dbr(UAContext *ua, POOL_DBR *pr, MEDIA_DBR *mr);
-int    select_media_dbr(UAContext *ua, MEDIA_DBR *mr);
-bool   select_pool_dbr(UAContext *ua, POOL_DBR *pr);
-int    select_client_dbr(UAContext *ua, CLIENT_DBR *cr);
-
-void   start_prompt(UAContext *ua, const char *msg);
-void   add_prompt(UAContext *ua, const char *prompt);
-int    do_prompt(UAContext *ua, const char *automsg, const char *msg, char *prompt, int max_prompt);
+int     select_pool_and_media_dbr(UAContext *ua, POOL_DBR *pr, MEDIA_DBR *mr);
+int     select_media_dbr(UAContext *ua, MEDIA_DBR *mr);
+bool    select_pool_dbr(UAContext *ua, POOL_DBR *pr);
+int     select_client_dbr(UAContext *ua, CLIENT_DBR *cr);
+
+void    start_prompt(UAContext *ua, const char *msg);
+void    add_prompt(UAContext *ua, const char *prompt);
+int     do_prompt(UAContext *ua, const char *automsg, const char *msg, char *prompt, int max_prompt);
 CAT    *get_catalog_resource(UAContext *ua);
 STORE  *get_storage_resource(UAContext *ua, int use_default);
-int    get_media_type(UAContext *ua, char *MediaType, int max_media);
-bool   get_pool_dbr(UAContext *ua, POOL_DBR *pr);
-int    get_client_dbr(UAContext *ua, CLIENT_DBR *cr);
+int     get_media_type(UAContext *ua, char *MediaType, int max_media);
+bool    get_pool_dbr(UAContext *ua, POOL_DBR *pr);
+int     get_client_dbr(UAContext *ua, CLIENT_DBR *cr);
 POOL   *get_pool_resource(UAContext *ua);
 POOL   *select_pool_resource(UAContext *ua);
 CLIENT *get_client_resource(UAContext *ua);
-int    get_job_dbr(UAContext *ua, JOB_DBR *jr);
+int     get_job_dbr(UAContext *ua, JOB_DBR *jr);
 
 int find_arg_keyword(UAContext *ua, const char **list);
 int find_arg(UAContext *ua, const char *keyword);
index 25dcac8bd62aeb78d835f160b99c4460e1395a19..64388426b8585a1ca1d5b2abe4f795b215e11582 100644 (file)
@@ -59,7 +59,6 @@ struct s_vars {
 /* Read-only variables */
 static struct s_vars getvars[] = {
    { N_("Job"),        "s"},
-   { N_("DirName"),    "s"},
    { N_("Level"),      "s"},
    { N_("Type"),       "s"},
    { N_("JobId"),      "i"},
@@ -72,9 +71,6 @@ static struct s_vars getvars[] = {
    { N_("JobName"),    "s"},
    { N_("JobStatus"),  "s"},
    { N_("Priority"),   "i"},
-   { N_("Version"),    "(ss)"},
-   { N_("ConfigFile"), "s"},
-   { N_("WorkingDir"), "s"},
    { N_("CatalogRes"), "(sssssis)"},
 
    { NULL,             NULL}
@@ -121,17 +117,15 @@ PyObject *job_getattr(PyObject *self, char *attrname)
    switch (i) {
    case 0:                            /* Job */
       return Py_BuildValue(getvars[i].fmt, jcr->job->hdr.name);
-   case 1:                            /* Director's name */
-      return Py_BuildValue(getvars[i].fmt, my_name);
-   case 2:                            /* level */
+   case 1:                            /* level */
       return Py_BuildValue(getvars[i].fmt, job_level_to_str(jcr->JobLevel));
-   case 3:                            /* type */
+   case 2:                            /* type */
       return Py_BuildValue(getvars[i].fmt, job_type_to_str(jcr->JobType));
-   case 4:                            /* JobId */
+   case 3:                            /* JobId */
       return Py_BuildValue(getvars[i].fmt, jcr->JobId);
-   case 5:                            /* Client */
+   case 4:                            /* Client */
       return Py_BuildValue(getvars[i].fmt, jcr->client->hdr.name);
-   case 6:                            /* NumVols */
+   case 5:                            /* NumVols */
       POOL_DBR pr;
       memset(&pr, 0, sizeof(pr));
       bstrncpy(pr.Name, jcr->pool->hdr.name, sizeof(pr.Name));
@@ -142,29 +136,23 @@ PyObject *job_getattr(PyObject *self, char *attrname)
          bsnprintf(errmsg, sizeof(errmsg), "Pool record not found.");
          goto bail_out;
       }
-   case 7:                            /* Pool */
+   case 6:                            /* Pool */
       return Py_BuildValue(getvars[i].fmt, jcr->pool->hdr.name);
-   case 8:                            /* Storage */
+   case 7:                            /* Storage */
       return Py_BuildValue(getvars[i].fmt, jcr->store->hdr.name);
-   case 9:
+   case 8:
       return Py_BuildValue(getvars[i].fmt, jcr->catalog->hdr.name);
-   case 10:                           /* MediaType */
+   case  9:                           /* MediaType */
       return Py_BuildValue(getvars[i].fmt, jcr->store->media_type);
-   case 11:                           /* JobName */
+   case 10:                           /* JobName */
       return Py_BuildValue(getvars[i].fmt, jcr->Job);
-   case 12:                           /* JobStatus */
+   case 11:                           /* JobStatus */
       buf[1] = 0;
       buf[0] = jcr->JobStatus;
       return Py_BuildValue(getvars[i].fmt, buf);
-   case 13:                           /* Priority */
+   case 12:                           /* Priority */
       return Py_BuildValue(getvars[i].fmt, jcr->JobPriority);
-   case 14:                           /* Version */
-      return Py_BuildValue(getvars[i].fmt, VERSION, BDATE);
-   case 15:                           /* Config Dir */
-      return Py_BuildValue(getvars[i].fmt, configfile);
-   case 16:                           /* Working Dir */
-      return Py_BuildValue(getvars[i].fmt, director->working_directory);
-   case 17:                           /* CatalogRes */
+   case 13:                           /* CatalogRes */
       return Py_BuildValue(getvars[i].fmt,
          jcr->catalog->db_name, jcr->catalog->db_address, 
          jcr->catalog->db_user, jcr->catalog->db_password,
index 00002fc96d074185e0a9e819cf425102b7eb34f3..ba2208487c3eafdf4273571518c893555767e359 100644 (file)
@@ -372,7 +372,7 @@ static int cancel_cmd(UAContext *ua, const char *cmd)
          }
          JobId = str_to_int64(ua->argv[i]);
          if (!(jcr=get_jcr_by_id(JobId))) {
-            bsendmsg(ua, _("JobId %s is not running.\n"),  ua->argv[i]);
+            bsendmsg(ua, _("JobId %s is not running. Use Job name to cancel inactive jobs.\n"),  ua->argv[i]);
             return 1;
          }
          break;
@@ -381,8 +381,9 @@ static int cancel_cmd(UAContext *ua, const char *cmd)
             break;
          }
          if (!(jcr=get_jcr_by_partial_name(ua->argv[i]))) {
-            bsendmsg(ua, _("Job %s is not running.\n"), ua->argv[i]);
-            return 1;
+            bsendmsg(ua, _("Warning Job %s is not running. Continuing anyway ...\n"), ua->argv[i]);
+            jcr = new_jcr(sizeof(JCR), dird_free_jcr);
+            bstrncpy(jcr->Job, ua->argv[i], sizeof(jcr->Job));
          }
          break;
       }
@@ -437,7 +438,6 @@ static int cancel_cmd(UAContext *ua, const char *cmd)
 
    ret = cancel_job(ua, jcr);
    free_jcr(jcr);
-
    return ret;
 }
 
index f0b21b02a9dad68b402c2bccb179a95d7c826cd5..8fdbea30449d8b41f8a928e931f83e879dbcb420 100644 (file)
@@ -49,7 +49,7 @@ const int win32_client = 0;
 
 #define CONFIG_FILE "./bacula-fd.conf" /* default config file */
 
-static char *configfile = NULL;
+char *configfile = NULL;
 static bool foreground = false;
 static bool inetd_request = false;
 static workq_t dir_workq;             /* queue of work from Director */
index 957e0e4bcef35db8ebd871cba8fb48a6d1679f8c..884727193d468434edb77c8af156a98c4b0b337e 100644 (file)
@@ -30,6 +30,8 @@
 #undef _POSIX_C_SOURCE
 #include <Python.h>
 
+extern char *configfile;
+
 /* Imported subroutines */
 //extern PyMethodDef JobMethods[];
 extern PyObject *job_getattr(PyObject *self, char *attrname);
@@ -55,6 +57,7 @@ static PyMethodDef BaculaMethods[] = {
     {NULL, NULL, 0, NULL}             /* last item */
 };
 
+static char my_version[] = VERSION " " BDATE;
 
 /*
  * This is a Bacula Job type as defined in Python. We store a pointer
@@ -97,7 +100,10 @@ void init_python_interpreter(const char *progname, const char *scripts,
    Py_Initialize();
    PyEval_InitThreads();
    bacula_module = Py_InitModule("bacula", BaculaMethods);
-   PyModule_AddStringConstant(bacula_module, "name", my_name);
+   PyModule_AddStringConstant(bacula_module, "Name", my_name);
+   PyModule_AddStringConstant(bacula_module, "Version", my_version);
+   PyModule_AddStringConstant(bacula_module, "ConfigFile", configfile);
+   PyModule_AddStringConstant(bacula_module, "WorkingDir", (char *)working_directory);
    if (!bacula_module) {
       Jmsg0(NULL, M_ERROR_TERM, 0, "Could not initialize Python\n");
    }
index 3fddb610cb6f1c9476b4e21cfef47123e649a0c7..bc83bd4f59ab46a4dee2bc336618c49eb9671239 100644 (file)
@@ -1,23 +1,17 @@
 /*
-   Copyright (C) 2000-2004 Kern Sibbald and John Walker
+   Copyright (C) 2001-2005 Kern Sibbald
 
    This program is free software; you can redistribute it and/or
-   modify it under the terms of the GNU General Public License as
-   published by the Free Software Foundation; either version 2 of
-   the License, or (at your option) any later version.
+   modify it under the terms of the GNU General Public License
+   version 2 as amended with additional clauses defined in the
+   file LICENSE in the main source directory.
 
    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-   General Public License for more details.
-
-   You should have received a copy of the GNU General Public
-   License along with this program; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
-   MA 02111-1307, USA.
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 
+   the file LICENSE for additional details.
 
  */
-
 /*
    Derived from a SMTPclient:
 
index 70cb29f3d7eecb43a68d0d246dbb4acdf8e43068..94e03848e90a4de83f4140b5f564241740247891 100644 (file)
    Copyright (C) 2002-2005 Kern Sibbald
 
    This program is free software; you can redistribute it and/or
-   modify it under the terms of the GNU General Public License as
-   published by the Free Software Foundation; either version 2 of
-   the License, or (at your option) any later version.
+   modify it under the terms of the GNU General Public License
+   version 2 as amended with additional clauses defined in the
+   file LICENSE in the main source directory.
 
    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-   General Public License for more details.
-
-   You should have received a copy of the GNU General Public
-   License along with this program; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
-   MA 02111-1307, USA.
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 
+   the file LICENSE for additional details.
 
  */
 
index c164292453929334c7212f4025fa770d3db36aee..38795b2f4f3f1996b59fb951ac9ce0ffcde501bf 100644 (file)
@@ -6,24 +6,18 @@
  *   Version $Id$
  *
  */
-
 /*
-   Copyright (C) 2004 Kern Sibbald
+   Copyright (C) 2004-2005 Kern Sibbald
 
    This program is free software; you can redistribute it and/or
-   modify it under the terms of the GNU General Public License as
-   published by the Free Software Foundation; either version 2 of
-   the License, or (at your option) any later version.
+   modify it under the terms of the GNU General Public License
+   version 2 as amended with additional clauses defined in the
+   file LICENSE in the main source directory.
 
    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-   General Public License for more details.
-
-   You should have received a copy of the GNU General Public
-   License along with this program; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
-   MA 02111-1307, USA.
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 
+   the file LICENSE for additional details.
 
  */
 
index 18cc25dd714f7e1a98247e763cc8ebe9c4f2c29c..0b676f02f2ea8e81fe7fb1ff97c5ba7d03f6b0e3 100644 (file)
@@ -1,24 +1,18 @@
 /*
  * Test program for find files
  */
-
 /*
-   Copyright (C) 2000-2003 Kern Sibbald and John Walker
+   Copyright (C) 2000-2005 Kern Sibbald
 
    This program is free software; you can redistribute it and/or
-   modify it under the terms of the GNU General Public License as
-   published by the Free Software Foundation; either version 2 of
-   the License, or (at your option) any later version.
+   modify it under the terms of the GNU General Public License
+   version 2 as amended with additional clauses defined in the
+   file LICENSE in the main source directory.
 
    This program is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-   General Public License for more details.
-
-   You should have received a copy of the GNU General Public
-   License along with this program; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place - Suite 330, Boston,
-   MA 02111-1307, USA.
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 
+   the file LICENSE for additional details.
 
  */
 
index cb7cc7e03321285a8d9caa58e2cea84293e0c9c6..2180d613fa0611ec1057e47c3f0794716b380b49 100644 (file)
@@ -1,8 +1,8 @@
 /* */
 #undef  VERSION
 #define VERSION "1.37.31"
-#define BDATE   "17 July 2005"
-#define LSMDATE "17Jul05"
+#define BDATE   "18 July 2005"
+#define LSMDATE "18Jul05"
 
 /* Debug flags */
 #undef  DEBUG