Skip to content

Commit

Permalink
Rename open_func 'open_archive' 'open'
Browse files Browse the repository at this point in the history
  • Loading branch information
ib committed Feb 18, 2017
1 parent 7561336 commit 4a93a6e
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 20 deletions.
4 changes: 2 additions & 2 deletions src/archive.c
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
#define MAX_CMD_LEN (NCARGS * 2 / 3)

extern ask_func ask[XARCHIVETYPE_COUNT];
extern open_func open_archive[XARCHIVETYPE_COUNT];
extern open_func open[XARCHIVETYPE_COUNT];
extern delete_func delete [XARCHIVETYPE_COUNT];
extern add_func add [XARCHIVETYPE_COUNT];
extern extract_func extract [XARCHIVETYPE_COUNT];
Expand All @@ -63,7 +63,7 @@ XArchive *xa_init_archive_structure(gint type)
entry->filename = "";
archive->root_entry = entry;
archive->ask = ask[type];
archive->open_archive = open_archive[type];
archive->open = open[type];
archive->delete = delete[type];
archive->add = add[type];
archive->extract = extract[type];
Expand Down
2 changes: 1 addition & 1 deletion src/archive.h
Original file line number Diff line number Diff line change
Expand Up @@ -149,7 +149,7 @@ struct _XArchive
add_func add;
extract_func extract;
test_func test;
open_func open_archive;
open_func open;
};

extern XArchive *archive[];
Expand Down
30 changes: 15 additions & 15 deletions src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ delete_func delete[XARCHIVETYPE_COUNT] = {NULL};
add_func add[XARCHIVETYPE_COUNT] = {NULL};
extract_func extract[XARCHIVETYPE_COUNT] = {NULL};
test_func test[XARCHIVETYPE_COUNT] = {NULL};
open_func open_archive[XARCHIVETYPE_COUNT] = {NULL};
open_func open[XARCHIVETYPE_COUNT] = {NULL};
ask_func ask[XARCHIVETYPE_COUNT] = {NULL};

static GOptionEntry entries[] =
Expand Down Expand Up @@ -363,20 +363,20 @@ void xa_set_available_archivers()
ask[XARCHIVETYPE_LHA] = &xa_lha_ask;
ask[XARCHIVETYPE_LZOP] = &xa_bzip2_lzma_ask;

open_archive[0] = 0;
open_archive[XARCHIVETYPE_7ZIP] = &xa_open_7zip;
open_archive[XARCHIVETYPE_ARJ] = &xa_open_arj;
open_archive[XARCHIVETYPE_DEB] = &xa_open_deb;
open_archive[XARCHIVETYPE_BZIP2] = &xa_open_bzip2_lzma;
open_archive[XARCHIVETYPE_GZIP] = &xa_open_gzip;
open_archive[XARCHIVETYPE_LZMA] = &xa_open_bzip2_lzma;
open_archive[XARCHIVETYPE_XZ] = &xa_open_bzip2_lzma;
open_archive[XARCHIVETYPE_RAR] = &xa_open_rar;
open_archive[XARCHIVETYPE_RPM] = &xa_open_rpm;
open_archive[XARCHIVETYPE_TAR] = open_archive[XARCHIVETYPE_TAR_BZ2] = open_archive[XARCHIVETYPE_TAR_GZ] = open_archive[XARCHIVETYPE_TAR_LZMA] = open_archive[XARCHIVETYPE_TAR_XZ] = open_archive[XARCHIVETYPE_TAR_LZOP] = &xa_open_tar;
open_archive[XARCHIVETYPE_ZIP] = &xa_open_zip;
open_archive[XARCHIVETYPE_LHA] = &xa_open_lha;
open_archive[XARCHIVETYPE_LZOP] = &xa_open_bzip2_lzma;
open[0] = 0;
open[XARCHIVETYPE_7ZIP] = &xa_open_7zip;
open[XARCHIVETYPE_ARJ] = &xa_open_arj;
open[XARCHIVETYPE_DEB] = &xa_open_deb;
open[XARCHIVETYPE_BZIP2] = &xa_open_bzip2_lzma;
open[XARCHIVETYPE_GZIP] = &xa_open_gzip;
open[XARCHIVETYPE_LZMA] = &xa_open_bzip2_lzma;
open[XARCHIVETYPE_XZ] = &xa_open_bzip2_lzma;
open[XARCHIVETYPE_RAR] = &xa_open_rar;
open[XARCHIVETYPE_RPM] = &xa_open_rpm;
open[XARCHIVETYPE_TAR] = open[XARCHIVETYPE_TAR_BZ2] = open[XARCHIVETYPE_TAR_GZ] = open[XARCHIVETYPE_TAR_LZMA] = open[XARCHIVETYPE_TAR_XZ] = open[XARCHIVETYPE_TAR_LZOP] = &xa_open_tar;
open[XARCHIVETYPE_ZIP] = &xa_open_zip;
open[XARCHIVETYPE_LHA] = &xa_open_lha;
open[XARCHIVETYPE_LZOP] = &xa_open_bzip2_lzma;

delete[0] = 0;
delete[XARCHIVETYPE_7ZIP] = &xa_7zip_delete;
Expand Down
4 changes: 2 additions & 2 deletions src/window.c
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ void xa_reload_archive_content(XArchive *_archive)
entry->filename = "";
_archive->root_entry = entry;

(*_archive->open_archive) (_archive);
(*_archive->open)(_archive);

if (strcmp(_archive->path,archive[idx]->path) == 0)
xa_fill_dir_sidebar(_archive,TRUE);
Expand Down Expand Up @@ -386,7 +386,7 @@ void xa_open_archive (GtkMenuItem *menuitem,gpointer data)
gtk_widget_set_sensitive (listing,FALSE);
xa_set_button_state (0,0,0,0,0,0,0,0,0,0);
gtk_label_set_text(GTK_LABEL(total_label),_("Opening archive,please wait..."));
(*archive[current_page]->open_archive) (archive[current_page]);
(*archive[current_page]->open)(archive[current_page]);

archive[current_page]->passwd = NULL;
xa_fill_dir_sidebar(archive[current_page],TRUE);
Expand Down

0 comments on commit 4a93a6e

Please sign in to comment.