diff options
| author | Denis Vlasenko <vda.linux@googlemail.com> | 2006-10-26 23:25:17 +0000 |
|---|---|---|
| committer | Denis Vlasenko <vda.linux@googlemail.com> | 2006-10-26 23:25:17 +0000 |
| commit | ddec5af6b0803c7434a1cc2fdee5cb9873fe6bd0 (patch) | |
| tree | f4f2aa58fa669aed6e2c50bb7aa648a79ec1873d /include | |
| parent | f0ed376eda5d5c25d270e5100a881fb2d801bee6 (diff) | |
| download | busybox-w32-ddec5af6b0803c7434a1cc2fdee5cb9873fe6bd0.tar.gz busybox-w32-ddec5af6b0803c7434a1cc2fdee5cb9873fe6bd0.tar.bz2 busybox-w32-ddec5af6b0803c7434a1cc2fdee5cb9873fe6bd0.zip | |
rename functions to more understandable names
Diffstat (limited to 'include')
| -rw-r--r-- | include/libbb.h | 32 |
1 files changed, 17 insertions, 15 deletions
diff --git a/include/libbb.h b/include/libbb.h index f435a5915..da936d66e 100644 --- a/include/libbb.h +++ b/include/libbb.h | |||
| @@ -240,20 +240,29 @@ extern void erase_mtab(const char * name); | |||
| 240 | extern long *find_pid_by_name( const char* pidName); | 240 | extern long *find_pid_by_name( const char* pidName); |
| 241 | extern long *pidlist_reverse(long *pidList); | 241 | extern long *pidlist_reverse(long *pidList); |
| 242 | extern char *find_block_device(char *path); | 242 | extern char *find_block_device(char *path); |
| 243 | extern char *xmalloc_fgets(FILE *file); | ||
| 244 | /* Chops off '\n' from the end, unlike fgets: */ | ||
| 245 | extern char *xmalloc_getline(FILE *file); | ||
| 246 | extern char *bb_get_chunk_from_file(FILE *file, int *end); | ||
| 247 | extern off_t bb_copyfd_size(int fd1, int fd2, off_t size); | 243 | extern off_t bb_copyfd_size(int fd1, int fd2, off_t size); |
| 248 | extern off_t bb_copyfd_eof(int fd1, int fd2); | 244 | extern off_t bb_copyfd_eof(int fd1, int fd2); |
| 249 | extern char bb_process_escape_sequence(const char **ptr); | 245 | extern char bb_process_escape_sequence(const char **ptr); |
| 250 | extern char *bb_get_last_path_component(char *path); | 246 | extern char *bb_get_last_path_component(char *path); |
| 251 | extern FILE *bb_wfopen(const char *path, const char *mode); | ||
| 252 | extern FILE *bb_wfopen_input(const char *filename); | ||
| 253 | extern FILE *xfopen(const char *path, const char *mode); | ||
| 254 | 247 | ||
| 255 | extern int bb_fclose_nonstdin(FILE *f); | 248 | /* Prints to stdout closes entire FILE. Exits on error: */ |
| 249 | extern void xprint_and_close_file(FILE *file); | ||
| 250 | extern char *xmalloc_fgets(FILE *file); | ||
| 251 | /* /* Read up to (and including) TERMINATING_STRING: */ | ||
| 252 | extern char *xmalloc_fgets_str(FILE *file, const char *terminating_string); | ||
| 253 | /* Chops off '\n' from the end, unlike fgets: */ | ||
| 254 | extern char *xmalloc_getline(FILE *file); | ||
| 255 | extern char *bb_get_chunk_from_file(FILE *file, int *end); | ||
| 256 | extern void die_if_ferror(FILE *file, const char *msg); | ||
| 257 | extern void die_if_ferror_stdout(void); | ||
| 258 | extern void xfflush_stdout(void); | ||
| 256 | extern void fflush_stdout_and_exit(int retval) ATTRIBUTE_NORETURN; | 259 | extern void fflush_stdout_and_exit(int retval) ATTRIBUTE_NORETURN; |
| 260 | extern int fclose_if_not_stdin(FILE *file); | ||
| 261 | extern FILE *xfopen(const char *filename, const char *mode); | ||
| 262 | /* Prints warning to stderr and returns NULL on failure: */ | ||
| 263 | extern FILE *fopen_or_warn(const char *filename, const char *mode); | ||
| 264 | /* "Opens" stdin if filename is special, else just opens file: */ | ||
| 265 | extern FILE *fopen_or_warn_stdin(const char *filename); | ||
| 257 | 266 | ||
| 258 | extern void xstat(char *filename, struct stat *buf); | 267 | extern void xstat(char *filename, struct stat *buf); |
| 259 | extern int xsocket(int domain, int type, int protocol); | 268 | extern int xsocket(int domain, int type, int protocol); |
| @@ -278,10 +287,6 @@ extern const struct option *applet_long_options; | |||
| 278 | extern uint32_t option_mask32; | 287 | extern uint32_t option_mask32; |
| 279 | extern uint32_t getopt32(int argc, char **argv, const char *applet_opts, ...); | 288 | extern uint32_t getopt32(int argc, char **argv, const char *applet_opts, ...); |
| 280 | 289 | ||
| 281 | extern void die_if_ferror(FILE *fp, const char *fn); | ||
| 282 | extern void die_if_ferror_stdout(void); | ||
| 283 | extern void xfflush_stdout(void); | ||
| 284 | |||
| 285 | extern void bb_warn_ignoring_args(int n); | 290 | extern void bb_warn_ignoring_args(int n); |
| 286 | 291 | ||
| 287 | extern void chomp(char *s); | 292 | extern void chomp(char *s); |
| @@ -430,8 +435,6 @@ char *concat_path_file(const char *path, const char *filename); | |||
| 430 | char *concat_subpath_file(const char *path, const char *filename); | 435 | char *concat_subpath_file(const char *path, const char *filename); |
| 431 | char *last_char_is(const char *s, int c); | 436 | char *last_char_is(const char *s, int c); |
| 432 | 437 | ||
| 433 | char *fgets_str(FILE *file, const char *terminating_string); | ||
| 434 | |||
| 435 | int execable_file(const char *name); | 438 | int execable_file(const char *name); |
| 436 | char *find_execable(const char *filename); | 439 | char *find_execable(const char *filename); |
| 437 | int exists_execable(const char *filename); | 440 | int exists_execable(const char *filename); |
| @@ -577,7 +580,6 @@ void add_to_ino_dev_hashtable(const struct stat *statbuf, const char *name); | |||
| 577 | void reset_ino_dev_hashtable(void); | 580 | void reset_ino_dev_hashtable(void); |
| 578 | 581 | ||
| 579 | char *xasprintf(const char *format, ...) __attribute__ ((format (printf, 1, 2))); | 582 | char *xasprintf(const char *format, ...) __attribute__ ((format (printf, 1, 2))); |
| 580 | void xprint_and_close_file(FILE *file); | ||
| 581 | 583 | ||
| 582 | #define FAIL_DELAY 3 | 584 | #define FAIL_DELAY 3 |
| 583 | extern void bb_do_delay(int seconds); | 585 | extern void bb_do_delay(int seconds); |
