#include #include #include #include "apr_file_io.h" #include "apr_general.h" int main(int argc, char *argv[]) { ap_file_t *fd = NULL; char ch; int status = 0; ap_context_t *context; ap_create_context(&context, NULL); ap_open(&fd, argv[1], APR_READ, -1, context); while (!status) { status = ap_getc(&ch, fd); if (status == APR_EOF ) fprintf(stdout, "EOF, YEAH!!!!!!!!!\n"); else if (status == APR_SUCCESS) fprintf(stdout, "%c", ch); else fprintf(stdout, " Big error, NOooooooooo!\n"); } return 1; }