Return-Path: Delivered-To: apmail-apache-cvs-archive@apache.org Received: (qmail 43877 invoked by uid 500); 7 Mar 2000 11:43:17 -0000 Mailing-List: contact apache-cvs-help@apache.org; run by ezmlm Precedence: bulk X-No-Archive: yes Reply-To: new-httpd@apache.org list-help: list-unsubscribe: list-post: Delivered-To: mailing list apache-cvs@apache.org Received: (qmail 43866 invoked by uid 500); 7 Mar 2000 11:43:16 -0000 Delivered-To: apmail-apache-2.0-cvs@apache.org Date: 7 Mar 2000 11:43:16 -0000 Message-ID: <20000307114316.43862.qmail@locus.apache.org> From: dreid@locus.apache.org To: apache-2.0-cvs@apache.org Subject: cvs commit: apache-2.0/src/lib/apr/file_io/beos readwrite.c dreid 00/03/07 03:43:16 Modified: src/lib/apr/file_io/beos readwrite.c Log: Remove the APRDOC from this file, as they should only need to appear in the Unix files. Also small bit of tidying up. Revision Changes Path 1.9 +8 -75 apache-2.0/src/lib/apr/file_io/beos/readwrite.c Index: readwrite.c =================================================================== RCS file: /home/cvs/apache-2.0/src/lib/apr/file_io/beos/readwrite.c,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- readwrite.c 2000/03/02 12:51:08 1.8 +++ readwrite.c 2000/03/07 11:43:16 1.9 @@ -55,23 +55,12 @@ #include "../unix/fileio.h" -/* ***APRDOC******************************************************** - * ap_status_t ap_read(ap_file_t *, void *, ap_ssize_t *) - * Read data from the specified file. - * arg 1) The file descriptor to read from. - * arg 2) The buffer to store the data to. - * arg 3) The number of bytes to read. - * NOTE: ap_read will read up to the specified number of bytes, but never - * more. If there isn't enough data to fill that number of bytes, all of - * the available data is read. The third argument is modified to reflect the - * number of bytes read. - */ ap_status_t ap_read(struct file_t *thefile, void *buf, ap_ssize_t *nbytes) { ap_ssize_t rv; if (thefile->filedes < 0) { - *nbytes = -1; + (*nbytes) = 0; return APR_EBADF; } @@ -85,30 +74,20 @@ if ((*nbytes != rv) && (errno != EINTR) && !thefile->buffered) { thefile->eof_hit = 1; } - *nbytes = rv; if (rv == -1) { + *nbytes = 0; return errno; } + (*nbytes) = rv; return APR_SUCCESS; } -/* ***APRDOC******************************************************** - * ap_status_t ap_write(ap_file_t *, void *, ap_ssize_t *) - * Write data to the specified file. - * arg 1) The file descriptor to write to. - * arg 2) The buffer which contains the data. - * arg 3) The number of bytes to write. - * NOTE: ap_write will write up to the specified number of bytes, but never - * more. If the OS cannot write that many bytes, it will write as many as it - * can. The third argument is modified to reflect the * number of bytes - * written. - */ ap_status_t ap_write(struct file_t *thefile, void *buf, ap_ssize_t *nbytes) { ap_size_t rv; if (thefile->filedes < 0) { - *nbytes = -1; + (*nbytes) = 0; return APR_EBADF; } @@ -119,44 +98,28 @@ rv = write(thefile->filedes, buf, *nbytes); } - *nbytes = rv; if (rv == -1) { + (*nbytes) = 0; return errno; } + (*nbytes) = rv; return APR_SUCCESS; } -/* ***APRDOC******************************************************** - * ap_status_t ap_writev(ap_file_t *, struct iovec *, ap_size_t, ap_ssize_t *) - * Write data from iovec array to the specified file. - * arg 1) The file descriptor to write to. - * arg 2) The array from which to get the data to write to the file. - * arg 3) The number of elements in the struct iovec array. This must be - * smaller than AP_MAX_IOVEC_SIZE. If it isn't, the function will - * fail with APR_EINVAL. - * arg 4) The number of bytes written. - */ - ap_status_t ap_writev(struct file_t *thefile, const struct iovec *vec, ap_size_t nvec, ap_ssize_t *nbytes) { int bytes; if ((bytes = writev(thefile->filedes, vec, nvec)) < 0) { - *nbytes = 0; + (*nbytes) = 0; return errno; } else { - *nbytes = bytes; + (*nbytes) = bytes; return APR_SUCCESS; } } -/* ***APRDOC******************************************************** - * ap_status_t ap_putc(char, ap_file_t *) - * put a character into the specified file. - * arg 1) The file descriptor to write to - * arg 2) The character to write. - */ ap_status_t ap_putc(char ch, ap_file_t *thefile) { if (thefile->buffered) { @@ -171,12 +134,6 @@ return APR_SUCCESS; } -/* ***APRDOC******************************************************** - * ap_status_t ap_ungetc(char, ap_file_t *) - * put a character back onto a specified stream. - * arg 1) The file descriptor to write to - * arg 2) The character to write. - */ ap_status_t ap_ungetc(char ch, ap_file_t *thefile) { if (thefile->buffered) { @@ -189,12 +146,6 @@ return APR_SUCCESS; } -/* ***APRDOC******************************************************** - * ap_status_t ap_getc(char *, ap_file_t *) - * get a character from the specified file. - * arg 1) The file descriptor to write to - * arg 2) The character to write. - */ ap_status_t ap_getc(char *ch, ap_file_t *thefile) { ssize_t rv; @@ -224,12 +175,6 @@ return APR_SUCCESS; } -/* ***APRDOC******************************************************** - * ap_status_t ap_puts(char *, ap_file_t *) - * Put the string into a specified file. - * arg 1) The file descriptor to write to from - * arg 2) The string to write. - */ ap_status_t ap_puts(char *str, ap_file_t *thefile) { ssize_t rv; @@ -249,11 +194,6 @@ return APR_SUCCESS; } -/* ***APRDOC******************************************************** - * ap_status_t ap_flush(ap_file_t *) - * Flush the file's buffer. - * arg 1) The file descriptor to flush - */ ap_status_t ap_flush(ap_file_t *thefile) { if (thefile->buffered) { @@ -268,13 +208,6 @@ return APR_SUCCESS; } -/* ***APRDOC******************************************************** - * ap_status_t ap_fgets(char *, int, ap_file_t *) - * Get a string from a specified file. - * arg 1) The file descriptor to read from - * arg 2) The buffer to store the string in. - * arg 3) The length of the string - */ ap_status_t ap_fgets(char *str, int len, ap_file_t *thefile) { ssize_t rv;