summaryrefslogtreecommitdiff
path: root/test/testpipe.c
diff options
context:
space:
mode:
authorDoug MacEachern <dougm@apache.org>2000-08-02 05:26:45 +0000
committerDoug MacEachern <dougm@apache.org>2000-08-02 05:26:45 +0000
commit1a1463dbfc6e28b6a5852142b0c87d4abe33c3d9 (patch)
tree4da0bfd73d36292921960aaabc877a57e680b8c4 /test/testpipe.c
parent4dd06339dd5b46bd735c56dc3738146416f52ccf (diff)
downloadapr-1a1463dbfc6e28b6a5852142b0c87d4abe33c3d9.tar.gz
prefix libapr functions and types with apr_
git-svn-id: https://svn.apache.org/repos/asf/apr/apr/trunk@60470 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'test/testpipe.c')
-rw-r--r--test/testpipe.c34
1 files changed, 17 insertions, 17 deletions
diff --git a/test/testpipe.c b/test/testpipe.c
index 91ec156a7..9075c056e 100644
--- a/test/testpipe.c
+++ b/test/testpipe.c
@@ -64,20 +64,20 @@
int main(void)
{
- ap_pool_t *context;
- ap_file_t *readp = NULL;
- ap_file_t *writep = NULL;
- ap_size_t nbytes;
- ap_status_t rv;
+ apr_pool_t *context;
+ apr_file_t *readp = NULL;
+ apr_file_t *writep = NULL;
+ apr_size_t nbytes;
+ apr_status_t rv;
char *buf;
char msgbuf[120];
- if (ap_initialize() != APR_SUCCESS) {
+ if (apr_initialize() != APR_SUCCESS) {
fprintf(stderr, "Couldn't initialize.");
exit(-1);
}
- atexit(ap_terminate);
- if (ap_create_pool(&context, NULL) != APR_SUCCESS) {
+ atexit(apr_terminate);
+ if (apr_create_pool(&context, NULL) != APR_SUCCESS) {
fprintf(stderr, "Couldn't allocate context.");
exit(-1);
}
@@ -85,9 +85,9 @@ int main(void)
fprintf(stdout, "Testing pipe functions.\n");
fprintf(stdout, "\tCreating pipes.......");
- if ((rv = ap_create_pipe(&readp, &writep, context)) != APR_SUCCESS) {
- fprintf(stderr, "ap_create_pipe()->%d/%s\n",
- rv, ap_strerror(rv, msgbuf, sizeof msgbuf));
+ if ((rv = apr_create_pipe(&readp, &writep, context)) != APR_SUCCESS) {
+ fprintf(stderr, "apr_create_pipe()->%d/%s\n",
+ rv, apr_strerror(rv, msgbuf, sizeof msgbuf));
exit(-1);
}
else {
@@ -95,18 +95,18 @@ int main(void)
}
fprintf(stdout, "\tSetting pipe timeout.......");
- if ((rv = ap_set_pipe_timeout(readp, 1 * AP_USEC_PER_SEC)) != APR_SUCCESS) {
- fprintf(stderr, "ap_set_pipe_timeout()->%d/%s\n",
- rv, ap_strerror(rv, msgbuf, sizeof msgbuf));
+ if ((rv = apr_set_pipe_timeout(readp, 1 * AP_USEC_PER_SEC)) != APR_SUCCESS) {
+ fprintf(stderr, "apr_set_pipe_timeout()->%d/%s\n",
+ rv, apr_strerror(rv, msgbuf, sizeof msgbuf));
exit(-1);
} else {
fprintf(stdout, "OK\n");
}
fprintf(stdout, "\tReading from the pipe.......");
- nbytes = (ap_ssize_t)strlen("this is a test");
- buf = (char *)ap_palloc(context, nbytes + 1);
- if (ap_read(readp, buf, &nbytes) == APR_TIMEUP) {
+ nbytes = (apr_ssize_t)strlen("this is a test");
+ buf = (char *)apr_palloc(context, nbytes + 1);
+ if (apr_read(readp, buf, &nbytes) == APR_TIMEUP) {
fprintf(stdout, "OK\n");
}
else {