home *** CD-ROM | disk | FTP | other *** search
/ Linux Cubed Series 3: Developer Tools / Linux Cubed Series 3 - Developer Tools.iso / utils / file / managers / git-4.3 / git-4 / git-4.3.7 / src / inputline.h < prev    next >
Encoding:
C/C++ Source or Header  |  1995-07-08  |  3.8 KB  |  124 lines

  1. /* inputline.h -- prototypes for the functions in inputline.c. */
  2.  
  3. /* Copyright (C) 1993, 1994, 1995 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 __P((input_line_t *));
  82.  
  83. extern void il_init __P((size_t, size_t));
  84. extern void il_end __P(());
  85.  
  86. extern input_line_t *il_save __P(());
  87. extern void il_restore __P((input_line_t *));
  88.  
  89. extern int  il_echo __P((int));
  90. extern int  il_is_empty __P(());
  91. extern void il_set_mark __P(());
  92. extern void il_kill_region __P(());
  93. extern void il_kill_ring_save __P(());
  94. extern void il_yank __P(());
  95. extern void il_exchange_point_and_mark __P(());
  96. extern void il_backward_char __P(());
  97. extern void il_forward_char __P(());
  98. extern void il_backward_word __P(());
  99. extern void il_forward_word __P(());
  100. extern void il_beginning_of_line __P(());
  101. extern void il_end_of_line __P(());
  102. extern void il_insert_char __P((char));
  103. extern void il_delete_char __P(());
  104. extern void il_backward_delete_char __P(());
  105. extern void il_backward_kill_word __P(());
  106. extern void il_reset_line __P(());
  107. extern void il_kill_line __P((int));
  108. extern void il_kill_to_beginning_of_line __P(());
  109. extern void il_kill_to_end_of_line __P(());
  110. extern void il_just_one_space __P(());
  111. extern void il_delete_horizontal_space __P(());
  112. extern void il_set_static_text __P((char *));
  113. extern void il_insert_text __P((char *));
  114. extern void il_update_point __P(());
  115. extern void il_update __P(());
  116. extern void il_full_update __P(());
  117. extern int  il_get_contents __P((char **));
  118. extern void il_message __P((char *));
  119. extern void il_set_error_flag __P((int));
  120. extern void il_history __P((int));
  121.  
  122.  
  123. #endif  /* _GIT_INPUTLINE_H */
  124.