mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-27 21:33:09 +00:00
Remove some disabled (commented or ifdef'd out) code
This commit is contained in:
parent
c3ca108dbe
commit
1f2b2b119a
6 changed files with 0 additions and 48 deletions
|
@ -211,21 +211,6 @@ size_t wcslcpy(wchar_t *dst, const wchar_t *src, size_t siz) {
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if 0
|
|
||||||
// These are not currently used.
|
|
||||||
#ifndef HAVE_LRAND48_R
|
|
||||||
int lrand48_r(struct drand48_data *buffer, long int *result) {
|
|
||||||
*result = rand_r(&buffer->seed);
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
|
|
||||||
int srand48_r(long int seedval, struct drand48_data *buffer) {
|
|
||||||
buffer->seed = (unsigned int)seedval;
|
|
||||||
return 0;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifndef HAVE_FUTIMES
|
#ifndef HAVE_FUTIMES
|
||||||
int futimes(int fd, const struct timeval *times) {
|
int futimes(int fd, const struct timeval *times) {
|
||||||
errno = ENOSYS;
|
errno = ENOSYS;
|
||||||
|
|
|
@ -555,15 +555,6 @@ bool history_item_t::merge(const history_item_t &item) {
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0
|
|
||||||
history_item_t::history_item_t(const wcstring &str)
|
|
||||||
: contents(str), contents_lower(L""), creation_timestamp(time(NULL)), identifier(0) {
|
|
||||||
for (wcstring::const_iterator it = str.begin(); it != str.end(); ++it) {
|
|
||||||
contents_lower.push_back(towlower(*it));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
|
|
||||||
history_item_t::history_item_t(const wcstring &str, time_t when, history_identifier_t ident)
|
history_item_t::history_item_t(const wcstring &str, time_t when, history_identifier_t ident)
|
||||||
: contents(str), contents_lower(L""), creation_timestamp(when), identifier(ident) {
|
: contents(str), contents_lower(L""), creation_timestamp(when), identifier(ident) {
|
||||||
for (wcstring::const_iterator it = str.begin(); it != str.end(); ++it) {
|
for (wcstring::const_iterator it = str.begin(); it != str.end(); ++it) {
|
||||||
|
|
|
@ -44,12 +44,6 @@ void io_buffer_t::read() {
|
||||||
exec_close(pipe_fd[1]);
|
exec_close(pipe_fd[1]);
|
||||||
|
|
||||||
if (io_mode == IO_BUFFER) {
|
if (io_mode == IO_BUFFER) {
|
||||||
#if 0
|
|
||||||
if (fcntl( pipe_fd[0], F_SETFL, 0)) {
|
|
||||||
wperror( L"fcntl" );
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
debug(4, L"io_buffer_t::read: blocking read on fd %d", pipe_fd[0]);
|
debug(4, L"io_buffer_t::read: blocking read on fd %d", pipe_fd[0]);
|
||||||
while (1) {
|
while (1) {
|
||||||
char b[4096];
|
char b[4096];
|
||||||
|
|
|
@ -1096,13 +1096,6 @@ bool parse_tree_from_string(const wcstring &str, parse_tree_flags_t parse_flags,
|
||||||
// Acquire the output from the parser.
|
// Acquire the output from the parser.
|
||||||
parser.acquire_output(output, errors);
|
parser.acquire_output(output, errors);
|
||||||
|
|
||||||
#if 0
|
|
||||||
//wcstring result = dump_tree(this->parser->nodes, str);
|
|
||||||
//fwprintf(stderr, L"Tree (%ld nodes):\n%ls", this->parser->nodes.size(), result.c_str());
|
|
||||||
fwprintf(stderr, L"%lu nodes, node size %lu, %lu bytes\n", output->size(), sizeof(parse_node_t),
|
|
||||||
output->size() * sizeof(parse_node_t));
|
|
||||||
#endif
|
|
||||||
|
|
||||||
// Indicate if we had a fatal error.
|
// Indicate if we had a fatal error.
|
||||||
return !parser.has_fatal_error();
|
return !parser.has_fatal_error();
|
||||||
}
|
}
|
||||||
|
|
10
src/proc.cpp
10
src/proc.cpp
|
@ -333,16 +333,6 @@ static void handle_child_status(pid_t pid, int status) {
|
||||||
sigaction(SIGQUIT, &act, 0);
|
sigaction(SIGQUIT, &act, 0);
|
||||||
kill(getpid(), WTERMSIG(status));
|
kill(getpid(), WTERMSIG(status));
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0
|
|
||||||
// TODO: Decide whether to eliminate this block or have it emit a warning message.
|
|
||||||
// WARNING: See the special short-circuit logic above vis-a-vis signals.
|
|
||||||
if (!found_proc) {
|
|
||||||
// A child we lost track of? There have been bugs in both subshell handling and in builtin
|
|
||||||
// handling that have caused this previously...
|
|
||||||
}
|
|
||||||
#endif
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
process_t::process_t() {}
|
process_t::process_t() {}
|
||||||
|
|
|
@ -2693,7 +2693,6 @@ const wchar_t *reader_readline(int nchars) {
|
||||||
data->search_mode = history_search_mode_t::none;
|
data->search_mode = history_search_mode_t::none;
|
||||||
|
|
||||||
if (data->token_history_pos == (size_t)-1) {
|
if (data->token_history_pos == (size_t)-1) {
|
||||||
// history_reset();
|
|
||||||
data->history_search.go_to_end();
|
data->history_search.go_to_end();
|
||||||
reader_set_buffer(data->search_buff, data->search_buff.size());
|
reader_set_buffer(data->search_buff, data->search_buff.size());
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in a new issue