Back to index

tetex-bin  3.0
Defines | Functions | Variables
echo-area.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define EA_MAX_INPUT   256

Functions

void inform_in_echo_area (const char *message)
void echo_area_inform_of_deleted_window (WINDOW *window)
void echo_area_prep_read (void)
char * info_read_completing_internal (WINDOW *window, char *prompt, REFERENCE **completions, int force)
char * info_read_in_echo_area (WINDOW *window, char *prompt)
char * info_read_completing_in_echo_area (WINDOW *window, char *prompt, REFERENCE **completions)
char * info_read_maybe_completing (WINDOW *window, char *prompt, REFERENCE **completions)
void ea_insert (WINDOW *window, int count, unsigned char key)
void ea_quoted_insert (WINDOW *window, int count, unsigned char key)
void ea_beg_of_line (WINDOW *window, int count, unsigned char key)
void ea_backward (WINDOW *window, int count, unsigned char key)
void ea_delete (WINDOW *window, int count, unsigned char key)
void ea_end_of_line (WINDOW *window, int count, unsigned char key)
void ea_forward (WINDOW *window, int count, unsigned char key)
void ea_abort (WINDOW *window, int count, unsigned char key)
void ea_rubout (WINDOW *window, int count, unsigned char key)
void ea_complete (WINDOW *window, int count, unsigned char key)
void ea_newline (WINDOW *window, int count, unsigned char key)
void ea_kill_line (WINDOW *window, int count, unsigned char key)
void ea_backward_kill_line (WINDOW *window, int count, unsigned char key)
void ea_transpose_chars (WINDOW *window, int count, unsigned char key)
void ea_yank (WINDOW *window, int count, unsigned char key)
void ea_tab_insert (WINDOW *window, int count, unsigned char key)
void ea_possible_completions (WINDOW *window, int count, unsigned char key)
void ea_backward_word (WINDOW *window, int count, unsigned char key)
void ea_kill_word (WINDOW *window, int count, unsigned char key)
void ea_forward_word (WINDOW *window, int count, unsigned char key)
void ea_yank_pop (WINDOW *window, int count, unsigned char key)
void ea_backward_kill_word (WINDOW *window, int count, unsigned char key)
void ea_scroll_completions_window (WINDOW *window, int count, unsigned char key)

Variables

int echo_area_is_active
int info_aborted_echo_area
int echo_area_last_command_was_kill
VFunctionea_last_executed_command

Define Documentation

#define EA_MAX_INPUT   256

Definition at line 28 of file echo-area.h.


Function Documentation

void ea_abort ( WINDOW window,
int  count,
unsigned char  key 
)
void ea_backward ( WINDOW window,
int  count,
unsigned char  key 
)
void ea_backward_kill_line ( WINDOW window,
int  count,
unsigned char  key 
)
void ea_backward_kill_word ( WINDOW window,
int  count,
unsigned char  key 
)
void ea_backward_word ( WINDOW window,
int  count,
unsigned char  key 
)
void ea_beg_of_line ( WINDOW window,
int  count,
unsigned char  key 
)
void ea_complete ( WINDOW window,
int  count,
unsigned char  key 
)
void ea_delete ( WINDOW window,
int  count,
unsigned char  key 
)
void ea_end_of_line ( WINDOW window,
int  count,
unsigned char  key 
)
void ea_forward ( WINDOW window,
int  count,
unsigned char  key 
)
void ea_forward_word ( WINDOW window,
int  count,
unsigned char  key 
)
void ea_insert ( WINDOW window,
int  count,
unsigned char  key 
)

Here is the caller graph for this function:

void ea_kill_line ( WINDOW window,
int  count,
unsigned char  key 
)
void ea_kill_word ( WINDOW window,
int  count,
unsigned char  key 
)
void ea_newline ( WINDOW window,
int  count,
unsigned char  key 
)

Here is the caller graph for this function:

void ea_possible_completions ( WINDOW window,
int  count,
unsigned char  key 
)
void ea_quoted_insert ( WINDOW window,
int  count,
unsigned char  key 
)
void ea_rubout ( WINDOW window,
int  count,
unsigned char  key 
)
void ea_scroll_completions_window ( WINDOW window,
int  count,
unsigned char  key 
)
void ea_tab_insert ( WINDOW window,
int  count,
unsigned char  key 
)
void ea_transpose_chars ( WINDOW window,
int  count,
unsigned char  key 
)
void ea_yank ( WINDOW window,
int  count,
unsigned char  key 
)
void ea_yank_pop ( WINDOW window,
int  count,
unsigned char  key 
)

Definition at line 266 of file echo-area.c.

Here is the call graph for this function:

Here is the caller graph for this function:

char* info_read_completing_in_echo_area ( WINDOW window,
char *  prompt,
REFERENCE **  completions 
)

Definition at line 896 of file echo-area.c.

{
  return (info_read_completing_internal (window, prompt, completions, 1));
}

Here is the call graph for this function:

