diff options
Diffstat (limited to 'src/opk.c')
-rw-r--r-- | src/opk.c | 15 |
1 files changed, 15 insertions, 0 deletions
@@ -36,6 +36,7 @@ struct opkg_opk_opk { size_t version_size; struct opkg_opk_gzip *inner_gzip; struct opkg_opk_ustar *inner_ustar; + int previously_printed; }; static int @@ -107,6 +108,8 @@ opkg_opk_opk_init_outer(const char *file_name) goto error3; } + opk->previously_printed = 0; + return opk; error3: @@ -167,6 +170,10 @@ opkg_opk_opk_read_control(struct opkg_opk_opk *opk) size_t size; int ret; + if (opk->previously_printed == 1) { + puts(""); + } + if (opkg_opk_ustar_seek(opk->inner_ustar, 2, "control", "./control") != OPKG_OPK_OK) { fputs("Error: Failed to find control file\n", stderr); @@ -181,6 +188,8 @@ opkg_opk_opk_read_control(struct opkg_opk_opk *opk) return OPKG_OPK_ERROR; } + opk->previously_printed = 1; + return OPKG_OPK_OK; } @@ -201,6 +210,10 @@ opkg_opk_opk_list_members(struct opkg_opk_opk *opk) char mode[10]; char mtime[20]; + if (opk->previously_printed == 1) { + puts(""); + } + /* Build singly-linked list and find maximum column widths. */ head = NULL; uname_len_max = 0; @@ -260,6 +273,8 @@ opkg_opk_opk_list_members(struct opkg_opk_opk *opk) free(head); } + opk->previously_printed = 1; + return OPKG_OPK_OK; } |