Read a file line by line: Difference between revisions

m
added comments for heards outlining respective functions used in the code.
(Added uBasic/4tH version)
m (added comments for heards outlining respective functions used in the code.)
Line 1,014:
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h> /* C POSIX library file control options */
#include <unistd.h> /* C POSIX library system calls: open, close */
#include <sys/mman.h> /* memory management declarations: mmap, munmap */
#include <errno.h> /* Std C library system error numbers: errno */
#include <err.h> /* GNU C lib error messages: err */
 
int read_lines(const char * fname, int (*call_back)(const char*, const char*))