Standardize on the vi editing directives being on the first line.
[oweals/busybox.git] / archival / libunarchive / header_verbose_list.c
1 /* vi: set sw=4 ts=4: */
2 #include <stdio.h>
3 #include <string.h>
4 #include <time.h>
5 #include "libbb.h"
6 #include "unarchive.h"
7
8 void header_verbose_list(const file_header_t *file_header)
9 {
10         struct tm *mtime = localtime(&(file_header->mtime));
11
12         printf("%s %d/%d%10u %4u-%02u-%02u %02u:%02u:%02u %s",
13                 bb_mode_string(file_header->mode),
14                 file_header->uid,
15                 file_header->gid,
16                 (unsigned int) file_header->size,
17                 1900 + mtime->tm_year,
18                 1 + mtime->tm_mon,
19                 mtime->tm_mday,
20                 mtime->tm_hour,
21                 mtime->tm_min,
22                 mtime->tm_sec,
23                 file_header->name);
24
25         if (file_header->link_name) {
26                 printf(" -> %s", file_header->link_name);
27         }
28         /* putchar isnt used anywhere else i dont think */
29         puts("");
30 }