From aed7edf0f68d4c86ef28f50be95e6002a7fd42cf Mon Sep 17 00:00:00 2001 From: Patrick Winnertz Date: Mon, 12 Jan 2009 22:26:58 +0100 Subject: [PATCH 1/3] Removed some unused vars and functions --- edit/editlock.c | 3 +-- src/cmd.c | 2 -- src/hotlist.c | 30 ------------------------------ src/main.c | 13 ------------- src/util.c | 1 - 5 files changed, 1 insertion(+), 48 deletions(-) diff --git a/edit/editlock.c b/edit/editlock.c index f7fb8125d..fb945f266 100644 --- a/edit/editlock.c +++ b/edit/editlock.c @@ -142,8 +142,7 @@ lock_get_info (const char *lockfname) int cnt; static char buf[BUF_SIZE]; - if ((cnt = readlink (lockfname, buf, BUF_SIZE - 1)) == -1 || !buf - || !*buf) + if ((cnt = readlink (lockfname, buf, BUF_SIZE - 1)) == -1 || !*buf) return NULL; buf[cnt] = '\0'; return buf; diff --git a/src/cmd.c b/src/cmd.c index 01d110ffb..fca281651 100644 --- a/src/cmd.c +++ b/src/cmd.c @@ -1223,8 +1223,6 @@ dirsizes_cmd (void) void save_setup_cmd (void) { - char *str; - save_setup (); sync_profiles (); diff --git a/src/hotlist.c b/src/hotlist.c index a1183cbb7..24dd982b2 100644 --- a/src/hotlist.c +++ b/src/hotlist.c @@ -1491,36 +1491,6 @@ load_hotlist (void) current_group = hotlist; } -static void -save_group (struct hotlist *grp) -{ - struct hotlist *current = grp->head; - char *group_section; - - group_section = find_group_section (grp); - - profile_clean_section (group_section, profile_name); - for (;current && current->type == HL_TYPE_GROUP; current = current->next){ - WritePrivateProfileString (group_section, - current->directory, - current->label, - profile_name); - } - g_free (group_section); - - for (current = grp->head; - current && current->type == HL_TYPE_GROUP; - current = current->next) - save_group (current); - - profile_clean_section (grp->directory, profile_name); - for (;current; current = current->next){ - WritePrivateProfileString (grp->directory, - current->directory, - current->label, - profile_name); - } -} static int list_level = 0; diff --git a/src/main.c b/src/main.c index 949dcf965..de9aec06c 100644 --- a/src/main.c +++ b/src/main.c @@ -2114,19 +2114,6 @@ handle_args (int argc, char *argv[]) poptFreeContext (ctx); } -static int -do_mc_filename_rename (const char *o_name, const char *n_name) -{ - char *full_o_name = concat_dir_and_file (home_dir, o_name); - char *full_n_name = g_strconcat (home_dir, MC_BASE, n_name, (char *) NULL); - int move; - - move = 0 == rename (full_o_name, full_n_name); - g_free (full_o_name); - g_free (full_n_name); - return move; -} - int main (int argc, char *argv[]) { diff --git a/src/util.c b/src/util.c index 2e4eabbca..edc759a2e 100644 --- a/src/util.c +++ b/src/util.c @@ -755,7 +755,6 @@ file_date (time_t when) static size_t i18n_timelength = 0; static const char *fmtyear, *fmttime; const char *fmt; - struct tm *whentm; if (i18n_timelength == 0){ i18n_timelength = i18n_checktimelength() + 1; From 537b55b46e8581e5c9da01b7bed37435a05c16bb Mon Sep 17 00:00:00 2001 From: Patrick Winnertz Date: Wed, 14 Jan 2009 23:28:35 +0100 Subject: [PATCH 2/3] Move this var into if condition as it's only needed there --- edit/editdraw.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/edit/editdraw.c b/edit/editdraw.c index f0951f4b7..86ea3f9c7 100644 --- a/edit/editdraw.c +++ b/edit/editdraw.c @@ -282,7 +282,7 @@ edit_draw_this_line (WEdit *edit, long b, long row, long start_col, { static unsigned int line[MAX_LINE_LEN]; unsigned int *p = line; - long m1 = 0, m2 = 0, q, c1, c2, tws; + long m1 = 0, m2 = 0, q, c1, c2; int col, start_col_real; unsigned int c; int color; @@ -300,6 +300,7 @@ edit_draw_this_line (WEdit *edit, long b, long row, long start_col, eval_marks (edit, &m1, &m2); if (row <= edit->total_lines - edit->start_line) { + long tws; if (use_colors && visible_tws) { tws = edit_eol (edit, b); while (tws > b && ((c = edit_get_byte (edit, tws - 1)) == ' ' From e5a3a7cf0cd04da48b19b52ecf4e74400e775d23 Mon Sep 17 00:00:00 2001 From: Patrick Winnertz Date: Sun, 18 Jan 2009 23:09:23 +0100 Subject: [PATCH 3/3] Closing #168 (unused vars and functions) added Changelog entry --- ChangeLog | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/ChangeLog b/ChangeLog index f337ae642..4d8eb876c 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,12 +1,22 @@ +2009-01-18 Patrick Winnertz - - * AUTHORS: Added Enrico Weigelt, Slava Zanko and - Patrick Winnertz as authors + + * AUTHORS: Added Enrico Weigelt, Slava Zanko and + Patrick Winnertz as authors 2009-01-11 Patrick Winnertz - * syntax/pascal.syntax: Added syntax highlighting for - some delphi keywords + * syntax/pascal.syntax: Added syntax highlighting for + some delphi keywords 2008-12-18 Roland Illig