return FORBIDDEN;
}
- ap_get_os_file(f, &thefd);
+ ap_get_os_file(&thefd, f);
thefile = fdopen(thefd, "r");
ap_scan_script_header_err(r, thefile, NULL);
char keyid;
char direction;
- if (ap_opendir(&d, r->pool, name) != APR_SUCCESS) {
+ if (ap_opendir(&d, name, r->pool) != APR_SUCCESS) {
ap_log_rerror(APLOG_MARK, APLOG_ERR, r,
"Can't open directory for index: %s", r->filename);
return HTTP_FORBIDDEN;
return FORBIDDEN;
}
else
- ap_get_os_file (fd, &fd_os);
+ ap_get_os_file(&fd_os, fd);
ap_update_mtime(r, r->finfo.st_mtime);
ap_set_last_modified(r);
/* Get a noncommented line */
do {
- if (ap_fgets(map, buffer, MAX_STRING_LEN) != APR_SUCCESS) {
+ if (ap_fgets(buffer, MAX_STRING_LEN, map) != APR_SUCCESS) {
return header_eof;
}
} while (buffer[0] == '#');
cp += strlen(cp);
- while (ap_getc(map, &c) != APR_EOF) {
+ while (ap_getc(&c, map) != APR_EOF) {
if (c == '#') {
/* Comment line */
- while (ap_getc(map, &c) != EOF && c != '\n') {
+ while (ap_getc(&c, map) != EOF && c != '\n') {
continue;
}
}
*/
while (c != '\n' && ap_isspace(c)) {
- if(ap_getc(map, &c) != APR_SUCCESS)
+ if(ap_getc(&c, map) != APR_SUCCESS)
break;
}
- ap_ungetc(map, c);
+ ap_ungetc(c, map);
if (c == '\n') {
return header_seen; /* Blank line */
/* Continuation */
- while (cp < buf_end - 2 && (ap_getc(map, &c)) != EOF && c != '\n') {
+ while (cp < buf_end - 2 && (ap_getc(&c, map)) != EOF && c != '\n') {
*cp++ = c;
}
/* Line beginning with something other than whitespace */
- ap_ungetc(map, c);
+ ap_ungetc(c, map);
return header_seen;
}
}
++filp;
prefix_len = strlen(filp);
- if (ap_opendir(&dirp, neg->pool, neg->dir_name) != APR_SUCCESS) {
+ if (ap_opendir(&dirp, neg->dir_name, neg->pool) != APR_SUCCESS) {
ap_log_rerror(APLOG_MARK, APLOG_ERR, r,
"cannot read directory for multi: %s", neg->dir_name);
return HTTP_FORBIDDEN;
if (s_main->error_log) {
/* replace stderr with this new log */
fflush(stderr);
- ap_get_os_file(s_main->error_log, &errfile);
+ ap_get_os_file(&errfile, s_main->error_log);
if (dup2(errfile, STDERR_FILENO) == -1) {
ap_log_error(APLOG_MARK, APLOG_CRIT, s_main,
"unable to replace stderr with error_log");
API_EXPORT(void) ap_error_log2stderr(server_rec *s) {
int errfile;
- ap_get_os_file(s->error_log, &errfile);
+ ap_get_os_file(&errfile, s->error_log);
if ( s->error_log != NULL
&& errfile != STDERR_FILENO)
dup2(errfile, STDERR_FILENO);
if (logf) {
/* ZZZ let's just use AP funcs to Write to the error log. If failure,
can we output a message to the console??? */
- ap_puts(logf, errstr);
- ap_putc(logf, '\n');
+ ap_puts(errstr, logf);
+ ap_putc('\n', logf);
ap_flush(logf);
}
#ifdef HAVE_SYSLOG
ap_open(p, ap_scoreboard_fname, APR_CREATE | APR_BINARY | APR_READ | APR_WRITE,
APR_UREAD | APR_UWRITE | APR_GREAD | APR_GWRITE | APR_WREAD | APR_WWRITE,
&scoreboard_file);
- ap_get_os_file(scoreboard_file, &scoreboard_fd);
+ ap_get_os_file(&scoreboard_fd, scoreboard_file);
if (scoreboard_fd == -1) {
perror(ap_scoreboard_fname);
fprintf(stderr, "Cannot open scoreboard file:\n");
ap_open(p, ap_scoreboard_fname, APR_CREATE | APR_BINARY | APR_READ | APR_WRITE,
APR_UREAD | APR_UWRITE | APR_GREAD | APR_WREAD, &scoreboard_file);
- ap_get_os_file(scoreboard_file, &scoreboard_fd);
+ ap_get_os_file(&scoreboard_fd, scoreboard_file);
if (scoreboard_fd == -1) {
perror(ap_scoreboard_fname);
fprintf(stderr, "Cannot open scoreboard file:\n");
expand_lock_fname(p);
ap_open(&tempfile, p, ap_lock_fname, APR_CREATE | APR_WRITE | APR_EXCL,
APR_UREAD | APR_UWRITE | APR_GREAD | APR_WREAD);
- ap_get_os_file(tempfile, &lock_fd);
+ ap_get_os_file(&lock_fd, tempfile);
if (lock_fd == -1) {
perror("open");
fprintf(stderr, "Cannot open lock file: %s\n", ap_lock_fname);
"Child cannot open lock file: %s", ap_lock_fname);
clean_child_exit(APEXIT_CHILDINIT);
}
- ap_get_os_file(tempfile, &lock_fd);
+ ap_get_os_file(&lock_fd, tempfile);
}
/*
"Parent cannot open lock file: %s", ap_lock_fname);
exit(APEXIT_INIT);
}
- ap_get_os_file(tempfile, &lock_fd);
+ ap_get_os_file(&lock_fd, tempfile);
ap_register_cleanup(p, NULL, accept_mutex_cleanup, ap_null_cleanup);
}
{
char ch;
ap_file_t *cfp = (ap_file_t *) param;
- if (ap_getc(cfp, &ch) == APR_SUCCESS)
+ if (ap_getc(&ch, cfp) == APR_SUCCESS)
return ch;
return (int)EOF;
}
static void *cfg_getstr(void *buf, size_t bufsiz, void *param)
{
ap_file_t *cfp = (ap_file_t *) param;
- if (ap_fgets(cfp, buf, bufsiz) == APR_SUCCESS)
+ if (ap_fgets(buf, bufsiz, cfp) == APR_SUCCESS)
return buf;
return NULL;
}
if (stat != APR_SUCCESS)
return NULL;
- if (ap_get_filetype(file, &type) == APR_SUCCESS &&
+ if (ap_get_filetype(&type, file) == APR_SUCCESS &&
type != APR_REG &&
#if defined(WIN32) || defined(OS2)
!(strcasecmp(name, "nul") == 0 ||