apr-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From r..@apache.org
Subject cvs commit: apr-site/docs/coverage apr_pools.c.gcov apr_strings.c.gcov copy.c.gcov env.c.gcov fileacc.c.gcov filestat.c.gcov fullrw.c.gcov index.html mktemp.c.gcov open.c.gcov readwrite.c.gcov tempdir.c.gcov time.c.gcov
Date Fri, 19 Mar 2004 02:37:36 GMT
rbb         2004/03/18 18:37:36

  Modified:    docs/coverage apr_pools.c.gcov apr_strings.c.gcov
                        copy.c.gcov env.c.gcov fileacc.c.gcov
                        filestat.c.gcov fullrw.c.gcov index.html
                        mktemp.c.gcov open.c.gcov readwrite.c.gcov
                        tempdir.c.gcov time.c.gcov
  Log:
  Update with new test coverage.
  
  Revision  Changes    Path
  1.8       +99 -99    apr-site/docs/coverage/apr_pools.c.gcov
  
  Index: apr_pools.c.gcov
  ===================================================================
  RCS file: /home/cvs/apr-site/docs/coverage/apr_pools.c.gcov,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- apr_pools.c.gcov	16 Mar 2004 23:33:32 -0000	1.7
  +++ apr_pools.c.gcov	19 Mar 2004 02:37:36 -0000	1.8
  @@ -104,9 +104,9 @@
   		
            231        for (index = 0; index < MAX_INDEX; index++) {
            220            ref = &allocator->free[index];
  -         392            while ((node = *ref) != NULL) {
  -         172                *ref = node->next;
  -         172                free(node);
  +         394            while ((node = *ref) != NULL) {
  +         174                *ref = node->next;
  +         174                free(node);
   		        }
   		    }
   		
  @@ -204,9 +204,9 @@
            124            max_index = allocator->max_index;
            124            ref = &allocator->free[index];
            124            i = index;
  -         132            while (*ref == NULL && i < max_index) {
  -           8               ref++;
  -           8               i++;
  +         140            while (*ref == NULL && i < max_index) {
  +          16               ref++;
  +          16               i++;
   		        }
   		
            124            if ((node = *ref) != NULL) {
  @@ -216,18 +216,18 @@
   		             * available index
   		             */
            124                if ((*ref = node->next) == NULL && i >= max_index) {
  -          54                    do {
  -          54                        ref--;
  -          54                        max_index--;
  -          54                    }
  +          71                    do {
  +          71                        ref--;
  +          71                        max_index--;
  +          71                    }
   		                while (*ref == NULL && max_index > 0);
   		
  -          54                    allocator->max_index = max_index;
  +          60                    allocator->max_index = max_index;
   		            }
   		
            124                allocator->current_free_index += node->index;
            124                if (allocator->current_free_index > allocator->max_free_index)
  -          83                    allocator->current_free_index = allocator->max_free_index;
  +          82                    allocator->current_free_index = allocator->max_free_index;
   		
   		#if APR_HAS_THREADS
            124                if (allocator->mutex)
  @@ -319,25 +319,25 @@
   		    /* Walk the list of submitted nodes and free them one by one,
   		     * shoving them in the right 'size' buckets as we go.
   		     */
  -         296        do {
  -         296            next = node->next;
  -         296            index = node->index;
  +         298        do {
  +         298            next = node->next;
  +         298            index = node->index;
   		
  -         296            if (max_free_index != APR_ALLOCATOR_MAX_FREE_UNLIMITED
  +         298            if (max_free_index != APR_ALLOCATOR_MAX_FREE_UNLIMITED
   		            && index > current_free_index) {
         ######                node->next = freelist;
         ######                freelist = node;
   		        }
  -         296            else if (index < MAX_INDEX) {
  +         298            else if (index < MAX_INDEX) {
   		            /* Add the node to the appropiate 'size' bucket.  Adjust
   		             * the max_index when appropiate.
   		             */
  -         294                if ((node->next = allocator->free[index]) == NULL
  +         296                if ((node->next = allocator->free[index]) == NULL
   		                && index > max_index) {
  -          65                    max_index = index;
  +          71                    max_index = index;
   		            }
  -         294                allocator->free[index] = node;
  -         294                current_free_index -= index;
  +         296                allocator->free[index] = node;
  +         296                current_free_index -= index;
   		        }
   		        else {
   		            /* This node is too large to keep in a specific size bucket,
  @@ -347,7 +347,7 @@
              2                allocator->free[0] = node;
              2                current_free_index -= index;
   		        }
  -         296        } while ((node = next) != NULL);
  +         298        } while ((node = next) != NULL);
   		
            206        allocator->max_index = max_index;
            206        allocator->current_free_index = current_free_index;
  @@ -578,28 +578,28 @@
   		 */
   		
   		APR_DECLARE(void *) apr_palloc(apr_pool_t *pool, apr_size_t size)
  -        2419    {
  -        2419        apr_memnode_t *active, *node;
  -        2419        void *mem;
  -        2419        apr_uint32_t free_index;
  +        2469    {
  +        2469        apr_memnode_t *active, *node;
  +        2469        void *mem;
  +        2469        apr_uint32_t free_index;
   		
  -        2419        size = APR_ALIGN_DEFAULT(size);
  -        2419        active = pool->active;
  +        2469        size = APR_ALIGN_DEFAULT(size);
  +        2469        active = pool->active;
   		
   		    /* If the active node has enough bytes left, use it. */
  -        2419        if (size < (apr_size_t)(active->endp - active->first_avail)) {
  -        2385            mem = active->first_avail;
  -        2385            active->first_avail += size;
  +        2469        if (size < (apr_size_t)(active->endp - active->first_avail)) {
  +        2436            mem = active->first_avail;
  +        2436            active->first_avail += size;
   		
  -        2385            return mem;
  +        2436            return mem;
   		    }
   		
  -          34        node = active->next;
  -          34        if (size < (apr_size_t)(node->endp - node->first_avail)) {
  -           5            list_remove(node);
  +          33        node = active->next;
  +          33        if (size < (apr_size_t)(node->endp - node->first_avail)) {
  +           3            list_remove(node);
   		    }
   		    else {
  -          29            if ((node = allocator_alloc(pool->allocator, size)) == NULL) {
  +          30            if ((node = allocator_alloc(pool->allocator, size)) == NULL) {
         ######                if (pool->abort_fn)
         ######                    pool->abort_fn(APR_ENOMEM);
   		
  @@ -607,22 +607,22 @@
   		        }
   		    }
   		
  -          34        node->free_index = 0;
  +          33        node->free_index = 0;
   		
  -          34        mem = node->first_avail;
  -          34        node->first_avail += size;
  +          33        mem = node->first_avail;
  +          33        node->first_avail += size;
   		
  -          34        list_insert(node, active);
  +          33        list_insert(node, active);
   		
  -          34        pool->active = node;
  +          33        pool->active = node;
   		
  -          34        free_index = (APR_ALIGN(active->endp - active->first_avail + 1,
  +          33        free_index = (APR_ALIGN(active->endp - active->first_avail + 1,
   		                            BOUNDARY_SIZE) - BOUNDARY_SIZE) >> BOUNDARY_INDEX;
   		
  -          34        active->free_index = free_index;
  -          34        node = active->next;
  -          34        if (free_index >= node->free_index)
  -          34            return mem;
  +          33        active->free_index = free_index;
  +          33        node = active->next;
  +          33        if (free_index >= node->free_index)
  +          33            return mem;
   		
         ######        do {
         ######            node = node->next;
  @@ -868,30 +868,30 @@
   		#define APR_PSPRINTF_MIN_STRINGSIZE 32
   		
   		static int psprintf_flush(apr_vformatter_buff_t *vbuff)
  -           6    {
  -           6        struct psprintf_data *ps = (struct psprintf_data *)vbuff;
  -           6        apr_memnode_t *node, *active;
  -           6        apr_size_t cur_len, size;
  -           6        char *strp;
  -           6        apr_pool_t *pool;
  -           6        apr_uint32_t free_index;
  -		
  -           6        pool = ps->pool;
  -           6        active = ps->node;
  -           6        strp = ps->vbuff.curpos;
  -           6        cur_len = strp - active->first_avail;
  -           6        size = cur_len << 1;
  +           5    {
  +           5        struct psprintf_data *ps = (struct psprintf_data *)vbuff;
  +           5        apr_memnode_t *node, *active;
  +           5        apr_size_t cur_len, size;
  +           5        char *strp;
  +           5        apr_pool_t *pool;
  +           5        apr_uint32_t free_index;
  +		
  +           5        pool = ps->pool;
  +           5        active = ps->node;
  +           5        strp = ps->vbuff.curpos;
  +           5        cur_len = strp - active->first_avail;
  +           5        size = cur_len << 1;
   		
   		    /* Make sure that we don't try to use a block that has less
   		     * than APR_PSPRINTF_MIN_STRINGSIZE bytes left in it.  This
   		     * also catches the case where size == 0, which would result
   		     * in reusing a block that can't even hold the NUL byte.
   		     */
  -           6        if (size < APR_PSPRINTF_MIN_STRINGSIZE)
  +           5        if (size < APR_PSPRINTF_MIN_STRINGSIZE)
         ######            size = APR_PSPRINTF_MIN_STRINGSIZE;
   		
  -           6        node = active->next;
  -           6        if (!ps->got_a_new_node
  +           5        node = active->next;
  +           5        if (!ps->got_a_new_node
   		        && size < (apr_size_t)(node->endp - node->first_avail)) {
   		
         ######            list_remove(node);
  @@ -919,24 +919,24 @@
         ######            node = pool->active;
   		    }
   		    else {
  -           6            if ((node = allocator_alloc(pool->allocator, size)) == NULL)
  +           5            if ((node = allocator_alloc(pool->allocator, size)) == NULL)
         ######                return -1;
   		
  -           6            if (ps->got_a_new_node) {
  -           5                active->next = ps->free;
  -           5                ps->free = active;
  +           5            if (ps->got_a_new_node) {
  +           4                active->next = ps->free;
  +           4                ps->free = active;
   		        }
   		
  -           6            ps->got_a_new_node = 1;
  +           5            ps->got_a_new_node = 1;
   		    }
   		
  -           6        memcpy(node->first_avail, active->first_avail, cur_len);
  +           5        memcpy(node->first_avail, active->first_avail, cur_len);
   		
  -           6        ps->node = node;
  -           6        ps->vbuff.curpos = node->first_avail + cur_len;
  -           6        ps->vbuff.endpos = node->endp - 1; /* Save a byte for NUL terminator */
  +           5        ps->node = node;
  +           5        ps->vbuff.curpos = node->first_avail + cur_len;
  +           5        ps->vbuff.endpos = node->endp - 1; /* Save a byte for NUL terminator */
   		
  -           6        return 0;
  +           5        return 0;
   		}
   		
   		APR_DECLARE(char *) apr_pvsprintf(apr_pool_t *pool, const char *fmt, va_list ap)
  @@ -1878,45 +1878,45 @@
   		APR_DECLARE(void) apr_pool_cleanup_register(apr_pool_t *p, const void *data,
   		                      apr_status_t (*plain_cleanup_fn)(void *data),
   		                      apr_status_t (*child_cleanup_fn)(void *data))
  -         297    {
  -         297        cleanup_t *c;
  +         312    {
  +         312        cleanup_t *c;
   		
   		#if APR_POOL_DEBUG
   		    apr_pool_check_integrity(p);
   		#endif /* APR_POOL_DEBUG */
   		
  -         297        if (p != NULL) {
  -         297            c = (cleanup_t *)apr_palloc(p, sizeof(cleanup_t));
  -         297            c->data = data;
  -         297            c->plain_cleanup_fn = plain_cleanup_fn;
  -         297            c->child_cleanup_fn = child_cleanup_fn;
  -         297            c->next = p->cleanups;
  -         297            p->cleanups = c;
  +         312        if (p != NULL) {
  +         312            c = (cleanup_t *)apr_palloc(p, sizeof(cleanup_t));
  +         312            c->data = data;
  +         312            c->plain_cleanup_fn = plain_cleanup_fn;
  +         312            c->child_cleanup_fn = child_cleanup_fn;
  +         312            c->next = p->cleanups;
  +         312            p->cleanups = c;
   		    }
   		}
   		
   		APR_DECLARE(void) apr_pool_cleanup_kill(apr_pool_t *p, const void *data,
   		                      apr_status_t (*cleanup_fn)(void *))
  -         178    {
  -         178        cleanup_t *c, **lastp;
  +         192    {
  +         192        cleanup_t *c, **lastp;
   		
   		#if APR_POOL_DEBUG
   		    apr_pool_check_integrity(p);
   		#endif /* APR_POOL_DEBUG */
   		
  -         178        if (p == NULL)
  +         192        if (p == NULL)
         ######            return;
   		
  -         178        c = p->cleanups;
  -         178        lastp = &p->cleanups;
  -        1471        while (c) {
  -        1453            if (c->data == data && c->plain_cleanup_fn == cleanup_fn) {
  -         160                *lastp = c->next;
  -         160                break;
  +         192        c = p->cleanups;
  +         192        lastp = &p->cleanups;
  +        1491        while (c) {
  +        1473            if (c->data == data && c->plain_cleanup_fn == cleanup_fn) {
  +         174                *lastp = c->next;
  +         174                break;
   		        }
   		
  -        1293            lastp = &c->next;
  -        1293            c = c->next;
  +        1299            lastp = &c->next;
  +        1299            c = c->next;
   		    }
   		}
   		
  @@ -1946,19 +1946,19 @@
   		
   		APR_DECLARE(apr_status_t) apr_pool_cleanup_run(apr_pool_t *p, void *data,
   		                              apr_status_t (*cleanup_fn)(void *))
  -         167    {
  -         167        apr_pool_cleanup_kill(p, data, cleanup_fn);
  -         167        return (*cleanup_fn)(data);
  +         181    {
  +         181        apr_pool_cleanup_kill(p, data, cleanup_fn);
  +         181        return (*cleanup_fn)(data);
   		}
   		
   		static void run_cleanups(cleanup_t **cref)
            206    {
            206        cleanup_t *c = *cref;
   		
  -         411        while (c) {
  -         205            *cref = c->next;
  -         205            (*c->plain_cleanup_fn)((void *)c->data);
  -         205            c = *cref;
  +         412        while (c) {
  +         206            *cref = c->next;
  +         206            (*c->plain_cleanup_fn)((void *)c->data);
  +         206            c = *cref;
   		    }
   		}
   		
  
  
  
  1.5       +33 -33    apr-site/docs/coverage/apr_strings.c.gcov
  
  Index: apr_strings.c.gcov
  ===================================================================
  RCS file: /home/cvs/apr-site/docs/coverage/apr_strings.c.gcov,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- apr_strings.c.gcov	15 Mar 2004 03:38:39 -0000	1.4
  +++ apr_strings.c.gcov	19 Mar 2004 02:37:36 -0000	1.5
  @@ -66,17 +66,17 @@
   		#define MAX_SAVED_LENGTHS  6
   		
   		APR_DECLARE(char *) apr_pstrdup(apr_pool_t *a, const char *s)
  -         307    {
  -         307        char *res;
  -         307        apr_size_t len;
  +         324    {
  +         324        char *res;
  +         324        apr_size_t len;
   		
  -         307        if (s == NULL) {
  +         324        if (s == NULL) {
              6            return NULL;
   		    }
  -         301        len = strlen(s) + 1;
  -         301        res = apr_palloc(a, len);
  -         301        memcpy(res, s, len);
  -         301        return res;
  +         318        len = strlen(s) + 1;
  +         318        res = apr_palloc(a, len);
  +         318        memcpy(res, s, len);
  +         318        return res;
   		}
   		
   		APR_DECLARE(char *) apr_pstrndup(apr_pool_t *a, const char *s, apr_size_t n)
  @@ -121,57 +121,57 @@
   		}
   		
   		APR_DECLARE_NONSTD(char *) apr_pstrcat(apr_pool_t *a, ...)
  -           3    {
  -           3        char *cp, *argp, *res;
  -           3        apr_size_t saved_lengths[MAX_SAVED_LENGTHS];
  -           3        int nargs = 0;
  +           6    {
  +           6        char *cp, *argp, *res;
  +           6        apr_size_t saved_lengths[MAX_SAVED_LENGTHS];
  +           6        int nargs = 0;
   		
   		    /* Pass one --- find length of required string */
   		
  -           3        apr_size_t len = 0;
  -           3        va_list adummy;
  +           6        apr_size_t len = 0;
  +           6        va_list adummy;
   		
  -           3        va_start(adummy, a);
  +           6        va_start(adummy, a);
   		
  -          11        while ((cp = va_arg(adummy, char *)) != NULL) {
  -           8            apr_size_t cplen = strlen(cp);
  -           8            if (nargs < MAX_SAVED_LENGTHS) {
  -           8                saved_lengths[nargs++] = cplen;
  +          20        while ((cp = va_arg(adummy, char *)) != NULL) {
  +          14            apr_size_t cplen = strlen(cp);
  +          14            if (nargs < MAX_SAVED_LENGTHS) {
  +          14                saved_lengths[nargs++] = cplen;
   		        }
  -           8            len += cplen;
  +          14            len += cplen;
   		    }
   		
  -           3        va_end(adummy);
  +           6        va_end(adummy);
   		
   		    /* Allocate the required string */
   		
  -           3        res = (char *) apr_palloc(a, len + 1);
  -           3        cp = res;
  +           6        res = (char *) apr_palloc(a, len + 1);
  +           6        cp = res;
   		
   		    /* Pass two --- copy the argument strings into the result space */
   		
  -           3        va_start(adummy, a);
  +           6        va_start(adummy, a);
   		
  -           3        nargs = 0;
  -          11        while ((argp = va_arg(adummy, char *)) != NULL) {
  -           8            if (nargs < MAX_SAVED_LENGTHS) {
  -           8                len = saved_lengths[nargs++];
  +           6        nargs = 0;
  +          20        while ((argp = va_arg(adummy, char *)) != NULL) {
  +          14            if (nargs < MAX_SAVED_LENGTHS) {
  +          14                len = saved_lengths[nargs++];
   		        }
   		        else {
         ######                len = strlen(argp);
   		        }
   		 
  -           8            memcpy(cp, argp, len);
  -           8            cp += len;
  +          14            memcpy(cp, argp, len);
  +          14            cp += len;
   		    }
   		
  -           3        va_end(adummy);
  +           6        va_end(adummy);
   		
   		    /* Return the result string */
   		
  -           3        *cp = '\0';
  +           6        *cp = '\0';
   		
  -           3        return res;
  +           6        return res;
   		}
   		
   		APR_DECLARE(char *) apr_pstrcatv(apr_pool_t *a, const struct iovec *vec,
  
  
  
  1.2       +30 -30    apr-site/docs/coverage/copy.c.gcov
  
  Index: copy.c.gcov
  ===================================================================
  RCS file: /home/cvs/apr-site/docs/coverage/copy.c.gcov,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- copy.c.gcov	9 Mar 2004 19:07:38 -0000	1.1
  +++ copy.c.gcov	19 Mar 2004 02:37:36 -0000	1.2
  @@ -21,68 +21,68 @@
   		                                               apr_int32_t flags,
   		                                               apr_fileperms_t to_perms,
   		                                               apr_pool_t *pool)
  -      ######    {
  -      ######        apr_file_t *s = NULL, *d = NULL;  /* init to null important for APR */
  -      ######        apr_status_t status;
  -      ######        apr_finfo_t finfo;
  -      ######        apr_fileperms_t perms;
  +           6    {
  +           6        apr_file_t *s = NULL, *d = NULL;  /* init to null important for APR */
  +           6        apr_status_t status;
  +           6        apr_finfo_t finfo;
  +           6        apr_fileperms_t perms;
   		
   		    /* Open source file. */
  -      ######        status = apr_file_open(&s, from_path, APR_READ, APR_OS_DEFAULT, pool);
  -      ######        if (status)
  +           6        status = apr_file_open(&s, from_path, APR_READ, APR_OS_DEFAULT, pool);
  +           6        if (status)
         ######            return status;
   		
   		    /* Maybe get its permissions. */
  -      ######        if (to_perms == APR_FILE_SOURCE_PERMS) {
  -      ######            status = apr_file_info_get(&finfo, APR_FINFO_PROT, s);
  -      ######            if (status != APR_SUCCESS && status != APR_INCOMPLETE) {
  +           6        if (to_perms == APR_FILE_SOURCE_PERMS) {
  +           6            status = apr_file_info_get(&finfo, APR_FINFO_PROT, s);
  +           6            if (status != APR_SUCCESS && status != APR_INCOMPLETE) {
         ######                apr_file_close(s);  /* toss any error */
         ######                return status;
   		        }
  -      ######            perms = finfo.protection;
  +           6            perms = finfo.protection;
   		    }
   		    else
         ######            perms = to_perms;
   		
   		    /* Open dest file. */
  -      ######        status = apr_file_open(&d, to_path, flags, perms, pool);
  -      ######        if (status) {
  +           6        status = apr_file_open(&d, to_path, flags, perms, pool);
  +           6        if (status) {
         ######            apr_file_close(s);  /* toss any error */
         ######            return status;
   		    }
   		
   		    /* Copy bytes till the cows come home. */
  -      ######        while (1) {
  -      ######            char buf[BUFSIZ];
  -      ######            apr_size_t bytes_this_time = sizeof(buf);
  -      ######            apr_status_t read_err;
  -      ######            apr_status_t write_err;
  +          12        while (1) {
  +          12            char buf[BUFSIZ];
  +          12            apr_size_t bytes_this_time = sizeof(buf);
  +          12            apr_status_t read_err;
  +          12            apr_status_t write_err;
   		
   		        /* Read 'em. */
  -      ######            read_err = apr_file_read(s, buf, &bytes_this_time);
  -      ######            if (read_err && !APR_STATUS_IS_EOF(read_err)) {
  +          12            read_err = apr_file_read(s, buf, &bytes_this_time);
  +          12            if (read_err && !APR_STATUS_IS_EOF(read_err)) {
         ######                apr_file_close(s);  /* toss any error */
         ######                apr_file_close(d);  /* toss any error */
         ######                return read_err;
   		        }
   		
   		        /* Write 'em. */
  -      ######            write_err = apr_file_write_full(d, buf, bytes_this_time, NULL);
  -      ######            if (write_err) {
  +          12            write_err = apr_file_write_full(d, buf, bytes_this_time, NULL);
  +          12            if (write_err) {
         ######                apr_file_close(s);  /* toss any error */
         ######                apr_file_close(d);  /* toss any error */
         ######                return write_err;
   		        }
   		
  -      ######            if (read_err && APR_STATUS_IS_EOF(read_err)) {
  -      ######                status = apr_file_close(s);
  -      ######                if (status) {
  +          12            if (read_err && APR_STATUS_IS_EOF(read_err)) {
  +           6                status = apr_file_close(s);
  +           6                if (status) {
         ######                    apr_file_close(d);  /* toss any error */
         ######                    return status;
   		            }
   		
   		            /* return the results of this close: an error, or success */
  -      ######                return apr_file_close(d);
  +           6                return apr_file_close(d);
   		        }
   		    }
   		    /* NOTREACHED */
  @@ -92,8 +92,8 @@
   		                                        const char *to_path,
   		                                        apr_fileperms_t perms,
   		                                        apr_pool_t *pool)
  -      ######    {
  -      ######        return apr_file_transfer_contents(from_path, to_path,
  +           5    {
  +           5        return apr_file_transfer_contents(from_path, to_path,
   		                                      (APR_WRITE | APR_CREATE | APR_TRUNCATE),
   		                                      perms,
   		                                      pool);
  @@ -103,8 +103,8 @@
   		                                          const char *to_path,
   		                                          apr_fileperms_t perms,
   		                                          apr_pool_t *pool)
  -      ######    {
  -      ######        return apr_file_transfer_contents(from_path, to_path,
  +           1    {
  +           1        return apr_file_transfer_contents(from_path, to_path,
   		                                      (APR_WRITE | APR_CREATE | APR_APPEND),
   		                                      perms,
   		                                      pool);
  
  
  
  1.2       +4 -4      apr-site/docs/coverage/env.c.gcov
  
  Index: env.c.gcov
  ===================================================================
  RCS file: /home/cvs/apr-site/docs/coverage/env.c.gcov,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- env.c.gcov	9 Mar 2004 19:07:38 -0000	1.1
  +++ env.c.gcov	19 Mar 2004 02:37:36 -0000	1.2
  @@ -29,12 +29,12 @@
   		APR_DECLARE(apr_status_t) apr_env_get(char **value,
   		                                      const char *envvar,
   		                                      apr_pool_t *pool)
  -           2    {
  +           8    {
   		#ifdef HAVE_GETENV
   		
  -           2        char *val = getenv(envvar);
  -           2        if (!val)
  -           1            return APR_ENOENT;
  +           8        char *val = getenv(envvar);
  +           8        if (!val)
  +           7            return APR_ENOENT;
              1        *value = val;
              1        return APR_SUCCESS;
   		
  
  
  
  1.2       +34 -34    apr-site/docs/coverage/fileacc.c.gcov
  
  Index: fileacc.c.gcov
  ===================================================================
  RCS file: /home/cvs/apr-site/docs/coverage/fileacc.c.gcov,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- fileacc.c.gcov	9 Mar 2004 19:07:38 -0000	1.1
  +++ fileacc.c.gcov	19 Mar 2004 02:37:36 -0000	1.2
  @@ -32,59 +32,59 @@
   		
   		#if !defined(OS2) && !defined(WIN32)
   		mode_t apr_unix_perms2mode(apr_fileperms_t perms)
  -          34    {
  -          34        mode_t mode = 0;
  +          40    {
  +          40        mode_t mode = 0;
   		
  -          34        if (perms & APR_UREAD)
  -          29            mode |= S_IRUSR;
  -          34        if (perms & APR_UWRITE)
  -          28            mode |= S_IWUSR;
  -          34        if (perms & APR_UEXECUTE)
  +          40        if (perms & APR_UREAD)
  +          35            mode |= S_IRUSR;
  +          40        if (perms & APR_UWRITE)
  +          34            mode |= S_IWUSR;
  +          40        if (perms & APR_UEXECUTE)
             10            mode |= S_IXUSR;
   		
  -          34        if (perms & APR_GREAD)
  -          17            mode |= S_IRGRP;
  -          34        if (perms & APR_GWRITE)
  -           2            mode |= S_IWGRP;
  -          34        if (perms & APR_GEXECUTE)
  +          40        if (perms & APR_GREAD)
  +          23            mode |= S_IRGRP;
  +          40        if (perms & APR_GWRITE)
  +           4            mode |= S_IWGRP;
  +          40        if (perms & APR_GEXECUTE)
              2            mode |= S_IXGRP;
   		
  -          34        if (perms & APR_WREAD)
  -           2            mode |= S_IROTH;
  -          34        if (perms & APR_WWRITE)
  +          40        if (perms & APR_WREAD)
  +           4            mode |= S_IROTH;
  +          40        if (perms & APR_WWRITE)
              2            mode |= S_IWOTH;
  -          34        if (perms & APR_WEXECUTE)
  +          40        if (perms & APR_WEXECUTE)
              2            mode |= S_IXOTH;
   		
  -          34        return mode;
  +          40        return mode;
   		}
   		
   		apr_fileperms_t apr_unix_mode2perms(mode_t mode)
  -          16    {
  -          16        apr_fileperms_t perms = 0;
  +          36    {
  +          36        apr_fileperms_t perms = 0;
   		
  -          16        if (mode & S_IRUSR)
  -          16            perms |= APR_UREAD;
  -          16        if (mode & S_IWUSR)
  -          16            perms |= APR_UWRITE;
  -          16        if (mode & S_IXUSR)
  +          36        if (mode & S_IRUSR)
  +          36            perms |= APR_UREAD;
  +          36        if (mode & S_IWUSR)
  +          36            perms |= APR_UWRITE;
  +          36        if (mode & S_IXUSR)
              6            perms |= APR_UEXECUTE;
   		
  -          16        if (mode & S_IRGRP)
  -          11            perms |= APR_GREAD;
  -          16        if (mode & S_IWGRP)
  -           7            perms |= APR_GWRITE;
  -          16        if (mode & S_IXGRP)
  +          36        if (mode & S_IRGRP)
  +          31            perms |= APR_GREAD;
  +          36        if (mode & S_IWGRP)
  +          11            perms |= APR_GWRITE;
  +          36        if (mode & S_IXGRP)
              2            perms |= APR_GEXECUTE;
   		
  -          16        if (mode & S_IROTH)
  -           7            perms |= APR_WREAD;
  -          16        if (mode & S_IWOTH)
  +          36        if (mode & S_IROTH)
  +          11            perms |= APR_WREAD;
  +          36        if (mode & S_IWOTH)
         ######            perms |= APR_WWRITE;
  -          16        if (mode & S_IXOTH)
  +          36        if (mode & S_IXOTH)
              2            perms |= APR_WEXECUTE;
   		
  -          16        return perms;
  +          36        return perms;
   		}
   		#endif
   		
  
  
  
  1.2       +38 -38    apr-site/docs/coverage/filestat.c.gcov
  
  Index: filestat.c.gcov
  ===================================================================
  RCS file: /home/cvs/apr-site/docs/coverage/filestat.c.gcov,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- filestat.c.gcov	9 Mar 2004 19:07:38 -0000	1.1
  +++ filestat.c.gcov	19 Mar 2004 02:37:36 -0000	1.2
  @@ -24,12 +24,12 @@
   		#endif
   		
   		static apr_filetype_e filetype_from_mode(mode_t mode)
  -          16    {
  -          16        apr_filetype_e type;
  +          36    {
  +          36        apr_filetype_e type;
   		
  -          16        switch (mode & S_IFMT) {
  +          36        switch (mode & S_IFMT) {
   		    case S_IFREG:
  -          10            type = APR_REG;  break;
  +          30            type = APR_REG;  break;
   		    case S_IFDIR:
              6            type = APR_DIR;  break;
   		    case S_IFLNK:
  @@ -63,25 +63,25 @@
   		#endif
         ######            type = APR_UNKFILE;
   		    }
  -          16        return type;
  +          36        return type;
   		}
   		
   		static void fill_out_finfo(apr_finfo_t *finfo, struct stat *info,
   		                           apr_int32_t wanted)
  -          16    { 
  -          16        finfo->valid = APR_FINFO_MIN | APR_FINFO_IDENT | APR_FINFO_NLINK
  +          36    { 
  +          36        finfo->valid = APR_FINFO_MIN | APR_FINFO_IDENT | APR_FINFO_NLINK
   		                 | APR_FINFO_OWNER | APR_FINFO_PROT;
  -          16        finfo->protection = apr_unix_mode2perms(info->st_mode);
  -          16        finfo->filetype = filetype_from_mode(info->st_mode);
  -          16        finfo->user = info->st_uid;
  -          16        finfo->group = info->st_gid;
  -          16        finfo->size = info->st_size;
  -          16        finfo->inode = info->st_ino;
  -          16        finfo->device = info->st_dev;
  -          16        finfo->nlink = info->st_nlink;
  -          16        apr_time_ansi_put(&finfo->atime, info->st_atime);
  -          16        apr_time_ansi_put(&finfo->mtime, info->st_mtime);
  -          16        apr_time_ansi_put(&finfo->ctime, info->st_ctime);
  +          36        finfo->protection = apr_unix_mode2perms(info->st_mode);
  +          36        finfo->filetype = filetype_from_mode(info->st_mode);
  +          36        finfo->user = info->st_uid;
  +          36        finfo->group = info->st_gid;
  +          36        finfo->size = info->st_size;
  +          36        finfo->inode = info->st_ino;
  +          36        finfo->device = info->st_dev;
  +          36        finfo->nlink = info->st_nlink;
  +          36        apr_time_ansi_put(&finfo->atime, info->st_atime);
  +          36        apr_time_ansi_put(&finfo->mtime, info->st_mtime);
  +          36        apr_time_ansi_put(&finfo->ctime, info->st_ctime);
   		    /* ### needs to be revisited  
   		     * if (wanted & APR_FINFO_CSIZE) {
   		     *   finfo->csize = info->st_blocks * 512;
  @@ -93,20 +93,20 @@
   		APR_DECLARE(apr_status_t) apr_file_info_get(apr_finfo_t *finfo, 
   		                                            apr_int32_t wanted,
   		                                            apr_file_t *thefile)
  -           4    {
  -           4        struct stat info;
  +          10    {
  +          10        struct stat info;
   		
  -           4        if (thefile->buffered) {
  +          10        if (thefile->buffered) {
              1            apr_status_t rv = apr_file_flush(thefile);
              1            if (rv != APR_SUCCESS)
         ######                return rv;
   		    }
   		
  -           4        if (fstat(thefile->filedes, &info) == 0) {
  -           4            finfo->pool = thefile->pool;
  -           4            finfo->fname = thefile->fname;
  -           4            fill_out_finfo(finfo, &info, wanted);
  -           4            return (wanted & ~finfo->valid) ? APR_INCOMPLETE : APR_SUCCESS;
  +          10        if (fstat(thefile->filedes, &info) == 0) {
  +          10            finfo->pool = thefile->pool;
  +          10            finfo->fname = thefile->fname;
  +          10            fill_out_finfo(finfo, &info, wanted);
  +          10            return (wanted & ~finfo->valid) ? APR_INCOMPLETE : APR_SUCCESS;
   		    }
   		    else {
         ######            return errno;
  @@ -226,22 +226,22 @@
   		APR_DECLARE(apr_status_t) apr_stat(apr_finfo_t *finfo, 
   		                                   const char *fname, 
   		                                   apr_int32_t wanted, apr_pool_t *pool)
  -          15    {
  -          15        struct stat info;
  -          15        int srv;
  +          33    {
  +          33        struct stat info;
  +          33        int srv;
   		
  -          15        if (wanted & APR_FINFO_LINK)
  +          33        if (wanted & APR_FINFO_LINK)
              2            srv = lstat(fname, &info);
   		    else
  -          13            srv = stat(fname, &info);
  +          31            srv = stat(fname, &info);
   		
  -          15        if (srv == 0) {
  -          12            finfo->pool = pool;
  -          12            finfo->fname = fname;
  -          12            fill_out_finfo(finfo, &info, wanted);
  -          12            if (wanted & APR_FINFO_LINK)
  +          33        if (srv == 0) {
  +          26            finfo->pool = pool;
  +          26            finfo->fname = fname;
  +          26            fill_out_finfo(finfo, &info, wanted);
  +          26            if (wanted & APR_FINFO_LINK)
              2                wanted &= ~APR_FINFO_LINK;
  -          12            return (wanted & ~finfo->valid) ? APR_INCOMPLETE : APR_SUCCESS;
  +          26            return (wanted & ~finfo->valid) ? APR_INCOMPLETE : APR_SUCCESS;
   		    }
   		    else {
   		#if !defined(ENOENT) || !defined(ENOTDIR)
  @@ -273,7 +273,7 @@
   		            return errno;
   		#endif
   		#else /* All was defined well, report the usual: */
  -           3            return errno;
  +           7            return errno;
   		#endif
   		    }
   		}
  
  
  
  1.2       +12 -12    apr-site/docs/coverage/fullrw.c.gcov
  
  Index: fullrw.c.gcov
  ===================================================================
  RCS file: /home/cvs/apr-site/docs/coverage/fullrw.c.gcov,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- fullrw.c.gcov	9 Mar 2004 19:07:38 -0000	1.1
  +++ fullrw.c.gcov	19 Mar 2004 02:37:36 -0000	1.2
  @@ -42,21 +42,21 @@
   		                                              const void *buf,
   		                                              apr_size_t nbytes,
   		                                              apr_size_t *bytes_written)
  -        1000    {
  -        1000        apr_status_t status;
  -        1000        apr_size_t total_written = 0;
  +        1012    {
  +        1012        apr_status_t status;
  +        1012        apr_size_t total_written = 0;
   		
  -        2938        do {
  -        2938    	apr_size_t amt = nbytes;
  +        2950        do {
  +        2950    	apr_size_t amt = nbytes;
   		
  -        2938    	status = apr_file_write(thefile, buf, &amt);
  -        2938    	buf = (char *)buf + amt;
  -        2938            nbytes -= amt;
  -        2938            total_written += amt;
  -        2938        } while (status == APR_SUCCESS && nbytes > 0);
  +        2950    	status = apr_file_write(thefile, buf, &amt);
  +        2950    	buf = (char *)buf + amt;
  +        2950            nbytes -= amt;
  +        2950            total_written += amt;
  +        2950        } while (status == APR_SUCCESS && nbytes > 0);
   		
  -        1000        if (bytes_written != NULL)
  +        1012        if (bytes_written != NULL)
         ######            *bytes_written = total_written;
   		
  -        1000        return status;
  +        1012        return status;
   		}
  
  
  
  1.13      +10 -10    apr-site/docs/coverage/index.html
  
  Index: index.html
  ===================================================================
  RCS file: /home/cvs/apr-site/docs/coverage/index.html,v
  retrieving revision 1.12
  retrieving revision 1.13
  diff -u -r1.12 -r1.13
  --- index.html	16 Mar 2004 23:33:32 -0000	1.12
  +++ index.html	19 Mar 2004 02:37:36 -0000	1.13
  @@ -116,8 +116,8 @@
   <td bgcolor=#aaffaa><a href="common.c.gcov">common</a><br>
   <td bgcolor=#aaffaa> 80.00% tested
   <tr>
  -<td bgcolor=#ffaaaa><a href="copy.c.gcov">copy</a><br>
  -<td bgcolor=#ffaaaa>  0.00% tested
  +<td bgcolor=#aaffaa><a href="copy.c.gcov">copy</a><br>
  +<td bgcolor=#aaffaa> 68.18% tested
   <tr>
   <td bgcolor=#aaffaa><a href="dir.c.gcov">dir</a><br>
   <td bgcolor=#aaffaa> 78.05% tested
  @@ -166,14 +166,14 @@
   <td bgcolor=#aaffaa><a href="inet_pton.c.gcov">inet_pton</a><br>
   <td bgcolor=#aaffaa> 91.67% tested
   <tr>
  -<td bgcolor=#ffaaaa><a href="mktemp.c.gcov">mktemp</a><br>
  -<td bgcolor=#ffaaaa>  0.00% tested
  +<td bgcolor=#aaffaa><a href="mktemp.c.gcov">mktemp</a><br>
  +<td bgcolor=#aaffaa> 90.00% tested
   <tr>
   <td bgcolor=#aaffaa><a href="mmap.c.gcov">mmap</a><br>
   <td bgcolor=#aaffaa> 70.45% tested
   <tr>
   <td bgcolor=#aaffaa><a href="open.c.gcov">open</a><br>
  -<td bgcolor=#aaffaa> 76.52% tested
  +<td bgcolor=#aaffaa> 77.39% tested
   <tr>
   <td bgcolor=#ffff77><a href="otherchild.c.gcov">otherchild</a><br>
   <td bgcolor=#ffff77> 55.00% tested
  @@ -196,8 +196,8 @@
   <td bgcolor=#aaffaa><a href="rand.c.gcov">rand</a><br>
   <td bgcolor=#aaffaa> 70.00% tested
   <tr>
  -<td bgcolor=#ffff77><a href="readwrite.c.gcov">readwrite</a><br>
  -<td bgcolor=#ffff77> 65.96% tested
  +<td bgcolor=#aaffaa><a href="readwrite.c.gcov">readwrite</a><br>
  +<td bgcolor=#aaffaa> 67.55% tested
   <tr>
   <td bgcolor=#ffaaaa><a href="seek.c.gcov">seek</a><br>
   <td bgcolor=#ffaaaa> 18.60% tested
  @@ -229,8 +229,8 @@
   <td bgcolor=#aaffaa><a href="start.c.gcov">start</a><br>
   <td bgcolor=#aaffaa> 73.91% tested
   <tr>
  -<td bgcolor=#ffaaaa><a href="tempdir.c.gcov">tempdir</a><br>
  -<td bgcolor=#ffaaaa>  0.00% tested
  +<td bgcolor=#ffff77><a href="tempdir.c.gcov">tempdir</a><br>
  +<td bgcolor=#ffff77> 64.86% tested
   <tr>
   <td bgcolor=#ffff77><a href="thread.c.gcov">thread</a><br>
   <td bgcolor=#ffff77> 38.71% tested
  @@ -261,7 +261,7 @@
   <tr>
   <td bgcolor=#aaffaa><a href="waitio.c.gcov">waitio</a><br>
   <td bgcolor=#aaffaa> 92.86% tested
  -</table><p>Last generated Tue Mar 16 18:17:48 EST 2004</p>
  +</table><p>Last generated Thu Mar 18 21:19:27 EST 2004</p>
   </td></tr>
   </table>
      <!-- FOOTER -->
  
  
  
  1.2       +9 -9      apr-site/docs/coverage/mktemp.c.gcov
  
  Index: mktemp.c.gcov
  ===================================================================
  RCS file: /home/cvs/apr-site/docs/coverage/mktemp.c.gcov,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- mktemp.c.gcov	9 Mar 2004 19:07:38 -0000	1.1
  +++ mktemp.c.gcov	19 Mar 2004 02:37:36 -0000	1.2
  @@ -172,18 +172,18 @@
   		#endif /* !defined(HAVE_MKSTEMP) */
   		
   		APR_DECLARE(apr_status_t) apr_file_mktemp(apr_file_t **fp, char *template, apr_int32_t flags, apr_pool_t *p)
  -      ######    {
  +           3    {
   		#ifdef HAVE_MKSTEMP
  -      ######        int fd;
  +           3        int fd;
   		#endif
  -      ######        flags = (!flags) ? APR_CREATE | APR_READ | APR_WRITE | APR_EXCL | 
  +           3        flags = (!flags) ? APR_CREATE | APR_READ | APR_WRITE | APR_EXCL | 
   		                       APR_DELONCLOSE : flags;
   		#ifndef HAVE_MKSTEMP
   		    return gettemp(template, fp, flags, p);
   		#else
   		
  -      ######        fd = mkstemp(template);
  -      ######        if (fd == -1) {
  +           3        fd = mkstemp(template);
  +           3        if (fd == -1) {
         ######            return errno;
   		    }
   		    /* XXX: We must reset several flags values as passed-in, since
  @@ -193,12 +193,12 @@
   		     * xthread and inherit bits appropriately.  Since gettemp() above
   		     * calls apr_file_open, our flags are respected in that code path.
   		     */
  -      ######        apr_os_file_put(fp, &fd, flags, p);
  -      ######        (*fp)->fname = apr_pstrdup(p, template);
  +           3        apr_os_file_put(fp, &fd, flags, p);
  +           3        (*fp)->fname = apr_pstrdup(p, template);
   		
  -      ######        apr_pool_cleanup_register((*fp)->pool, (void *)(*fp),
  +           3        apr_pool_cleanup_register((*fp)->pool, (void *)(*fp),
   		                              apr_unix_file_cleanup, apr_unix_file_cleanup);
   		#endif
  -      ######        return APR_SUCCESS;
  +           3        return APR_SUCCESS;
   		}
   		
  
  
  
  1.6       +72 -72    apr-site/docs/coverage/open.c.gcov
  
  Index: open.c.gcov
  ===================================================================
  RCS file: /home/cvs/apr-site/docs/coverage/open.c.gcov,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- open.c.gcov	15 Mar 2004 18:43:28 -0000	1.5
  +++ open.c.gcov	19 Mar 2004 02:37:36 -0000	1.6
  @@ -26,20 +26,20 @@
   		#endif
   		
   		apr_status_t apr_unix_file_cleanup(void *thefile)
  -         151    {
  -         151        apr_file_t *file = thefile;
  -         151        apr_status_t flush_rv = APR_SUCCESS, rv = APR_SUCCESS;
  +         166    {
  +         166        apr_file_t *file = thefile;
  +         166        apr_status_t flush_rv = APR_SUCCESS, rv = APR_SUCCESS;
   		
  -         151        if (file->buffered) {
  +         166        if (file->buffered) {
              2            flush_rv = apr_file_flush(file);
   		    }
  -         151        if (close(file->filedes) == 0) {
  -         151            file->filedes = -1;
  -         151            if (file->flags & APR_DELONCLOSE) {
  -           8                unlink(file->fname);
  +         166        if (close(file->filedes) == 0) {
  +         166            file->filedes = -1;
  +         166            if (file->flags & APR_DELONCLOSE) {
  +          11                unlink(file->fname);
   		        }
   		#if APR_HAS_THREADS
  -         151            if (file->thlock) {
  +         166            if (file->thlock) {
         ######                rv = apr_thread_mutex_destroy(file->thlock);
   		        }
   		#endif
  @@ -48,7 +48,7 @@
   		        /* Are there any error conditions other than EINTR or EBADF? */
         ######            rv = errno;
   		    }
  -         151        return rv != APR_SUCCESS ? rv : flush_rv;
  +         166        return rv != APR_SUCCESS ? rv : flush_rv;
   		}
   		
   		APR_DECLARE(apr_status_t) apr_file_open(apr_file_t **new, 
  @@ -56,42 +56,42 @@
   		                                        apr_int32_t flag, 
   		                                        apr_fileperms_t perm, 
   		                                        apr_pool_t *pool)
  -          43    {
  -          43        apr_os_file_t fd;
  -          43        int oflags = 0;
  +          55    {
  +          55        apr_os_file_t fd;
  +          55        int oflags = 0;
   		#if APR_HAS_THREADS
  -          43        apr_thread_mutex_t *thlock;
  -          43        apr_status_t rv;
  +          55        apr_thread_mutex_t *thlock;
  +          55        apr_status_t rv;
   		#endif
   		
  -          43        if ((flag & APR_READ) && (flag & APR_WRITE)) {
  +          55        if ((flag & APR_READ) && (flag & APR_WRITE)) {
             11            oflags = O_RDWR;
   		    }
  -          32        else if (flag & APR_READ) {
  -          16            oflags = O_RDONLY;
  +          44        else if (flag & APR_READ) {
  +          22            oflags = O_RDONLY;
   		    }
  -          16        else if (flag & APR_WRITE) {
  -          15            oflags = O_WRONLY;
  +          22        else if (flag & APR_WRITE) {
  +          21            oflags = O_WRONLY;
   		    }
   		    else {
              1            return APR_EACCES; 
   		    }
   		
  -          42        if (flag & APR_CREATE) {
  -          18            oflags |= O_CREAT; 
  -          18            if (flag & APR_EXCL) {
  +          54        if (flag & APR_CREATE) {
  +          24            oflags |= O_CREAT; 
  +          24            if (flag & APR_EXCL) {
              5                oflags |= O_EXCL;
   		        }
   		    }
  -          42        if ((flag & APR_EXCL) && !(flag & APR_CREATE)) {
  +          54        if ((flag & APR_EXCL) && !(flag & APR_CREATE)) {
         ######            return APR_EACCES;
   		    }   
   		
  -          42        if (flag & APR_APPEND) {
  -      ######            oflags |= O_APPEND;
  +          54        if (flag & APR_APPEND) {
  +           1            oflags |= O_APPEND;
   		    }
  -          42        if (flag & APR_TRUNCATE) {
  -           4            oflags |= O_TRUNC;
  +          54        if (flag & APR_TRUNCATE) {
  +           9            oflags |= O_TRUNC;
   		    }
   		#ifdef O_BINARY
   		    if (flag & APR_BINARY) {
  @@ -100,7 +100,7 @@
   		#endif
   		    
   		#if APR_HAS_THREADS
  -          42        if ((flag & APR_BUFFERED) && (flag & APR_XTHREAD)) {
  +          54        if ((flag & APR_BUFFERED) && (flag & APR_XTHREAD)) {
         ######            rv = apr_thread_mutex_create(&thlock,
   		                                     APR_THREAD_MUTEX_DEFAULT, pool);
         ######            if (rv) {
  @@ -109,27 +109,27 @@
   		    }
   		#endif
   		
  -          42        if (perm == APR_OS_DEFAULT) {
  -          18            fd = open(fname, oflags, 0666);
  +          54        if (perm == APR_OS_DEFAULT) {
  +          24            fd = open(fname, oflags, 0666);
   		    }
   		    else {
  -          24            fd = open(fname, oflags, apr_unix_perms2mode(perm));
  +          30            fd = open(fname, oflags, apr_unix_perms2mode(perm));
   		    } 
  -          42        if (fd < 0) {
  +          54        if (fd < 0) {
              3           return errno;
   		    }
   		
  -          39        (*new) = (apr_file_t *)apr_pcalloc(pool, sizeof(apr_file_t));
  -          39        (*new)->pool = pool;
  -          39        (*new)->flags = flag;
  -          39        (*new)->filedes = fd;
  +          51        (*new) = (apr_file_t *)apr_pcalloc(pool, sizeof(apr_file_t));
  +          51        (*new)->pool = pool;
  +          51        (*new)->flags = flag;
  +          51        (*new)->filedes = fd;
   		
  -          39        (*new)->fname = apr_pstrdup(pool, fname);
  +          51        (*new)->fname = apr_pstrdup(pool, fname);
   		
  -          39        (*new)->blocking = BLK_ON;
  -          39        (*new)->buffered = (flag & APR_BUFFERED) > 0;
  +          51        (*new)->blocking = BLK_ON;
  +          51        (*new)->buffered = (flag & APR_BUFFERED) > 0;
   		
  -          39        if ((*new)->buffered) {
  +          51        if ((*new)->buffered) {
              2            (*new)->buffer = apr_palloc(pool, APR_FILE_BUFSIZE);
   		#if APR_HAS_THREADS
              2            if ((*new)->flags & APR_XTHREAD) {
  @@ -138,42 +138,42 @@
   		#endif
   		    }
   		    else {
  -          37            (*new)->buffer = NULL;
  +          49            (*new)->buffer = NULL;
   		    }
   		
  -          39        (*new)->is_pipe = 0;
  -          39        (*new)->timeout = -1;
  -          39        (*new)->ungetchar = -1;
  -          39        (*new)->eof_hit = 0;
  -          39        (*new)->filePtr = 0;
  -          39        (*new)->bufpos = 0;
  -          39        (*new)->dataRead = 0;
  -          39        (*new)->direction = 0;
  +          51        (*new)->is_pipe = 0;
  +          51        (*new)->timeout = -1;
  +          51        (*new)->ungetchar = -1;
  +          51        (*new)->eof_hit = 0;
  +          51        (*new)->filePtr = 0;
  +          51        (*new)->bufpos = 0;
  +          51        (*new)->dataRead = 0;
  +          51        (*new)->direction = 0;
   		#ifndef WAITIO_USES_POLL
   		    /* Create a pollset with room for one descriptor. */
   		    /* ### check return codes */
   		    (void) apr_pollset_create(&(*new)->pollset, 1, pool, 0);
   		#endif
  -          39        if (!(flag & APR_FILE_NOCLEANUP)) {
  -          39            apr_pool_cleanup_register((*new)->pool, (void *)(*new), 
  +          51        if (!(flag & APR_FILE_NOCLEANUP)) {
  +          51            apr_pool_cleanup_register((*new)->pool, (void *)(*new), 
   		                                  apr_unix_file_cleanup, 
   		                                  apr_unix_file_cleanup);
   		    }
  -          39        return APR_SUCCESS;
  +          51        return APR_SUCCESS;
   		}
   		
   		APR_DECLARE(apr_status_t) apr_file_close(apr_file_t *file)
  -          69    {
  -          69        return apr_pool_cleanup_run(file->pool, file, apr_unix_file_cleanup);
  +          83    {
  +          83        return apr_pool_cleanup_run(file->pool, file, apr_unix_file_cleanup);
   		}
   		
   		APR_DECLARE(apr_status_t) apr_file_remove(const char *path, apr_pool_t *pool)
  -          11    {
  -          11        if (unlink(path) == 0) {
  -          10            return APR_SUCCESS;
  +          19    {
  +          19        if (unlink(path) == 0) {
  +          14            return APR_SUCCESS;
   		    }
   		    else {
  -           1            return errno;
  +           5            return errno;
   		    }
   		}
   		
  @@ -197,18 +197,18 @@
   		APR_DECLARE(apr_status_t) apr_os_file_put(apr_file_t **file, 
   		                                          apr_os_file_t *thefile,
   		                                          apr_int32_t flags, apr_pool_t *pool)
  -           4    {
  -           4        int *dafile = thefile;
  +           7    {
  +           7        int *dafile = thefile;
   		    
  -           4        (*file) = apr_pcalloc(pool, sizeof(apr_file_t));
  -           4        (*file)->pool = pool;
  -           4        (*file)->eof_hit = 0;
  -           4        (*file)->blocking = BLK_UNKNOWN; /* in case it is a pipe */
  -           4        (*file)->timeout = -1;
  -           4        (*file)->ungetchar = -1; /* no char avail */
  -           4        (*file)->filedes = *dafile;
  -           4        (*file)->flags = flags | APR_FILE_NOCLEANUP;
  -           4        (*file)->buffered = (flags & APR_BUFFERED) > 0;
  +           7        (*file) = apr_pcalloc(pool, sizeof(apr_file_t));
  +           7        (*file)->pool = pool;
  +           7        (*file)->eof_hit = 0;
  +           7        (*file)->blocking = BLK_UNKNOWN; /* in case it is a pipe */
  +           7        (*file)->timeout = -1;
  +           7        (*file)->ungetchar = -1; /* no char avail */
  +           7        (*file)->filedes = *dafile;
  +           7        (*file)->flags = flags | APR_FILE_NOCLEANUP;
  +           7        (*file)->buffered = (flags & APR_BUFFERED) > 0;
   		
   		#ifndef WAITIO_USES_POLL
   		    /* Create a pollset with room for one descriptor. */
  @@ -216,7 +216,7 @@
   		    (void) apr_pollset_create(&(*file)->pollset, 1, pool, 0);
   		#endif
   		
  -           4        if ((*file)->buffered) {
  +           7        if ((*file)->buffered) {
         ######            (*file)->buffer = apr_palloc(pool, APR_FILE_BUFSIZE);
   		#if APR_HAS_THREADS
         ######            if ((*file)->flags & APR_XTHREAD) {
  @@ -229,7 +229,7 @@
   		        }
   		#endif
   		    }
  -           4        return APR_SUCCESS;
  +           7        return APR_SUCCESS;
   		}    
   		
   		APR_DECLARE(apr_status_t) apr_file_eof(apr_file_t *fptr)
  
  
  
  1.4       +34 -34    apr-site/docs/coverage/readwrite.c.gcov
  
  Index: readwrite.c.gcov
  ===================================================================
  RCS file: /home/cvs/apr-site/docs/coverage/readwrite.c.gcov,v
  retrieving revision 1.3
  retrieving revision 1.4
  diff -u -r1.3 -r1.4
  --- readwrite.c.gcov	15 Mar 2004 03:38:39 -0000	1.3
  +++ readwrite.c.gcov	19 Mar 2004 02:37:36 -0000	1.4
  @@ -28,16 +28,16 @@
   		 * 1) ungetchar not used for buffered files
   		 */
   		APR_DECLARE(apr_status_t) apr_file_read(apr_file_t *thefile, void *buf, apr_size_t *nbytes)
  -       62569    {
  -       62569        apr_ssize_t rv;
  -       62569        apr_size_t bytes_read;
  +       62581    {
  +       62581        apr_ssize_t rv;
  +       62581        apr_size_t bytes_read;
   		
  -       62569        if (*nbytes <= 0) {
  +       62581        if (*nbytes <= 0) {
         ######            *nbytes = 0;
         ######            return APR_SUCCESS;
   		    }
   		
  -       62569        if (thefile->buffered) {
  +       62581        if (thefile->buffered) {
         ######            char *pos = (char *)buf;
         ######            apr_uint64_t blocksize;
         ######            apr_uint64_t size = *nbytes;
  @@ -98,8 +98,8 @@
         ######            return rv;
   		    }
   		    else {
  -       62569            bytes_read = 0;
  -       62569            if (thefile->ungetchar != -1) {
  +       62581            bytes_read = 0;
  +       62581            if (thefile->ungetchar != -1) {
              1                bytes_read = 1;
              1                *(char *)buf = (char)thefile->ungetchar;
              1                buf = (char *)buf + 1;
  @@ -111,11 +111,11 @@
   		            }
   		        }
   		
  -       62568            do {
  -       62568                rv = read(thefile->filedes, buf, *nbytes);
  -       62568            } while (rv == -1 && errno == EINTR);
  +       62580            do {
  +       62580                rv = read(thefile->filedes, buf, *nbytes);
  +       62580            } while (rv == -1 && errno == EINTR);
   		#ifdef USE_WAIT_FOR_IO
  -       62568            if (rv == -1 && 
  +       62580            if (rv == -1 && 
   		            (errno == EAGAIN || errno == EWOULDBLOCK) && 
   		            thefile->timeout != 0) {
              2                apr_status_t arv = apr_wait_for_io_or_timeout(thefile, NULL, 1);
  @@ -130,24 +130,24 @@
   		            }
   		        }  
   		#endif
  -       62567            *nbytes = bytes_read;
  -       62567            if (rv == 0) {
  -           3                thefile->eof_hit = TRUE;
  -           3                return APR_EOF;
  -		        }
  -       62564            if (rv > 0) {
  -       62562                *nbytes += rv;
  -       62562                return APR_SUCCESS;
  +       62579            *nbytes = bytes_read;
  +       62579            if (rv == 0) {
  +           9                thefile->eof_hit = TRUE;
  +           9                return APR_EOF;
  +		        }
  +       62570            if (rv > 0) {
  +       62568                *nbytes += rv;
  +       62568                return APR_SUCCESS;
   		        }
              2            return errno;
   		    }
   		}
   		
   		APR_DECLARE(apr_status_t) apr_file_write(apr_file_t *thefile, const void *buf, apr_size_t *nbytes)
  -       20931    {
  -       20931        apr_size_t rv;
  +       20945    {
  +       20945        apr_size_t rv;
   		
  -       20931        if (thefile->buffered) {
  +       20945        if (thefile->buffered) {
              1            char *pos = (char *)buf;
              1            int blocksize;
              1            int size = *nbytes;
  @@ -194,11 +194,11 @@
              1            return rv;
   		    }
   		    else {
  -       20930            do {
  -       20930                rv = write(thefile->filedes, buf, *nbytes);
  -       20930            } while (rv == (apr_size_t)-1 && errno == EINTR);
  +       20944            do {
  +       20944                rv = write(thefile->filedes, buf, *nbytes);
  +       20944            } while (rv == (apr_size_t)-1 && errno == EINTR);
   		#ifdef USE_WAIT_FOR_IO
  -       20930            if (rv == (apr_size_t)-1 &&
  +       20944            if (rv == (apr_size_t)-1 &&
   		            (errno == EAGAIN || errno == EWOULDBLOCK) && 
   		            thefile->timeout != 0) {
           1953                apr_status_t arv = apr_wait_for_io_or_timeout(thefile, NULL, 0);
  @@ -218,18 +218,18 @@
   		                                       */
   		                    }
   		                    else {
  -       20930                            break;
  +       20944                            break;
   		                    }
  -       20930                    } while (1);
  +       20944                    } while (1);
   		            }
   		        }  
   		#endif
  -       20930            if (rv == (apr_size_t)-1) {
  +       20944            if (rv == (apr_size_t)-1) {
         ######                (*nbytes) = 0;
         ######                return errno;
   		        }
  -       20930            *nbytes = rv;
  -       20930            return APR_SUCCESS;
  +       20944            *nbytes = rv;
  +       20944            return APR_SUCCESS;
   		    }
   		}
   		
  @@ -254,10 +254,10 @@
   		}
   		
   		APR_DECLARE(apr_status_t) apr_file_putc(char ch, apr_file_t *thefile)
  -      ######    {
  -      ######        apr_size_t nbytes = 1;
  +           2    {
  +           2        apr_size_t nbytes = 1;
   		
  -      ######        return apr_file_write(thefile, &ch, &nbytes);
  +           2        return apr_file_write(thefile, &ch, &nbytes);
   		}
   		
   		APR_DECLARE(apr_status_t) apr_file_ungetc(char ch, apr_file_t *thefile)
  
  
  
  1.2       +25 -25    apr-site/docs/coverage/tempdir.c.gcov
  
  Index: tempdir.c.gcov
  ===================================================================
  RCS file: /home/cvs/apr-site/docs/coverage/tempdir.c.gcov,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -r1.1 -r1.2
  --- tempdir.c.gcov	9 Mar 2004 19:07:38 -0000	1.1
  +++ tempdir.c.gcov	19 Mar 2004 02:37:36 -0000	1.2
  @@ -21,14 +21,14 @@
   		/* Try to open a temporary file in the temporary dir, write to it,
   		   and then close it. */
   		static int test_tempdir(const char *temp_dir, apr_pool_t *p)
  -      ######    {
  -      ######        apr_file_t *dummy_file;
  -      ######        const char *path = apr_pstrcat(p, temp_dir, "/apr-tmp.XXXXXX", NULL);
  -		
  -      ######        if (apr_file_mktemp(&dummy_file, (char *)path, 0, p) == APR_SUCCESS) {
  -      ######            if (apr_file_putc('!', dummy_file) == APR_SUCCESS) {
  -      ######                if (apr_file_close(dummy_file) == APR_SUCCESS) {
  -      ######                    return 1;
  +           2    {
  +           2        apr_file_t *dummy_file;
  +           2        const char *path = apr_pstrcat(p, temp_dir, "/apr-tmp.XXXXXX", NULL);
  +		
  +           2        if (apr_file_mktemp(&dummy_file, (char *)path, 0, p) == APR_SUCCESS) {
  +           2            if (apr_file_putc('!', dummy_file) == APR_SUCCESS) {
  +           2                if (apr_file_close(dummy_file) == APR_SUCCESS) {
  +           2                    return 1;
   		            }
   		        }
   		    }
  @@ -38,13 +38,13 @@
   		
   		APR_DECLARE(apr_status_t) apr_temp_dir_get(const char **temp_dir, 
   		                                           apr_pool_t *p)
  -      ######    {
  -      ######        apr_status_t apr_err;
  -      ######        const char *try_dirs[] = { "/tmp", "/usr/tmp", "/var/tmp" };
  -      ######        const char *try_envs[] = { "TMP", "TEMP", "TMPDIR" };
  -      ######        const char *dir;
  -      ######        char *cwd;
  -      ######        int i;
  +           2    {
  +           2        apr_status_t apr_err;
  +           2        const char *try_dirs[] = { "/tmp", "/usr/tmp", "/var/tmp" };
  +           2        const char *try_envs[] = { "TMP", "TEMP", "TMPDIR" };
  +           2        const char *dir;
  +           2        char *cwd;
  +           2        int i;
   		
   		    /* Our goal is to find a temporary directory suitable for writing
   		       into.  We'll only pay the price once if we're successful -- we
  @@ -66,10 +66,10 @@
   		       2.2's tempfile.py module.  */
   		
   		    /* Try the environment first. */
  -      ######        for (i = 0; i < (sizeof(try_envs) / sizeof(const char *)); i++) {
  -      ######            char *value;
  -      ######            apr_err = apr_env_get(&value, try_envs[i], p);
  -      ######            if ((apr_err == APR_SUCCESS) && value) {
  +           8        for (i = 0; i < (sizeof(try_envs) / sizeof(const char *)); i++) {
  +           6            char *value;
  +           6            apr_err = apr_env_get(&value, try_envs[i], p);
  +           6            if ((apr_err == APR_SUCCESS) && value) {
         ######                apr_size_t len = strlen(value);
         ######                if (len && (len < APR_PATH_MAX) && test_tempdir(value, p)) {
         ######                    dir = value;
  @@ -94,10 +94,10 @@
   		#endif
   		
   		    /* Next, try a set of hard-coded paths. */
  -      ######        for (i = 0; i < (sizeof(try_dirs) / sizeof(const char *)); i++) {
  -      ######            if (test_tempdir(try_dirs[i], p)) {
  -      ######                dir = try_dirs[i];
  -      ######                goto end;
  +           2        for (i = 0; i < (sizeof(try_dirs) / sizeof(const char *)); i++) {
  +           2            if (test_tempdir(try_dirs[i], p)) {
  +           2                dir = try_dirs[i];
  +           2                goto end;
   		        }
   		    }
   		
  @@ -124,6 +124,6 @@
         ######        return APR_EGENERAL;
   		
   		end:
  -      ######        *temp_dir = apr_pstrdup(p, dir);
  -      ######        return APR_SUCCESS;
  +           2        *temp_dir = apr_pstrdup(p, dir);
  +           2        return APR_SUCCESS;
   		}
  
  
  
  1.6       +3 -3      apr-site/docs/coverage/time.c.gcov
  
  Index: time.c.gcov
  ===================================================================
  RCS file: /home/cvs/apr-site/docs/coverage/time.c.gcov,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- time.c.gcov	15 Mar 2004 18:43:29 -0000	1.5
  +++ time.c.gcov	19 Mar 2004 02:37:36 -0000	1.6
  @@ -63,9 +63,9 @@
   		
   		APR_DECLARE(apr_status_t) apr_time_ansi_put(apr_time_t *result,
   		                                            time_t input)
  -          48    {
  -          48        *result = (apr_time_t)input * APR_USEC_PER_SEC;
  -          48        return APR_SUCCESS;
  +         108    {
  +         108        *result = (apr_time_t)input * APR_USEC_PER_SEC;
  +         108        return APR_SUCCESS;
   		}
   		
   		/* NB NB NB NB This returns GMT!!!!!!!!!! */
  
  
  

Mime
View raw message