linux-0.11调试教程,load

shell.c

main ()

load_history ()

reader_loop ()

/* Load the history list from the history file. */load_history (){ char *hf; /* Truncate history file for interactive shells which desire it. Note that the history file is automatically truncated to the size of HISTSIZE if the user does not explicitly set the size differently. */ set_if_not ("HISTFILESIZE", get_string_value ("HISTSIZE")); stupidly_hack_special_variables ("HISTFILESIZE"); /* Read the history in HISTFILE into the history list. */ hf = get_string_value ("HISTFILE"); if (hf && *hf) { struct stat buf; if (stat (hf, &buf) == 0) { read_history (hf); using_history (); history_lines_in_file = where_history (); } }}

lib/readline/history.c

/* Add the contents of FILENAME to the history list, a line at a time. If FILENAME is NULL, then read from ~/.history. Returns 0 if successful, or errno if not. */intread_history (filename) char *filename;{ return (read_history_range (filename, 0, -1));}

read_history_range ()

add_history ()

大多数人想要改造这个世界,但却罕有人想改造自己。

linux-0.11调试教程,load

相关文章:

你感兴趣的文章:

标签云: