blob: 0c5b22b8790a792489bb0b195d10101f462c41c4 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
#include <stdio.h>
#include <fcntl.h>
#include <sys/types.h>
#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;
}
|