home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 4: GNU Archives / Linux Cubed Series 4 - GNU Archives.iso / gnu / git-4.3 / git-4 / git-4.3.11 / src / inputline.h < prev    next >
Encoding:
C/C++ Source or Header  |  1996-04-22  |  4.2 KB  |  125 lines

  1. /* inputline.h -- Prototypes for the functions in inputline.c.  */
  2.  
  3. /* Copyright (C) 1993, 1994, 1995, 1996 Free Software Foundation, Inc.
  4.  
  5.    This program is free software; you can redistribute it and/or modify
  6.    it under the terms of the GNU General Public License as published by
  7.    the Free Software Foundation; either version 2, or (at your option)
  8.    any later version.
  9.  
  10.    This program is distributed in the hope that it will be useful,
  11.    but WITHOUT ANY WARRANTY; without even the implied warranty of
  12.    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  13.    GNU General Public License for more details.
  14.  
  15.    You should have received a copy of the GNU General Public License
  16.    along with this program; if not, write to the Free Software
  17.    Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
  18.  
  19. /* Written by Tudor Hulubei and Andrei Pitis.  */
  20.  
  21.  
  22. #ifndef _GIT_INPUTLINE_H
  23. #define _GIT_INPUTLINE_H
  24.  
  25.  
  26. #include <sys/types.h>
  27.  
  28. #include "stdc.h"
  29. #include "window.h"
  30.  
  31.  
  32. #define IL_RECORD       0
  33. #define IL_PREVIOUS     1
  34. #define IL_NEXT         2
  35.  
  36.  
  37. #define IL_DONT_STORE   0
  38. #define IL_DONT_KILL    0
  39. #define IL_STORE        1
  40. #define IL_KILL         2
  41.  
  42.  
  43. /* Some #defines used in external input line interfaces.  */
  44. #define IL_FREEZED       0
  45. #define IL_EDIT          1
  46. #define IL_MOVE          2
  47. #define IL_BEEP          4
  48. #define IL_ERROR         8
  49. #define IL_SAVE         16
  50.  
  51. #define IL_ISEARCH_ACTION_FAILED       -1
  52. #define IL_ISEARCH_ACTION_NONE          0
  53. #define IL_ISEARCH_ACTION_DECREASE      1
  54. #define IL_ISEARCH_ACTION_RETRY         2
  55. #define IL_ISEARCH_ACTION_INCREASE      3
  56.  
  57. #define IL_UPDATE        1
  58.  
  59.  
  60. typedef struct
  61. {
  62.     window_t *win;
  63.     int echo;                   /* echo flag.  */
  64.     int error;                  /* use error-like output.  */
  65.     int last_operation;         /* last basic edit operation performed.  */
  66.     size_t point;               /* point position.  */
  67.     size_t mark;                /* mark position.  */
  68.     size_t columns;             /* number of columns.  */
  69.     size_t length;              /* total length of the input line.  */
  70.     size_t static_length;       /* static text length.  */
  71.     size_t dynamic_length;      /* dynamic text length.  */
  72.     size_t size;                /* current buffer size.  */
  73.     char *buffer;               /* buffer.  */
  74.     char *kill_ring;            /* the kill ring :-).  */
  75.     char *history_file;
  76. } input_line_t;
  77.  
  78.  
  79. extern input_line_t *il;
  80.  
  81. extern void il_free             PROTO ((input_line_t *));
  82. extern void il_init             PROTO ((size_t, size_t));
  83. extern void il_end             PROTO (());
  84. extern input_line_t *il_save         PROTO (());
  85. extern void il_restore             PROTO ((input_line_t *));
  86. extern int  il_echo             PROTO ((int));
  87. extern int  il_is_empty          PROTO (());
  88. extern void il_set_mark          PROTO (());
  89. extern void il_kill_region          PROTO (());
  90. extern void il_kill_ring_save          PROTO (());
  91. extern void il_yank              PROTO (());
  92. extern void il_exchange_point_and_mark     PROTO (());
  93. extern void il_backward_char         PROTO (());
  94. extern void il_forward_char         PROTO (());
  95. extern void il_backward_word         PROTO (());
  96. extern void il_forward_word         PROTO (());
  97. extern void il_beginning_of_line     PROTO (());
  98. extern void il_end_of_line         PROTO (());
  99. extern void il_insert_char         PROTO ((char));
  100. extern void il_delete_char         PROTO (());
  101. extern void il_backward_delete_char     PROTO (());
  102. extern void il_kill_word          PROTO (());
  103. extern void il_backward_kill_word     PROTO (());
  104. extern void il_reset_line         PROTO (());
  105. extern void il_kill_line         PROTO ((int));
  106. extern void il_kill_to_beginning_of_line PROTO (());
  107. extern void il_kill_to_end_of_line     PROTO (());
  108. extern void il_just_one_space         PROTO (());
  109. extern void il_delete_horizontal_space     PROTO (());
  110. extern void il_downcase_word         PROTO (());
  111. extern void il_upcase_word         PROTO (());
  112. extern void il_capitalize_word         PROTO (());
  113. extern void il_set_static_text         PROTO ((char *));
  114. extern void il_insert_text         PROTO ((char *));
  115. extern void il_update_point         PROTO (());
  116. extern void il_update             PROTO (());
  117. extern void il_full_update         PROTO (());
  118. extern int  il_get_contents         PROTO ((char **));
  119. extern void il_message             PROTO ((char *));
  120. extern void il_set_error_flag         PROTO ((int));
  121. extern void il_history             PROTO ((int));
  122.  
  123.  
  124. #endif  /* _GIT_INPUTLINE_H */
  125.