home *** CD-ROM | disk | FTP | other *** search
/ Black Box 4 / BlackBox.cdr / editors / tde150.arj / TDEFUNC.H < prev    next >
Text File  |  1992-04-01  |  11KB  |  320 lines

  1. /*
  2.  * New editor name:  tde, the Thomson-Davis Editor.
  3.  * Author:           Frank Davis
  4.  * Date:             June 5, 1991
  5.  *
  6.  * This modification of Douglas Thomson's code is released into the
  7.  * public domain, Frank Davis.  You may distribute it freely.
  8.  *
  9.  * This file contains all prototypes for every function in tde.  It should
  10.  * be included in every source code module.
  11.  */
  12.  
  13. /*************************  function prototypes in block.c *************/
  14. void mark_block( WINDOW * );
  15. void unmark_block( WINDOW * );
  16. void restore_marked_block( WINDOW *, int );
  17. int  prepare_block( WINDOW *, text_ptr, int, int );
  18. void pad_dest_line( WINDOW *, file_infos *, text_ptr );
  19. void move_copy_delete_overlay_block( WINDOW * );
  20. void load_box_buff( char *, text_ptr, int, int );
  21. int  copy_buff_2file( WINDOW *, char *, text_ptr, int, int, int );
  22. void block_fill( char *, int, int );
  23. void number_block_buff( char *, int, long, int );
  24. void restore_start_end( file_infos *, file_infos *, long, long, int );
  25. void restore_cursors( file_infos *, file_infos * );
  26. void delete_box_block( WINDOW *, text_ptr, int, int, int );
  27. void check_block( void );
  28. void find_begblock( file_infos * );
  29. void find_endblock( file_infos * );
  30. void block_write( WINDOW * );
  31. void block_print( WINDOW * );
  32. int  get_block_fill_char( WINDOW *, int * );
  33. int  get_block_numbers( WINDOW *, long *, long *, int * );
  34. void block_expand_tabs( WINDOW * );
  35. void block_trim_trailing( WINDOW * );
  36. void block_convert_case( WINDOW * );
  37. /************************************************************************/
  38.  
  39.  
  40. /*************************  function prototypes in dirlist.c *************/
  41. void dir_help( WINDOW * );
  42. int  validate_path( char *, char * );
  43. int  list_and_pick( char *, char *, WINDOW * );
  44. void setup_directory_window( DIRECTORY *, int );
  45. void recalculate_dir( DIRECTORY *, FTYPE *, int );
  46. void write_directory_list( FTYPE *, DIRECTORY );
  47. int  select_file( FTYPE *, char *, DIRECTORY * );
  48. void shell_sort( FTYPE *, int );
  49. int  get_current_directory( char far *, int );
  50. int  set_current_directory( char far * );
  51. void hlight_line( int, int, int, int );
  52. /************************************************************************/
  53.  
  54.  
  55. /*************************  function prototypes in ed.c *****************/
  56. void tab_key( WINDOW * );
  57. void backtab( WINDOW * );
  58. void insert_newline( WINDOW * );
  59. void insert_overwrite( WINDOW * );
  60. void join_line( WINDOW * );
  61. void dup_line( WINDOW * );
  62. void word_delete( WINDOW * );
  63. void back_space( WINDOW * );
  64. void line_kill( WINDOW * );
  65. void char_del_under( WINDOW * );
  66. void eol_kill( WINDOW * );
  67. void undo_line( WINDOW * );
  68. void undo( WINDOW * );
  69. void beg_next_line( WINDOW *window );
  70. void next_line( WINDOW *window );
  71. void home( WINDOW * );
  72. void goto_right( WINDOW * );
  73. void goto_top( WINDOW * );
  74. void goto_bottom( WINDOW * );
  75. void set_tabstop( WINDOW * );
  76. void show_line_col( WINDOW * );
  77. void show_asterisk( WINDOW * );
  78. void toggle_overwrite( WINDOW * );
  79. void toggle_indent( WINDOW * );
  80. void set_left_margin( WINDOW * );
  81. void set_right_margin( WINDOW * );
  82. void set_paragraph_margin( WINDOW * );
  83. void toggle_ww( WINDOW * );
  84. void toggle_af( WINDOW * );
  85. void toggle_crlf( WINDOW * );
  86. void toggle_trailing( WINDOW * );
  87. void toggle_z( WINDOW * );
  88. void toggle_eol( WINDOW * );
  89. void toggle_search_case( WINDOW * );
  90. void toggle_sync( WINDOW * );
  91. void toggle_ruler( WINDOW * );
  92. void sync( WINDOW * );
  93. void editor( void );
  94. void display_dirty_windows( WINDOW * );
  95. void play_back( WINDOW * );
  96. /************************************************************************/
  97.  
  98.  
  99. /*************************  function prototypes in findrep.c ************/
  100. int  get_replacement_flags( int );
  101. int  ask_replace( WINDOW *, int * );
  102. int  ask_wrap_replace( WINDOW *, int * );
  103. void do_replace( WINDOW *, text_ptr, int );
  104. void find_string( WINDOW * );
  105. void build_boyer_array( void );
  106. text_ptr  forward_boyer_moore_search( WINDOW * );
  107. text_ptr  search_forward( text_ptr, long );
  108. text_ptr  backward_boyer_moore_search( WINDOW * );
  109. text_ptr  search_backward( text_ptr, long );
  110. void show_search_message( int, int );
  111. void find_adjust( WINDOW *, text_ptr );
  112. void replace_string( WINDOW * );
  113. int  replace_and_display( WINDOW *, text_ptr, int *, int *, int );
  114. void goto_top_file( WINDOW * );
  115. void goto_end_file( WINDOW * );
  116. text_ptr  scan_forward( text_ptr, char, char );
  117. text_ptr  scan_backward( text_ptr, char, char );
  118. void match_pair( WINDOW * );
  119. void goto_line( WINDOW * );
  120. /************************************************************************/
  121.  
  122.  
  123. /*************************  function prototypes in main.c  **************/
  124. void main( int, char *[] );
  125. void error( int, int, char * );
  126. #if defined( __MSC__ )
  127. int  interrupt far harmless( void );
  128. #else
  129. static int harmless( void );
  130. #endif
  131. void terminate( void );
  132. void hw_initialize( void );
  133. void video_config( struct vcfg *cfg );
  134. void set_cursor_size( int );
  135. void hw_move( text_ptr, text_ptr, long );
  136. int  hw_fattrib( char * );
  137. int  change_mode( char *, int );
  138. int  write_file( char *, char *, text_ptr, text_ptr, int );
  139. int  hw_save( char *, text_ptr, text_ptr, int );
  140. int  hw_append( char *, text_ptr, text_ptr, int );
  141. int  hw_load( char *, text_ptr, text_ptr, text_ptr *, int );
  142. void get_help( WINDOW * );
  143. void save_screen( void );
  144. void restore_screen( void );
  145. void show_credits( void );
  146. int  getkey( void );
  147. int  getfunc( int );
  148. void record_on_off( WINDOW * );
  149. void record_keys( int );
  150. void show_avail_strokes( void );
  151. void save_strokes( WINDOW * );
  152. void load_strokes( WINDOW * );
  153. void clear_macros( WINDOW * );
  154. void connect_macros( void );
  155. int  findfirst( DTA far *, char far *, int );
  156. int  findnext( DTA far * );
  157. /************************************************************************/
  158.  
  159.  
  160. /*************************  function prototypes in hwind.c **************/
  161. void xygoto( int, int );
  162. void save_screen_line( int, int, char * );
  163. void restore_screen_line( int, int, char * );
  164. void cls( void );
  165. void initialize( void );
  166. void show_end_mem( void );
  167. void show_end_text( WINDOW * );
  168. void show_modes( void );
  169. void show_file_count( int );
  170. void show_window_count( int );
  171. void show_avail_mem( void );
  172. void show_indent_mode( void );
  173. void show_search_case( void );
  174. void show_sync_mode( void );
  175. void show_wordwrap_mode( void );
  176. void show_crlf_mode( void );
  177. void show_trailing( void );
  178. void show_control_z( void );
  179. void show_insert_mode( void );
  180. void my_scroll_down( WINDOW * );
  181. void combine_strings( char *, char *, char *, char * );
  182. void make_ruler( WINDOW * );
  183. void show_ruler( WINDOW * );
  184. void show_ruler_char( WINDOW * );
  185. void show_ruler_pointer( WINDOW * );
  186. void show_all_rulers( void );
  187. /************************************************************************/
  188.  
  189.  
  190. /*************************  function prototypes in utils.c **************/
  191. int  myisalnum( int );
  192. void check_virtual_col( WINDOW *, int, int );
  193. void copy_line( text_ptr, int );
  194. void un_copy_line( text_ptr, WINDOW *, int );
  195. void load_undo_buffer( text_ptr );
  196. int  load_file( char * );
  197. void set_prompt( char *, int );
  198. int  get_name( char *, int, char *, int );
  199. int  get_yn( void );
  200. int  get_lr( void );
  201. int  get_oa( void );
  202. void show_eof( WINDOW * );
  203. void display_current_window( WINDOW * );
  204. void redraw_screen( WINDOW * );
  205. void redraw_current_window( WINDOW * );
  206. void show_changed_line( WINDOW * );
  207. void show_curl_line( WINDOW * );
  208. void dup_window_info( WINDOW *, WINDOW * );
  209. void addorsub_all_cursors( WINDOW *, long );
  210. void adjust_windows_cursor( WINDOW *, int );
  211. void adjust_start_end( file_infos *, long );
  212. int  first_non_blank( char far * );
  213. int  is_line_blank( char far * );
  214. void page_up( WINDOW * );
  215. void page_down( WINDOW * );
  216. void scroll_down( WINDOW * );
  217. void scroll_up( WINDOW * );
  218. void fixed_scroll_up( WINDOW * );
  219. void fixed_scroll_down( WINDOW * );
  220. void file_file( WINDOW * );
  221. int  save_file( WINDOW * );
  222. int  save_backup( WINDOW * );
  223. int  write_to_disk( WINDOW *, char * );
  224. int  save_as_file( WINDOW * );
  225. void show_window_header( WINDOW * );
  226. void show_window_number_letter( WINDOW * );
  227. void show_window_fname( WINDOW * );
  228. void show_size_name( WINDOW * );
  229. void show_size( WINDOW * );
  230. void quit( WINDOW * );
  231. void move_up( WINDOW * );
  232. void move_down( WINDOW * );
  233. void move_left( WINDOW * );
  234. void move_right( WINDOW * );
  235. void scroll_left( WINDOW * );
  236. void scroll_right( WINDOW * );
  237. void word_left( WINDOW * );
  238. void word_right( WINDOW * );
  239. void center_window( WINDOW * );
  240. void horizontal_screen_right( WINDOW * );
  241. void horizontal_screen_left( WINDOW * );
  242. void set_marker( WINDOW * );
  243. void goto_marker( WINDOW * );
  244. void change_fattr( WINDOW * );
  245. /************************************************************************/
  246.  
  247.  
  248. /*************************  function prototypes in window.c *************/
  249. int  initialize_window( void );
  250. void choose_window( char *, WINDOW * );
  251. void next_window( WINDOW * );
  252. void prev_window( WINDOW * );
  253. void split_horizontal( WINDOW * );
  254. void split_vertical( WINDOW * );
  255. void show_vertical_separator( WINDOW * );
  256. void size_window( WINDOW * );
  257. void zoom_window( WINDOW * );
  258. void next_hidden_window( WINDOW * );
  259. void setup_window( WINDOW * );
  260. void finish( WINDOW * );
  261. int  create_window( WINDOW **, int, int, int, int, file_infos * );
  262. int  edit_file( char * );
  263. void edit_another_file( WINDOW * );
  264. int  edit_next_file( WINDOW * );
  265. int  attempt_edit_display( char *, int );
  266. void make_backup_fname( file_infos * );
  267. /************************************************************************/
  268.  
  269.  
  270. /**********************  function prototypes in wordwrap.c **************/
  271. void word_wrap( WINDOW * );
  272. void format_paragraph( WINDOW *window );
  273. void combine_wrap_spill( WINDOW *, int, int, int );
  274. int find_word( text_ptr, int );
  275. void left_justify( WINDOW * );
  276. void right_justify( WINDOW * );
  277. void center_justify( WINDOW * );
  278. /************************************************************************/
  279.  
  280.  
  281. /*************************  function prototypes in tdeasm.c *************/
  282. text_ptr cpf( text_ptr );
  283. text_ptr cpb( text_ptr );
  284. unsigned long ptoul( void far * );
  285. text_ptr nptos( text_ptr );
  286. text_ptr addltop( long, text_ptr );
  287. int  find_CONTROL_Z( text_ptr );
  288. int  linelen( text_ptr );
  289. text_ptr  find_next( text_ptr );
  290. text_ptr  find_prev( text_ptr );
  291. void update_line( WINDOW * );
  292. void c_output( int, int, int, int );
  293. void s_output( char far *, int, int, int );
  294. void eol_clear( int, int, int );
  295. void window_eol_clear( WINDOW *, int );
  296. void upper_asm( text_ptr, unsigned );
  297. void lower_asm( text_ptr, unsigned );
  298. void strip_asm( text_ptr, unsigned );
  299. int  get_fattr( char far *, int * );
  300. int  set_fattr( char far *, int );
  301. /*****************************************************/
  302.  
  303.  
  304. /***********  function prototype for simul101.asm *************/
  305. void far simulate_enh_kbd( int );
  306. /*****************************************************/
  307.  
  308.  
  309. /***********  function prototype for criterr.asm *************/
  310. void far install_ceh( void far * );
  311. /*****************************************************/
  312.  
  313.  
  314. /***********  function prototype for criterr.c   *************/
  315. int  far crit_err_handler( void );
  316. void show_error_screen( int, int );
  317. void save_area( void far * );
  318. void restore_area( void far * );
  319. /*****************************************************/
  320.