Here is the caller graph for this function:

char* info_read_completing_internal ( WINDOW window,
char *  prompt,
REFERENCE **  completions,
int  force 
)

Definition at line 802 of file echo-area.c.

{
  char *line;

  /* If the echo area is already active, remember the current state. */
  if (echo_area_is_active)
    push_echo_area ();

  echo_area_must_complete_p = force;

  /* Initialize our local variables. */
  initialize_input_line (prompt);

  /* Initialize the echo area for the first (but maybe not the last) time. */
  echo_area_initialize_node ();

  /* Save away the original node of this window, and the window itself,
     so echo area commands can temporarily use this window. */
  remember_calling_window (window);

  /* Save away the list of items to complete over. */
  echo_area_completion_items = completions;
  completions_must_be_rebuilt ();

  active_window = the_echo_area;
  echo_area_is_active++;

  /* Read characters in the echo area. */
  while (1)
    {
      info_read_and_dispatch ();

      line = echo_area_after_read ();

      /* Force the completion to take place if the user hasn't accepted
         a default or aborted, and if FORCE is active. */
      if (force && line && *line && completions)
        {
          register int i;

          build_completions ();

          /* If there is only one completion, then make the line be that
             completion. */
          if (completions_found_index == 1)
            {
              free (line);
              line = xstrdup (completions_found[0]->label);
              break;
            }

          /* If one of the completions matches exactly, then that is okay, so
             return the current line. */
          for (i = 0; i < completions_found_index; i++)
            if (strcasecmp (completions_found[i]->label, line) == 0)
              {
                free (line);
                line = xstrdup (completions_found[i]->label);
                break;
              }

          /* If no match, go back and try again. */
          if (i == completions_found_index)
            {
              if (!completions_found_index)
                inform_in_echo_area ((char *) _("No completions"));
              else
                inform_in_echo_area ((char *) _("Not complete"));
              continue;
            }
        }
      break;
    }
  echo_area_is_active--;

  /* Restore the original active window and show point in it. */
  active_window = calling_window;
  restore_calling_window ();
  display_cursor_at_point (active_window);
  fflush (stdout);

  echo_area_completion_items = (REFERENCE **)NULL;
  completions_must_be_rebuilt ();

  /* If there is a previous loop waiting for us, restore it now. */
  if (echo_area_is_active)
    pop_echo_area ();

  return (line);
}

Here is the call graph for this function:

Here is the caller graph for this function:

char* info_read_in_echo_area ( WINDOW window,
char *  prompt 
)

Definition at line 204 of file echo-area.c.

{
  char *line;

  /* If the echo area is already active, remember the current state. */
  if (echo_area_is_active)
    push_echo_area ();

  /* Initialize our local variables. */
  initialize_input_line (prompt);

  /* Initialize the echo area for the first (but maybe not the last) time. */
  echo_area_initialize_node ();

  /* Save away the original node of this window, and the window itself,
     so echo area commands can temporarily use this window. */
  remember_calling_window (window);

  /* Let the rest of Info know that the echo area is active. */
  echo_area_is_active++;
  active_window = the_echo_area;

  /* Read characters in the echo area. */
  info_read_and_dispatch ();

  echo_area_is_active--;

  /* Restore the original active window and show point in it. */
  active_window = calling_window;
  restore_calling_window ();
  display_cursor_at_point (active_window);
  fflush (stdout);

  /* Get the value of the line. */
  line = echo_area_after_read ();

  /* If there is a previous loop waiting for us, restore it now. */
  if (echo_area_is_active)
    pop_echo_area ();

  /* Return the results to the caller. */
  return (line);
}

Here is the call graph for this function:

Here is the caller graph for this function:

char* info_read_maybe_completing ( WINDOW window,
char *  prompt,
REFERENCE **  completions 
)

Definition at line 905 of file echo-area.c.

{
  return (info_read_completing_internal (window, prompt, completions, 0));
}

Here is the call graph for this function:

Here is the caller graph for this function:

void inform_in_echo_area ( const char *  message)

Definition at line 1503 of file echo-area.c.

{
  int i;
  char *text;
  int avail = EA_MAX_INPUT + 1 - input_line_end;

  text = xstrdup (message);
  for (i = 0; text[i] && text[i] != '\n' && i < avail; i++)
    ;
  text[i] = 0;

  echo_area_initialize_node ();
  sprintf (&input_line[input_line_end], "%s[%s]\n",
           echo_area_is_active ? " ": "", text);
  free (text);
  the_echo_area->point = input_line_point;
  display_update_one_window (the_echo_area);
  display_cursor_at_point (active_window);
  fflush (stdout);
  pause_or_input ();
  echo_area_initialize_node ();
}

Here is the call graph for this function:

Here is the caller graph for this function:


Variable Documentation

Definition at line 40 of file echo-area.c.

Definition at line 37 of file echo-area.c.

Definition at line 44 of file echo-area.c.

Definition at line 34 of file echo-area.c.