-extern char *get_line_from_file(FILE *file);
-extern void print_file(FILE *file);
-extern int copyfd(int fd1, int fd2, const off_t chunksize);
-extern int print_file_by_name(char *filename);
-extern char process_escape_sequence(const char **ptr);
-extern char *get_last_path_component(char *path);
-extern FILE *wfopen(const char *path, const char *mode);
-extern FILE *xfopen(const char *path, const char *mode);
+extern char *bb_get_line_from_file(FILE *file);
+extern char *bb_get_chomped_line_from_file(FILE *file);
+extern int bb_copyfd(int fd1, int fd2, const off_t chunksize);
+extern void bb_xprint_and_close_file(FILE *file);
+extern int bb_xprint_file_by_name(const char *filename);
+extern char bb_process_escape_sequence(const char **ptr);
+extern char *bb_get_last_path_component(char *path);
+extern FILE *bb_wfopen(const char *path, const char *mode);
+extern FILE *bb_xfopen(const char *path, const char *mode);
+
+//#warning rename?
+extern int bb_fclose_nonstdin(FILE *f);
+extern void bb_fflush_stdout_and_exit(int retval) __attribute__ ((noreturn));
+
+extern const char *bb_opt_complementaly;
+extern const struct option *bb_applet_long_options;
+extern unsigned long bb_getopt_ulflags(int argc, char **argv, const char *applet_opts, ...);
+
+//#warning rename?
+extern FILE *bb_wfopen_input(const char *filename);
+
+extern int bb_vfprintf(FILE * __restrict stream, const char * __restrict format,
+ va_list arg) __attribute__ ((format (printf, 2, 0)));
+extern int bb_vprintf(const char * __restrict format, va_list arg)
+ __attribute__ ((format (printf, 1, 0)));
+extern int bb_fprintf(FILE * __restrict stream, const char * __restrict format, ...)
+ __attribute__ ((format (printf, 2, 3)));
+extern int bb_printf(const char * __restrict format, ...)
+ __attribute__ ((format (printf, 1, 2)));
+
+//#warning rename to xferror_filename?
+extern void bb_xferror(FILE *fp, const char *fn);
+extern void bb_xferror_stdout(void);
+extern void bb_xfflush_stdout(void);
+
+extern void bb_warn_ignoring_args(int n);
+