Skip to content

Commit

Permalink
Remove some commented out code
Browse files Browse the repository at this point in the history
  • Loading branch information
leo-arch committed Jan 24, 2025
1 parent de4407b commit 6c27a97
Show file tree
Hide file tree
Showing 6 changed files with 1 addition and 41 deletions.
2 changes: 1 addition & 1 deletion src/fuzzy_match.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ utf8nextcodepoint(const char *s)
} else if (0xc0 == (0xe0 & *s)) {
/* 2-byte utf8 code point (began with 0b110xxxxx) */
return 2;
} else { /* if (0x00 == (0x80 & *s)) { */
} else { /* (0x00 == (0x80 & *s)) { */
/* 1-byte ascii (began with 0b0xxxxxxx) */
return 1;
}
Expand Down
8 changes: 0 additions & 8 deletions src/init.c
Original file line number Diff line number Diff line change
Expand Up @@ -2812,14 +2812,6 @@ check_options(void)
hist_status = xargs.history;
}

/* if (!conf.wprompt_str) {
if (conf.colorize == 1)
conf.wprompt_str = savestring(DEF_WPROMPT_STR, sizeof(DEF_WPROMPT_STR) - 1);
else
conf.wprompt_str = savestring(DEF_WPROMPT_STR_NO_COLOR,
sizeof(DEF_WPROMPT_STR_NO_COLOR) - 1);
} */

/* Do no override command line options */
if (xargs.cwd_in_title == UNSET)
xargs.cwd_in_title = DEF_CWD_IN_TITLE;
Expand Down
3 changes: 0 additions & 3 deletions src/jump.c
Original file line number Diff line number Diff line change
Expand Up @@ -482,8 +482,6 @@ print_jump_table(const int reduce, const time_t now)

int days_since_first = 0, hours_since_last = 0;
int rank = rank_entry((int)i, now, &days_since_first, &hours_since_last);
// int keep = jump_db[i].keep;
// jump_db[i].keep = 0;

if (reduce) {
int tmp_rank = rank;
Expand All @@ -495,7 +493,6 @@ print_jump_table(const int reduce, const time_t now)

tmp_jump[i].path = jump_db[i].path;
tmp_jump[i].keep = jump_db[i].keep;
// tmp_jump[i].keep = keep;
tmp_jump[i].rank = rank;
tmp_jump[i].len = jump_db[i].len;
tmp_jump[i].visits = jump_db[i].visits;
Expand Down
3 changes: 0 additions & 3 deletions src/keybinds.c
Original file line number Diff line number Diff line change
Expand Up @@ -1008,7 +1008,6 @@ my_insert_text(char *text, char *s, const char _s)
q[l] = '\0';
l = 0;
rl_insert_text(q);
// rl_redisplay();
}
continue;
}
Expand All @@ -1029,7 +1028,6 @@ my_insert_text(char *text, char *s, const char _s)
* As a workaround, let's reprint the suggestion */
size_t slen = strlen(suggestion_buf);
*s = _s ? _s : ' ';
// print_suggestion(suggestion_buf, slen + 1, suggestion.color);
print_suggestion(suggestion_buf, slen, suggestion.color);
*s = '\0';
}
Expand Down Expand Up @@ -2923,7 +2921,6 @@ set_hardcoded_keybinds(void)
rl_bind_keyseq("\x1bOC", rl_accept_suggestion);

/* Bind Alt-Right and Alt-f to accept the first suggested word */
/* rl_bind_key(('f' | 0200), rl_accept_first_word); */ // Alt-f
rl_bind_keyseq("\x1b\x66", rl_accept_first_word);
rl_bind_keyseq("\x1b[3C", rl_accept_first_word);
rl_bind_keyseq("\x1b\x1b[C", rl_accept_first_word);
Expand Down
1 change: 0 additions & 1 deletion src/keybinds.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@

__BEGIN_DECLS

/*void add_func_to_rl(void); */
int keybind_exec_cmd(char *str);
int kbinds_function(char **args);
int load_keybinds(void);
Expand Down
25 changes: 0 additions & 25 deletions src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -908,9 +908,6 @@ int inotify_fd = UNSET, inotify_wd = UNSET;
int watch = UNSET;
unsigned int INOTIFY_MASK =
IN_CREATE | IN_DELETE | IN_DELETE_SELF | IN_MOVE | IN_MOVE_SELF
/*#if LINUX_VERSION_CODE >= KERNEL_VERSION(4, 18, 0)
| IN_DONT_FOLLOW | IN_EXCL_UNLINK | IN_ONLYDIR | IN_MASK_CREATE;
#else */
# if LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 15)
| IN_DONT_FOLLOW | IN_ONLYDIR
# endif /* LINUX >= 2.6.15 */
Expand Down Expand Up @@ -1104,18 +1101,6 @@ check_working_directory(void)
}
}

/* Check whether we have a working shell */
/*
static inline void
check_working_shell(void)
{
if (access(user.shell, X_OK) == -1) {
err('w', PRINT_PROMPT, _("%s: %s: System shell not found. "
"Please edit the configuration file to specify a working "
"shell.\n"), PROGRAM_NAME, user.shell);
}
} */

#ifndef _NO_TRASH
static inline void
init_trash(void)
Expand Down Expand Up @@ -1244,16 +1229,6 @@ list_files_and_quit(void)
exit(EXIT_SUCCESS); /* Never reached. */
}

/*
static void
init_file_flags(void)
{
flags |= CONFIG_OK;
flags |= HOME_OK;
flags |= SELFILE_OK;
flags |= TRASH_OK;
} */

/**
* #############################
* # MAIN #
Expand Down

0 comments on commit 6c27a97

Please sign in to comment.