/***************************************************************************\
	mined text editor
	include file for file handling functions
\***************************************************************************/

#define empty_buffer_name "[no file]"


extern int panicwrite _((void));

extern FLAG checkoverwrite _((char *));

extern int fnami;			/* Parameter index of current file name */
extern int fnami_min, fnami_max;
extern char * * fnamv;			/* Copy of argv, points to program params */

extern FLAG overwriteOK;	/* Set if current file is OK for overwrite */
extern char * default_text_encoding;

extern void view_help _((char * helpfile, char * item));

extern void load_file _((char * file, FLAG with_display));
extern void load_wild_file _((char * file, FLAG with_display));
extern void nextfile _((FLAG exitiflast));
extern int write_text _((FLAG forceflag));
extern void edit_nth_file _((int));
extern FLAG save_text_load_file _((char * filename));
extern lineend_type extract_lineend_type _((char *, int));

extern void reset_get_line _((FLAG from_text_file /* consider UTF-16 ? */));
extern int get_line _((int fd, char * buffer, int * len, FLAG do_auto_detect));
extern void show_get_l_errors _((void));

extern int writechar _((int fd, char));
extern int write_lineend _((int fd, lineend_type return_type, FLAG handle_utf16));

extern FLAG viewing_help;

extern char * basename _((char * s));


/* options */
extern FLAG init_viewonly;	/* Set with option v */
extern char * preselect_quote_style;

extern FLAG lineends_LFtoCRLF;
extern FLAG lineends_CRLFtoLF;
extern FLAG lineends_detectCR;
extern FLAG lineends_CRtoLF;


/***************************************************************************\
	end
\***************************************************************************/
