home *** CD-ROM | disk | FTP | other *** search
/ Shareware 1 2 the Maxx / sw_1.zip / sw_1 / EDITORS / TDE20.ZIP / TDEFUNC.H < prev    next >
Text File  |  1992-06-05  |  12KB  |  340 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. int  mark_block( WINDOW * );
  15. int  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. int  move_copy_delete_overlay_block( WINDOW * );
  20. void load_box_buff( char *, text_ptr, int, int, char );
  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. int  block_write( WINDOW * );
  31. int  block_print( WINDOW * );
  32. int  get_block_fill_char( WINDOW *, int * );
  33. int  get_block_numbers( WINDOW *, long *, long *, int * );
  34. int  block_expand_tabs( WINDOW * );
  35. int  block_trim_trailing( WINDOW * );
  36. int  block_convert_case( WINDOW * );
  37. int  sort_box_block( WINDOW *window );
  38. void insertion_sort_block( unsigned int, unsigned int, int );
  39. text_ptr set_sort_begin( unsigned int );
  40. text_ptr swap_lines( text_ptr, text_ptr );
  41. void slide_down( text_ptr, text_ptr );
  42. void load_pivot( text_ptr );
  43. int  compare_pivot( text_ptr );
  44. /************************************************************************/
  45.  
  46.  
  47. /*************************  function prototypes in dirlist.c *************/
  48. int  dir_help( WINDOW * );
  49. int  validate_path( char *, char * );
  50. int  list_and_pick( char *, char *, WINDOW * );
  51. void setup_directory_window( DIRECTORY *, int );
  52. void recalculate_dir( DIRECTORY *, FTYPE *, int );
  53. void write_directory_list( FTYPE *, DIRECTORY );
  54. int  select_file( FTYPE *, char *, DIRECTORY * );
  55. void shell_sort( FTYPE *, int );
  56. /************************************************************************/
  57.  
  58.  
  59. /*************************  function prototypes in ed.c *****************/
  60. int  tab_key( WINDOW * );
  61. int  backtab( WINDOW * );
  62. int  next_smart_tab( WINDOW * );
  63. int  prev_smart_tab( WINDOW * );
  64. int  insert_newline( WINDOW * );
  65. int  insert_overwrite( WINDOW * );
  66. int  join_line( WINDOW * );
  67. int  dup_line( WINDOW * );
  68. int  word_delete( WINDOW * );
  69. int  back_space( WINDOW * );
  70. int  line_kill( WINDOW * );
  71. int  char_del_under( WINDOW * );
  72. int  eol_kill( WINDOW * );
  73. int  undo_line( WINDOW * );
  74. int  undo( WINDOW * );
  75. int  beg_next_line( WINDOW *window );
  76. int  next_line( WINDOW *window );
  77. int  home( WINDOW * );
  78. int  goto_eol( WINDOW * );
  79. int  goto_top( WINDOW * );
  80. int  goto_bottom( WINDOW * );
  81. int  set_tabstop( WINDOW * );
  82. void show_line_col( WINDOW * );
  83. void show_asterisk( WINDOW * );
  84. int  toggle_overwrite( WINDOW * );
  85. int  toggle_smart_tabs( WINDOW * );
  86. int  toggle_indent( WINDOW * );
  87. int  set_left_margin( WINDOW * );
  88. int  set_right_margin( WINDOW * );
  89. int  set_paragraph_margin( WINDOW * );
  90. int  toggle_ww( WINDOW * );
  91. int  toggle_crlf( WINDOW * );
  92. int  toggle_trailing( WINDOW * );
  93. int  toggle_z( WINDOW * );
  94. int  toggle_eol( WINDOW * );
  95. int  toggle_search_case( WINDOW * );
  96. int  toggle_sync( WINDOW * );
  97. int  toggle_ruler( WINDOW * );
  98. void sync( WINDOW * );
  99. void editor( void );
  100. void display_dirty_windows( WINDOW * );
  101. void show_dirty_window( WINDOW * );
  102. int  play_back( WINDOW * );
  103. int  pause( WINDOW * );
  104. /************************************************************************/
  105.  
  106.  
  107. /*************************  function prototypes in findrep.c ************/
  108. int  get_replacement_flags( int );
  109. int  ask_replace( WINDOW *, int * );
  110. int  ask_wrap_replace( WINDOW *, int * );
  111. void do_replace( WINDOW *, text_ptr, int );
  112. int  find_string( WINDOW * );
  113. void build_boyer_array( void );
  114. text_ptr  forward_boyer_moore_search( WINDOW * );
  115. text_ptr  search_forward( text_ptr, long );
  116. text_ptr  backward_boyer_moore_search( WINDOW * );
  117. text_ptr  search_backward( text_ptr, long );
  118. void show_search_message( int, int );
  119. void find_adjust( WINDOW *, text_ptr );
  120. int  replace_string( WINDOW * );
  121. int  replace_and_display( WINDOW *, text_ptr, int *, int *, int );
  122. int  goto_top_file( WINDOW * );
  123. int  goto_end_file( WINDOW * );
  124. text_ptr  scan_forward( text_ptr, char, char, int * );
  125. text_ptr  scan_backward( text_ptr, char, char, int * );
  126. int  match_pair( WINDOW * );
  127. int  goto_line( WINDOW * );
  128. /************************************************************************/
  129.  
  130.  
  131. /*************************  function prototypes in main.c  **************/
  132. void main( int, char *[] );
  133. void error( int, int, char * );
  134. #if defined( __MSC__ )
  135. void interrupt far harmless( void );
  136. void interrupt far ctrl_break( void );
  137. #else
  138. static int harmless( void );
  139. #endif
  140. void terminate( void );
  141. void hw_initialize( void );
  142. void video_config( struct vcfg *cfg );
  143. void hw_move( text_ptr, text_ptr, long );
  144. int  hw_fattrib( char * );
  145. int  change_mode( char *, int );
  146. int  write_file( char *, char *, text_ptr, text_ptr, int );
  147. int  hw_save( char *, text_ptr, text_ptr, int );
  148. int  hw_append( char *, text_ptr, text_ptr, int );
  149. int  hw_load( char *, text_ptr, text_ptr, text_ptr *, int );
  150. int  get_help( WINDOW * );
  151. void save_screen( void );
  152. void restore_screen( void );
  153. void show_credits( void );
  154. int  getkey( void );
  155. int  getfunc( int );
  156. int  record_on_off( WINDOW * );
  157. void record_keys( int );
  158. void show_avail_strokes( void );
  159. int  save_strokes( WINDOW * );
  160. int  load_strokes( WINDOW * );
  161. int  clear_macros( WINDOW * );
  162. void connect_macros( void );
  163. /************************************************************************/
  164.  
  165.  
  166. /*************************  function prototypes in hwind.c **************/
  167. void get_date( int *, int *, int *, int * );
  168. void get_time( int *, int *, int *, int * );
  169. void xygoto( int, int );
  170. void save_screen_line( int, int, char * );
  171. void restore_screen_line( int, int, char * );
  172. void initialize( void );
  173. void show_end_mem( void );
  174. void show_end_text( WINDOW * );
  175. void show_modes( void );
  176. void show_file_count( int );
  177. void show_window_count( int );
  178. void show_avail_mem( void );
  179. void show_smarttab_mode( void );
  180. void show_indent_mode( void );
  181. void show_search_case( void );
  182. void show_sync_mode( void );
  183. void show_wordwrap_mode( void );
  184. void show_crlf_mode( void );
  185. void show_trailing( void );
  186. void show_control_z( void );
  187. void show_insert_mode( void );
  188. void my_scroll_down( WINDOW * );
  189. void combine_strings( char *, char *, char *, char * );
  190. void make_ruler( WINDOW * );
  191. void show_ruler( WINDOW * );
  192. void show_ruler_char( WINDOW * );
  193. void show_ruler_pointer( WINDOW * );
  194. void show_all_rulers( void );
  195. /************************************************************************/
  196.  
  197.  
  198. /*************************  function prototypes in utils.c **************/
  199. int  myisalnum( int );
  200. void check_virtual_col( WINDOW *, int, int );
  201. void copy_line( text_ptr, int );
  202. void un_copy_line( text_ptr, WINDOW *, int );
  203. void load_undo_buffer( text_ptr );
  204. int  load_file( char * );
  205. void set_prompt( char *, int );
  206. int  get_name( char *, int, char *, int );
  207. int  get_sort_order( WINDOW * );
  208. int  get_yn( void );
  209. int  get_lr( void );
  210. int  get_oa( void );
  211. void show_eof( WINDOW * );
  212. void display_current_window( WINDOW * );
  213. int  redraw_screen( WINDOW * );
  214. void redraw_current_window( WINDOW * );
  215. void show_changed_line( WINDOW * );
  216. void show_curl_line( WINDOW * );
  217. void dup_window_info( WINDOW *, WINDOW * );
  218. void addorsub_all_cursors( WINDOW *, long );
  219. void adjust_windows_cursor( WINDOW *, int );
  220. void adjust_start_end( file_infos *, long );
  221. int  first_non_blank( char far * );
  222. int  is_line_blank( char far * );
  223. int  page_up( WINDOW * );
  224. int  page_down( WINDOW * );
  225. int  scroll_down( WINDOW * );
  226. int  scroll_up( WINDOW * );
  227. int  fixed_scroll_up( WINDOW * );
  228. int  fixed_scroll_down( WINDOW * );
  229. int  file_file( WINDOW * );
  230. int  save_file( WINDOW * );
  231. int  save_backup( WINDOW * );
  232. int  write_to_disk( WINDOW *, char * );
  233. int  save_as_file( WINDOW * );
  234. void show_window_header( WINDOW * );
  235. void show_window_number_letter( WINDOW * );
  236. void show_window_fname( WINDOW * );
  237. void show_size_name( WINDOW * );
  238. void show_size( WINDOW * );
  239. int  quit( WINDOW * );
  240. int  move_up( WINDOW * );
  241. int  move_down( WINDOW * );
  242. int  prepare_move_down( WINDOW * );
  243. int  move_left( WINDOW * );
  244. int  move_right( WINDOW * );
  245. int  scroll_left( WINDOW * );
  246. int  scroll_right( WINDOW * );
  247. int  word_left( WINDOW * );
  248. int  word_right( WINDOW * );
  249. int  center_window( WINDOW * );
  250. int  horizontal_screen_right( WINDOW * );
  251. int  horizontal_screen_left( WINDOW * );
  252. int  set_marker( WINDOW * );
  253. int  goto_marker( WINDOW * );
  254. int  change_fattr( WINDOW * );
  255. int  date_time_stamp( WINDOW * );
  256. int  add_chars( char *, WINDOW * );
  257. /************************************************************************/
  258.  
  259.  
  260. /*************************  function prototypes in window.c *************/
  261. int  initialize_window( void );
  262. void choose_window( char *, WINDOW * );
  263. int  next_window( WINDOW * );
  264. int  prev_window( WINDOW * );
  265. int  split_horizontal( WINDOW * );
  266. int  split_vertical( WINDOW * );
  267. void show_vertical_separator( WINDOW * );
  268. int  size_window( WINDOW * );
  269. int  zoom_window( WINDOW * );
  270. int  next_hidden_window( WINDOW * );
  271. void setup_window( WINDOW * );
  272. void finish( WINDOW * );
  273. int  create_window( WINDOW **, int, int, int, int, file_infos * );
  274. int  edit_file( char * );
  275. int  edit_another_file( WINDOW * );
  276. int  edit_next_file( WINDOW * );
  277. int  attempt_edit_display( char *, int );
  278. void make_backup_fname( file_infos * );
  279. /************************************************************************/
  280.  
  281.  
  282. /**********************  function prototypes in wordwrap.c **************/
  283. int  find_left_margin( text_ptr, int );
  284. void word_wrap( WINDOW * );
  285. int  format_paragraph( WINDOW *window );
  286. void combine_wrap_spill( WINDOW *, int, int, int );
  287. int find_word( text_ptr, int );
  288. int  left_justify( WINDOW * );
  289. int  right_justify( WINDOW * );
  290. int  center_justify( WINDOW * );
  291. /************************************************************************/
  292.  
  293.  
  294. /*************************  function prototypes in tdeasm.c *************/
  295. text_ptr cpf( text_ptr );
  296. text_ptr cpb( text_ptr );
  297. unsigned long  ptoul( void far * );
  298. text_ptr nptos( text_ptr );
  299. text_ptr addltop( long, text_ptr );
  300. unsigned int find_CONTROL_Z( text_ptr );
  301. unsigned int linelen( text_ptr );
  302. text_ptr find_next( text_ptr );
  303. text_ptr find_prev( text_ptr );
  304. void update_line( WINDOW * );
  305. void c_output( int, int, int, int );
  306. void s_output( char far *, int, int, int );
  307. void eol_clear( int, int, int );
  308. void window_eol_clear( WINDOW *, int );
  309. void upper_asm( text_ptr, unsigned );
  310. void lower_asm( text_ptr, unsigned );
  311. void strip_asm( text_ptr, unsigned );
  312. int  get_fattr( char far *, int * );
  313. int  set_fattr( char far *, int );
  314. int  get_current_directory( char far *, int );
  315. int  set_current_directory( char far * );
  316. void hlight_line( int, int, int, int );
  317. void cls( void );
  318. void set_cursor_size( int );
  319. int  findfirst( DTA far *, char far *, int );
  320. int  findnext( DTA far * );
  321. /*****************************************************/
  322.  
  323.  
  324. /***********  function prototype for simul101.asm *************/
  325. void far simulate_enh_kbd( int );
  326. /*****************************************************/
  327.  
  328.  
  329. /***********  function prototype for criterr.asm *************/
  330. void far install_ceh( void far * );
  331. /*****************************************************/
  332.  
  333.  
  334. /***********  function prototype for criterr.c   *************/
  335. int  far crit_err_handler( void );
  336. void show_error_screen( int, int );
  337. void save_area( void far * );
  338. void restore_area( void far * );
  339. /*****************************************************/
  340.