LTP GCOV extension - code coverage report
Current view: directory - src - vstr_sc_noposix.c
Test: Vstr coverage
Date: 2005-01-10 Instrumented lines: 13
Code covered: 100.0 % Executed lines: 13

       1                 : #define VSTR_SC_NOPOSIX_C
       2                 : /*
       3                 :  *  Copyright (C) 2002, 2003, 2004  James Antill
       4                 :  *
       5                 :  *  This library is free software; you can redistribute it and/or
       6                 :  *  modify it under the terms of the GNU Lesser General Public
       7                 :  *  License as published by the Free Software Foundation; either
       8                 :  *  version 2 of the License, or (at your option) any later version.
       9                 :  *
      10                 :  *  This library is distributed in the hope that it will be useful,
      11                 :  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
      12                 :  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
      13                 :  *  Lesser General Public License for more details.
      14                 :  *
      15                 :  *  You should have received a copy of the GNU Lesser General Public
      16                 :  *  License along with this library; if not, write to the Free Software
      17                 :  *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
      18                 :  *
      19                 :  *  email: james@and.org
      20                 :  */
      21                 : /* STUBS for - functions which are POSIX shortcuts */
      22                 : #include "main.h"
      23                 : 
      24                 : # define VSTR__SC_ENOSYS(x) \
      25                 :   if (err) \
      26                 :   { \
      27                 :     errno = ENOSYS; \
      28                 :     *err = (x); \
      29                 :   } \
      30                 :   \
      31                 :   return (FALSE)
      32                 : 
      33                 : int vstr_sc_mmap_fd(Vstr_base *VSTR__ATTR_UNUSED(base),
      34                 :                     size_t VSTR__ATTR_UNUSED(pos),
      35                 :                     int VSTR__ATTR_UNUSED(fd),
      36                 :                     VSTR_AUTOCONF_off64_t VSTR__ATTR_UNUSED(off),
      37                 :                     size_t VSTR__ATTR_UNUSED(len),
      38                 :                     unsigned int *err)
      39               2 : { VSTR__SC_ENOSYS(VSTR_TYPE_SC_MMAP_FD_ERR_MMAP_ERRNO); }
      40                 : 
      41                 : int vstr_sc_mmap_file(Vstr_base *VSTR__ATTR_UNUSED(base),
      42                 :                       size_t VSTR__ATTR_UNUSED(pos),
      43                 :                       const char *VSTR__ATTR_UNUSED(filename),
      44                 :                       VSTR_AUTOCONF_off64_t VSTR__ATTR_UNUSED(off),
      45                 :                       size_t VSTR__ATTR_UNUSED(len),
      46                 :                       unsigned int *err)
      47               1 : { VSTR__SC_ENOSYS(VSTR_TYPE_SC_MMAP_FD_ERR_MMAP_ERRNO); }
      48                 : 
      49                 : int vstr_sc_read_iov_fd(Vstr_base *VSTR__ATTR_UNUSED(base),
      50                 :                         size_t VSTR__ATTR_UNUSED(pos),
      51                 :                         int VSTR__ATTR_UNUSED(fd),
      52                 :                         unsigned int VSTR__ATTR_UNUSED(min),
      53                 :                         unsigned int VSTR__ATTR_UNUSED(max),
      54                 :                         unsigned int *err)
      55               1 : { VSTR__SC_ENOSYS(VSTR_TYPE_SC_READ_FD_ERR_READ_ERRNO); }
      56                 : 
      57                 : int vstr_sc_read_len_fd(Vstr_base *VSTR__ATTR_UNUSED(base),
      58                 :                         size_t VSTR__ATTR_UNUSED(pos),
      59                 :                         int VSTR__ATTR_UNUSED(fd),
      60                 :                         size_t VSTR__ATTR_UNUSED(len),
      61                 :                         unsigned int *err)
      62               1 : { VSTR__SC_ENOSYS(VSTR_TYPE_SC_READ_FD_ERR_READ_ERRNO); }
      63                 : 
      64                 : int vstr_sc_read_iov_file(Vstr_base *VSTR__ATTR_UNUSED(base),
      65                 :                           size_t VSTR__ATTR_UNUSED(pos),
      66                 :                           const char *VSTR__ATTR_UNUSED(filename),
      67                 :                           VSTR_AUTOCONF_off64_t VSTR__ATTR_UNUSED(off),
      68                 :                           unsigned int VSTR__ATTR_UNUSED(min),
      69                 :                           unsigned int VSTR__ATTR_UNUSED(max),
      70                 :                           unsigned int *err)
      71               1 : { VSTR__SC_ENOSYS(VSTR_TYPE_SC_READ_FILE_ERR_READ_ERRNO); }
      72                 : 
      73                 : int vstr_sc_read_len_file(Vstr_base *VSTR__ATTR_UNUSED(base),
      74                 :                           size_t VSTR__ATTR_UNUSED(pos),
      75                 :                           const char *VSTR__ATTR_UNUSED(filename),
      76                 :                           VSTR_AUTOCONF_off64_t VSTR__ATTR_UNUSED(off),
      77                 :                           size_t VSTR__ATTR_UNUSED(len),
      78                 :                           unsigned int *err)
      79               1 : { VSTR__SC_ENOSYS(VSTR_TYPE_SC_READ_FILE_ERR_READ_ERRNO); }
      80                 : 
      81                 : int vstr_sc_write_fd(Vstr_base *VSTR__ATTR_UNUSED(base),
      82                 :                      size_t VSTR__ATTR_UNUSED(pos),
      83                 :                      size_t VSTR__ATTR_UNUSED(len),
      84                 :                      int VSTR__ATTR_UNUSED(fd),
      85                 :                      unsigned int *err)
      86               1 : { VSTR__SC_ENOSYS(VSTR_TYPE_SC_WRITE_FD_ERR_WRITE_ERRNO); }
      87                 : 
      88                 : int vstr_sc_write_file(Vstr_base *VSTR__ATTR_UNUSED(base),
      89                 :                        size_t VSTR__ATTR_UNUSED(pos),
      90                 :                        size_t VSTR__ATTR_UNUSED(len),
      91                 :                        const char *VSTR__ATTR_UNUSED(filename),
      92                 :                        int VSTR__ATTR_UNUSED(open_flags),
      93                 :                        VSTR_AUTOCONF_mode_t VSTR__ATTR_UNUSED(mode),
      94                 :                        VSTR_AUTOCONF_off64_t VSTR__ATTR_UNUSED(off),
      95                 :                        unsigned int *err)
      96               1 : { VSTR__SC_ENOSYS(VSTR_TYPE_SC_WRITE_FD_ERR_WRITE_ERRNO); }
      97                 : 
      98                 : int vstr_sc_fmt_add_ipv4_ptr(Vstr_conf *VSTR__ATTR_UNUSED(conf),
      99                 :                              const char *VSTR__ATTR_UNUSED(name))
     100                 : {
     101               1 :   return (FALSE);
     102                 : }
     103                 : 
     104                 : int vstr_sc_fmt_add_ipv6_ptr(Vstr_conf *VSTR__ATTR_UNUSED(conf),
     105                 :                              const char *VSTR__ATTR_UNUSED(name))
     106               1 : {
     107               1 :   return (FALSE);
     108                 : }
     109                 : 
     110                 : int vstr__sc_fmt_add_posix(Vstr_conf *VSTR__ATTR_UNUSED(conf))
     111              16 : {
     112              16 :   return (TRUE);
     113                 : }

Generated by: LTP GCOV extension version 1.1