]> git.sur5r.net Git - bacula/bacula/commitdiff
Fix Update Volume Slot format error + documentation + termcap detection improvements
authorKern Sibbald <kern@sibbald.com>
Mon, 22 Mar 2004 20:14:57 +0000 (20:14 +0000)
committerKern Sibbald <kern@sibbald.com>
Mon, 22 Mar 2004 20:14:57 +0000 (20:14 +0000)
git-svn-id: https://bacula.svn.sourceforge.net/svnroot/bacula/trunk@1145 91ce42f0-d328-0410-95d8-f526ca767f89

bacula/autoconf/config.h.in
bacula/autoconf/configure.in
bacula/configure
bacula/src/console/conio.c
bacula/src/dird/ua_cmds.c
bacula/src/version.h

index c645b3b2f8c8502afa3e26f34f02b201e44bfbc2..58ddd8e8bfb7178372600b16b941b4dd48a09c53 100644 (file)
 /* Define to 1 if you have the `tcgetattr' function. */
 #undef HAVE_TCGETATTR
 
-/* Define to 1 if you have the <termcap.h> header file. */
-#undef HAVE_TERMCAP_H
-
 /* Define to 1 if you have the <termios.h> header file. */
 #undef HAVE_TERMIOS_H
 
index ddf614a4d2fcb5cbe89d2ddca07b3f0c9bf7fa99..96fdfa9e356f02ca6bfe25f6739f255e2c2dca6a 100644 (file)
@@ -313,13 +313,16 @@ AC_ARG_ENABLE(conio,
 
 got_conio="no"
 if test x$support_conio = xyes; then
-   CONS_OBJ="conio.o"
-   CONS_SRC="conio.c"
-   got_conio="yes"
-   AC_CHECK_HEADERS(termcap.h)
-   AC_CHECK_LIB(termcap, tgetent, CONS_LIBS="-ltermcap")
-   support_readline=no
-   AC_DEFINE(HAVE_CONIO, 1, [Set if Bacula conio support enabled]) 
+   AC_CHECK_HEADER(termcap.h, 
+     [ AC_CHECK_LIB(termcap, tgetent, 
+       [ CONS_LIBS="-ltermcap"
+        CONS_OBJ="conio.o"
+        CONS_SRC="conio.c"
+        got_conio="yes"
+        support_readline=no
+        AC_DEFINE(HAVE_CONIO, 1, [Set if Bacula conio support enabled]) 
+       ], [ echo " "; echo "termcap library not found. CONIO turned off ..."; echo " "])
+    ],[echo " "; echo "termcap.h not found. CONIO turned off ..."; echo " "])
 fi
 
 
index 1c5c2d4696298b2d1f9c0505d309f251c9634352..8e657a1530babe27643657b23fceb3433483e418 100755 (executable)
@@ -4844,9 +4844,6 @@ fi;
 
 got_conio="no"
 if test x$support_conio = xyes; then
-   CONS_OBJ="conio.o"
-   CONS_SRC="conio.c"
-   got_conio="yes"
    echo "$as_me:$LINENO: checking for ANSI C header files" >&5
 echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
 if test "${ac_cv_header_stdc+set}" = set; then
@@ -5070,22 +5067,18 @@ fi
 done
 
 
-
-for ac_header in termcap.h
-do
-as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
-  echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
+if test "${ac_cv_header_termcap_h+set}" = set; then
+  echo "$as_me:$LINENO: checking for termcap.h" >&5
+echo $ECHO_N "checking for termcap.h... $ECHO_C" >&6
+if test "${ac_cv_header_termcap_h+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+echo "$as_me:$LINENO: result: $ac_cv_header_termcap_h" >&5
+echo "${ECHO_T}$ac_cv_header_termcap_h" >&6
 else
   # Is the header compilable?
-echo "$as_me:$LINENO: checking $ac_header usability" >&5
-echo $ECHO_N "checking $ac_header usability... $ECHO_C" >&6
+echo "$as_me:$LINENO: checking termcap.h usability" >&5
+echo $ECHO_N "checking termcap.h usability... $ECHO_C" >&6
 cat >conftest.$ac_ext <<_ACEOF
 #line $LINENO "configure"
 /* confdefs.h.  */
@@ -5094,7 +5087,7 @@ cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
 $ac_includes_default
-#include <$ac_header>
+#include <termcap.h>
 _ACEOF
 rm -f conftest.$ac_objext
 if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
@@ -5120,8 +5113,8 @@ echo "$as_me:$LINENO: result: $ac_header_compiler" >&5
 echo "${ECHO_T}$ac_header_compiler" >&6
 
 # Is the header present?
-echo "$as_me:$LINENO: checking $ac_header presence" >&5
-echo $ECHO_N "checking $ac_header presence... $ECHO_C" >&6
+echo "$as_me:$LINENO: checking termcap.h presence" >&5
+echo $ECHO_N "checking termcap.h presence... $ECHO_C" >&6
 cat >conftest.$ac_ext <<_ACEOF
 #line $LINENO "configure"
 /* confdefs.h.  */
@@ -5129,7 +5122,7 @@ _ACEOF
 cat confdefs.h >>conftest.$ac_ext
 cat >>conftest.$ac_ext <<_ACEOF
 /* end confdefs.h.  */
-#include <$ac_header>
+#include <termcap.h>
 _ACEOF
 if { (eval echo "$as_me:$LINENO: \"$ac_cpp conftest.$ac_ext\"") >&5
   (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
@@ -5162,10 +5155,10 @@ echo "${ECHO_T}$ac_header_preproc" >&6
 # So?  What about this header?
 case $ac_header_compiler:$ac_header_preproc in
   yes:no )
-    { echo "$as_me:$LINENO: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&5
-echo "$as_me: WARNING: $ac_header: accepted by the compiler, rejected by the preprocessor!" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: termcap.h: accepted by the compiler, rejected by the preprocessor!" >&5
+echo "$as_me: WARNING: termcap.h: accepted by the compiler, rejected by the preprocessor!" >&2;}
+    { echo "$as_me:$LINENO: WARNING: termcap.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: termcap.h: proceeding with the preprocessor's result" >&2;}
     (
       cat <<\_ASBOX
 ## ------------------------------------ ##
@@ -5176,12 +5169,12 @@ _ASBOX
       sed "s/^/$as_me: WARNING:     /" >&2
     ;;
   no:yes )
-    { echo "$as_me:$LINENO: WARNING: $ac_header: present but cannot be compiled" >&5
-echo "$as_me: WARNING: $ac_header: present but cannot be compiled" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header: check for missing prerequisite headers?" >&5
-echo "$as_me: WARNING: $ac_header: check for missing prerequisite headers?" >&2;}
-    { echo "$as_me:$LINENO: WARNING: $ac_header: proceeding with the preprocessor's result" >&5
-echo "$as_me: WARNING: $ac_header: proceeding with the preprocessor's result" >&2;}
+    { echo "$as_me:$LINENO: WARNING: termcap.h: present but cannot be compiled" >&5
+echo "$as_me: WARNING: termcap.h: present but cannot be compiled" >&2;}
+    { echo "$as_me:$LINENO: WARNING: termcap.h: check for missing prerequisite headers?" >&5
+echo "$as_me: WARNING: termcap.h: check for missing prerequisite headers?" >&2;}
+    { echo "$as_me:$LINENO: WARNING: termcap.h: proceeding with the preprocessor's result" >&5
+echo "$as_me: WARNING: termcap.h: proceeding with the preprocessor's result" >&2;}
     (
       cat <<\_ASBOX
 ## ------------------------------------ ##
@@ -5192,26 +5185,18 @@ _ASBOX
       sed "s/^/$as_me: WARNING:     /" >&2
     ;;
 esac
-echo "$as_me:$LINENO: checking for $ac_header" >&5
-echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
-if eval "test \"\${$as_ac_Header+set}\" = set"; then
+echo "$as_me:$LINENO: checking for termcap.h" >&5
+echo $ECHO_N "checking for termcap.h... $ECHO_C" >&6
+if test "${ac_cv_header_termcap_h+set}" = set; then
   echo $ECHO_N "(cached) $ECHO_C" >&6
 else
-  eval "$as_ac_Header=$ac_header_preproc"
+  ac_cv_header_termcap_h=$ac_header_preproc
 fi
-echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_Header'}'`" >&5
-echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
+echo "$as_me:$LINENO: result: $ac_cv_header_termcap_h" >&5
+echo "${ECHO_T}$ac_cv_header_termcap_h" >&6
 
 fi
-if test `eval echo '${'$as_ac_Header'}'` = yes; then
-  cat >>confdefs.h <<_ACEOF
-#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
-_ACEOF
-
-fi
-
-done
-
+if test $ac_cv_header_termcap_h = yes; then
    echo "$as_me:$LINENO: checking for tgetent in -ltermcap" >&5
 echo $ECHO_N "checking for tgetent in -ltermcap... $ECHO_C" >&6
 if test "${ac_cv_lib_termcap_tgetent+set}" = set; then
@@ -5267,15 +5252,27 @@ fi
 echo "$as_me:$LINENO: result: $ac_cv_lib_termcap_tgetent" >&5
 echo "${ECHO_T}$ac_cv_lib_termcap_tgetent" >&6
 if test $ac_cv_lib_termcap_tgetent = yes; then
-  CONS_LIBS="-ltermcap"
-fi
-
-   support_readline=no
+   CONS_LIBS="-ltermcap"
+        CONS_OBJ="conio.o"
+        CONS_SRC="conio.c"
+        got_conio="yes"
+        support_readline=no
 
 cat >>confdefs.h <<\_ACEOF
 #define HAVE_CONIO 1
 _ACEOF
 
+
+else
+   echo " "; echo "termcap library not found. CONIO turned off ..."; echo " "
+fi
+
+
+else
+  echo " "; echo "termcap.h not found. CONIO turned off ..."; echo " "
+fi
+
+
 fi
 
 
index 88eb1865e50b660c56a283d9bec9db0d55d86bb1..7447ead95e44beaa45364eab00605c762aad0e5a 100755 (executable)
@@ -43,9 +43,8 @@
 
 #endif
 
-#ifdef HAVE_TERMCAP_H
+#include <termios.h>
 #include <termcap.h>
-#endif
 #include "func.h"
 
 
index e9fb8868e72922ed2d02aaceb4f361c942ac962a..18d546bf31ce553a6822c0fe0204c2b574e4efa7 100644 (file)
@@ -987,7 +987,7 @@ static int update_volume(UAContext *ua)
         if (!db_update_media_record(ua->jcr, ua->db, &mr)) {
             bsendmsg(ua, _("Error updating media record Slot: ERR=%s"), db_strerror(ua->db));
         } else {
-            bsendmsg(ua, _("New Slot is: %s\n"), mr.Slot);
+            bsendmsg(ua, _("New Slot is: %d\n"), mr.Slot);
         }
         break;
 
index a1c8b2294395f2a008634c6f31da7b6d7d93a5cd..ec4c04dc9a66cc8ecc26e65921fc302c53e5a699 100644 (file)
@@ -2,8 +2,8 @@
 #undef  VERSION
 #define VERSION "1.33.4"
 #define VSTRING "1"
-#define BDATE   "20 Mar 2004"
-#define LSMDATE "20Mar04"
+#define BDATE   "22 Mar 2004"
+#define LSMDATE "22Mar04"
 
 /* Debug flags */
 #undef  DEBUG