#ifndef _DECLARATIONS_H #define _DECLARATIONS_H /* linecut.c */ void usage (const char *); void version (const char *); /* engine.c */ void verify (data_t *, file_entry_t *); void extract (data_t *, file_entry_t *); /* getopts.c */ void getopts (data_t *, bool *, int); /* process.c */ unsigned long count_lines (FILE *); fpos_t *build_offset_map (data_t *); unsigned long map_stdin_lines (data_t *); void seek_to_start (data_t *); void seek_to_offset (data_t *, fpos_t *, long); void extract_range_file (data_t *, long, long); void extract_range_stdin (data_t *, long, long); /* util.c */ unsigned int int_length (unsigned long); bool is_char (char); void put (char); void put_newline (void); void print_line_number (data_t *, unsigned int); void range_to_absolute (long, long *); bool str_is_num (const char *); /* wrapper.c */ void error (const char *, ...); FILE *xfopen (const char *, const char *); void xfclose (const char *, FILE *); void *_xmalloc (size_t); void *_xcalloc (size_t, size_t); void *_xrealloc (void *, size_t); void _xfree (void **); #endif /* _DECLARATIONS_H */