瀏覽代碼

(tartime): Now extern.
(read_and): Invalid headers cause errors, not warnings.

Paul Eggert 25 年之前
父節點
當前提交
51f0c7c364
共有 1 個文件被更改,包括 3 次插入4 次删除
  1. 3 4
      src/list.c

+ 3 - 4
src/list.c

@@ -35,7 +35,6 @@ union block *current_header;	/* points to current archive header */
 struct stat current_stat;	/* stat struct corresponding */
 struct stat current_stat;	/* stat struct corresponding */
 enum archive_format current_format; /* recognized format */
 enum archive_format current_format; /* recognized format */
 
 
-static char const *tartime PARAMS ((time_t));
 static uintmax_t from_header PARAMS ((const char *, size_t, const char *,
 static uintmax_t from_header PARAMS ((const char *, size_t, const char *,
 				      uintmax_t, uintmax_t));
 				      uintmax_t, uintmax_t));
 
 
@@ -160,12 +159,12 @@ read_and (void (*do_something) ())
 	  switch (prev_status)
 	  switch (prev_status)
 	    {
 	    {
 	    case HEADER_STILL_UNREAD:
 	    case HEADER_STILL_UNREAD:
-	      WARN ((0, 0, _("This does not look like a tar archive")));
+	      ERROR ((0, 0, _("This does not look like a tar archive")));
 	      /* Fall through.  */
 	      /* Fall through.  */
 
 
 	    case HEADER_ZERO_BLOCK:
 	    case HEADER_ZERO_BLOCK:
 	    case HEADER_SUCCESS:
 	    case HEADER_SUCCESS:
-	      WARN ((0, 0, _("Skipping to next header")));
+	      ERROR ((0, 0, _("Skipping to next header")));
 	      break;
 	      break;
 
 
 	    case HEADER_END_OF_FILE:
 	    case HEADER_END_OF_FILE:
@@ -816,7 +815,7 @@ stringify_uintmax_t_backwards (uintmax_t o, char *buf)
 /* Return a printable representation of T.  The result points to
 /* Return a printable representation of T.  The result points to
    static storage that can be reused in the next call to this
    static storage that can be reused in the next call to this
    function, to ctime, or to asctime.  */
    function, to ctime, or to asctime.  */
-static char const *
+char const *
 tartime (time_t t)
 tartime (time_t t)
 {
 {
   static char buffer[max (UINTMAX_STRSIZE_BOUND + 1,
   static char buffer[max (UINTMAX_STRSIZE_BOUND + 1,