summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorrbb <rbb@13f79535-47bb-0310-9956-ffa450edef68>1999-10-06 23:04:07 +0000
committerrbb <rbb@13f79535-47bb-0310-9956-ffa450edef68>1999-10-06 23:04:07 +0000
commitf5383ef10df8f7e2bfe4a1b306389df1ed225983 (patch)
treeac6901c10641ff44d74a7f3bc3d909771994fb50 /test
parent0f360f17076bb779520a556f7fb3cb67f0a11c52 (diff)
downloadlibapr-f5383ef10df8f7e2bfe4a1b306389df1ed225983.tar.gz
Bring file_io up to the new parameter order for APR. I have decided to do
these on a directory by directory basis for the rest of APR. I hope to cause fewer problems for other developers by doing it this way. git-svn-id: http://svn.apache.org/repos/asf/apr/apr/trunk@59274 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'test')
-rw-r--r--test/ab_apr.c2
-rw-r--r--test/abc.c2
-rw-r--r--test/htdigest.c14
-rw-r--r--test/testfile.c16
-rw-r--r--test/testproc.c4
5 files changed, 19 insertions, 19 deletions
diff --git a/test/ab_apr.c b/test/ab_apr.c
index ced7375d6..b34137e92 100644
--- a/test/ab_apr.c
+++ b/test/ab_apr.c
@@ -866,7 +866,7 @@ static int open_postfile(char *pfile)
/* No need to perform stat here, the ap_open will do it for us. */
- ap_get_filesize(postfd, &postlen);
+ ap_get_filesize(&postlen, postfd);
postdata = (char *)malloc(postlen);
if (!postdata) {
printf("Can\'t alloc postfile buffer\n");
diff --git a/test/abc.c b/test/abc.c
index cba458c43..a557d8043 100644
--- a/test/abc.c
+++ b/test/abc.c
@@ -16,7 +16,7 @@ int main(int argc, char *argv[])
ap_open(&fd, context, argv[1], APR_READ, -1);
while (!status) {
- status = ap_getc(fd, &ch);
+ status = ap_getc(&ch, fd);
if (status == APR_EOF )
fprintf(stdout, "EOF, YEAH!!!!!!!!!\n");
else if (status == APR_SUCCESS)
diff --git a/test/htdigest.c b/test/htdigest.c
index 3c5015b31..8eb50f81c 100644
--- a/test/htdigest.c
+++ b/test/htdigest.c
@@ -113,11 +113,11 @@ static int getline(char *s, int n, ap_file_t *f)
char ch;
while (1) {
- ap_getc(f, &ch);
+ ap_getc(&ch, f);
s[i] = ch;
if (s[i] == CR)
- ap_getc(f, &ch);
+ ap_getc(&ch, f);
s[i] = ch;
if ((s[i] == 0x4) || (s[i] == LF) || (i == (n - 1))) {
@@ -136,8 +136,8 @@ static void putline(ap_file_t *f, char *l)
int x;
for (x = 0; l[x]; x++)
- ap_putc(f, l[x]);
- ap_putc(f, '\n');
+ ap_putc(l[x], f);
+ ap_putc('\n', f);
}
@@ -161,7 +161,7 @@ static void add_password(char *user, char *realm, ap_file_t *f)
if (strcmp(pwin, pwv) != 0) {
fprintf(stderr, "They don't match, sorry.\n");
if (tn) {
- ap_remove_file(cntxt, tn);
+ ap_remove_file(tn, cntxt);
}
exit(1);
}
@@ -192,7 +192,7 @@ static void interrupted(void)
{
fprintf(stderr, "Interrupted.\n");
if (tn)
- ap_remove_file(cntxt, tn);
+ ap_remove_file(tn, cntxt);
exit(1);
}
@@ -275,6 +275,6 @@ int main(int argc, char *argv[])
sprintf(command, "cp %s %s", tn, argv[1]);
#endif
system(command);
- ap_remove_file(cntxt, tn);
+ ap_remove_file(tn, cntxt);
return 0;
}
diff --git a/test/testfile.c b/test/testfile.c
index 7d69e8649..73153ba1c 100644
--- a/test/testfile.c
+++ b/test/testfile.c
@@ -162,7 +162,7 @@ int main()
}
fprintf(stdout, "\tDeleting file.......");
- status = ap_remove_file(context, filename);
+ status = ap_remove_file(filename, context);
if (status != APR_SUCCESS) {
fprintf(stderr, "Couldn't delete the file\n");
exit(-1);
@@ -202,7 +202,7 @@ int test_filedel(ap_context_t *context)
return stat;
}
- if ((stat = ap_remove_file(context, "testdel")) != APR_SUCCESS) {
+ if ((stat = ap_remove_file("testdel", context)) != APR_SUCCESS) {
return stat;
}
@@ -225,7 +225,7 @@ int testdirs(ap_context_t *context)
fprintf(stdout, "Testing Directory functions.\n");
fprintf(stdout, "\tMakeing Directory.......");
- if (ap_make_dir(context, "testdir", APR_UREAD | APR_UWRITE | APR_UEXECUTE | APR_GREAD | APR_GWRITE | APR_GEXECUTE | APR_WREAD | APR_WWRITE | APR_WEXECUTE) != APR_SUCCESS) {
+ if (ap_make_dir("testdir", APR_UREAD | APR_UWRITE | APR_UEXECUTE | APR_GREAD | APR_GWRITE | APR_GEXECUTE | APR_WREAD | APR_WWRITE | APR_WEXECUTE, context) != APR_SUCCESS) {
fprintf(stderr, "Could not create directory\n");
return -1;
}
@@ -242,7 +242,7 @@ int testdirs(ap_context_t *context)
ap_close(file);
fprintf(stdout, "\tOpening Directory.......");
- if (ap_opendir(&temp, context, "testdir") != APR_SUCCESS) {
+ if (ap_opendir(&temp, "testdir", context) != APR_SUCCESS) {
fprintf(stderr, "Could not open directory\n");
return -1;
}
@@ -278,7 +278,7 @@ int testdirs(ap_context_t *context)
fprintf(stdout, "OK\n");
fprintf(stdout, "\t\tFile type.......");
- ap_dir_entry_ftype(temp, &type);
+ ap_dir_entry_ftype(&type, temp);
if (type != APR_REG) {
fprintf(stderr, "Got wrong file type\n");
return -1;
@@ -286,7 +286,7 @@ int testdirs(ap_context_t *context)
fprintf(stdout, "OK\n");
fprintf(stdout, "\t\tFile size.......");
- ap_dir_entry_size(temp, &bytes);
+ ap_dir_entry_size(&bytes, temp);
if (bytes != (ap_ssize_t)strlen("Another test!!!")) {
fprintf(stderr, "Got wrong file size %d\n", bytes);
return -1;
@@ -307,7 +307,7 @@ int testdirs(ap_context_t *context)
}
fprintf(stdout, "\tRemoving file from directory.......");
- if (ap_remove_file(context, "testdir/testfile") != APR_SUCCESS) {
+ if (ap_remove_file("testdir/testfile", context) != APR_SUCCESS) {
fprintf(stderr, "Could not remove file\n");
return -1;
}
@@ -316,7 +316,7 @@ int testdirs(ap_context_t *context)
}
fprintf(stdout, "\tRemoving Directory.......");
- if (ap_remove_dir(context, "testdir") != APR_SUCCESS) {
+ if (ap_remove_dir("testdir", context) != APR_SUCCESS) {
fprintf(stderr, "Could not remove directory\n");
return -1;
}
diff --git a/test/testproc.c b/test/testproc.c
index b442106c8..a246711ce 100644
--- a/test/testproc.c
+++ b/test/testproc.c
@@ -89,7 +89,7 @@ int main(int argc, char *argv[])
}
fprintf(stdout, "Creating directory for later use.......");
- if (ap_make_dir(context, "proctest", APR_UREAD | APR_UWRITE | APR_UEXECUTE) != APR_SUCCESS) {
+ if (ap_make_dir("proctest", APR_UREAD | APR_UWRITE | APR_UEXECUTE, context) != APR_SUCCESS) {
fprintf(stderr, "Could not create dir\n");
exit(-1);
}
@@ -152,7 +152,7 @@ int main(int argc, char *argv[])
else fprintf(stderr, "Read failed.\n");
fprintf(stdout, "Removing directory.......");
- if (ap_remove_dir(context, "proctest") != APR_SUCCESS) {
+ if (ap_remove_dir("proctest", context) != APR_SUCCESS) {
fprintf(stderr, "Could not remove directory.\n");
exit(-1);
}