contrib/gdb-4.7.LBL/gdb/main.c
/* Init the history buffer.  Note that we are called after the init file(s)
 * have been read so that the user can change the history file via his
 * .gdbinit file (for instance).  The GDBHISTFILE environment variable
 * overrides all of this.
 */
Init the history buffer.  Note that we are called after the init file(s)
have been read so that the user can change the history file via his
.gdbinit file (for instance).  The GDBHISTFILE environment variable
overrides all of this.
Init the history buffer . Note that we are called after the init file ( s ) have been read so that the user can change the history file via his . gdbinit file ( for instance ) . The GDBHISTFILE environment variable overrides all of this .
static void
initialize_history()
{
  char *tmpenv;
  tmpenv = getenv ("HISTSIZE");
  if (tmpenv)
    history_size = atoi (tmpenv);
  else if (!history_size)
    history_size = 256;
  stifle_history (history_size);
  tmpenv = getenv ("GDBHISTFILE");
  if (tmpenv)
    history_filename = savestring (tmpenv, strlen(tmpenv));
  else if (!history_filename) {
    history_filename = concat (current_directory, "/.gdb_history", NULL);
  }
  read_history (history_filename);
}
static void initialize_history ( ) { char * tmpenv ; tmpenv = getenv ( " " ) ; if ( tmpenv ) history_size = atoi ( tmpenv ) ; else if ( ! history_size ) history_size = 256 ; stifle_history ( history_size ) ; tmpenv = getenv ( " " ) ; if ( tmpenv ) history_filename = savestring ( tmpenv , strlen ( tmpenv ) ) ; else if ( ! history_filename ) { history_filename = concat ( current_directory , " " , NULL ) ; } read_history ( history_filename ) ; }
Init the history buffer.
Init the history buffer .
/* We include the current directory so that if the user changes
       directories the file written will be the same as the one
       that was read.  */