LTP GCOV extension - code coverage report
Current view: directory - work/ustr - ustr-sub.h
Test: Ustr coverage
Date: 2008-02-26 Instrumented lines: 4
Code covered: 100.0 % Executed lines: 4

       1                 : /* Copyright (c) 2007 Paul Rosenfeld
       2                 :                       James Antill -- See LICENSE file for terms. */
       3                 : #ifndef USTR_SUB_H
       4                 : #define USTR_SUB_H 1
       5                 : 
       6                 : #ifndef USTR_MAIN_H
       7                 : # error " You should include ustr-main.h before this file, or just ustr.h"
       8                 : #endif
       9                 : 
      10                 : #define USTR_SUB_OBJ(x, y, z)  ustr_sub_buf(x, y, z, sizeof(z))
      11                 : #define USTR_SUB_OSTR(x, y, z) ustr_sub_buf(x, y, z, sizeof(z) - 1)
      12                 : 
      13                 : #define USTRP_SUB_OBJ(p, x, y, z)  ustrp_sub_buf(p, x, y, z, sizeof(z))
      14                 : #define USTRP_SUB_OSTR(p, x, y, z) ustrp_sub_buf(p, x, y, z, sizeof(z) - 1)
      15                 : 
      16                 : #define USTR_SC_SUB_OBJ(w, x, y, z)  ustr_sc_sub_buf(w, x, y, z, sizeof(z))
      17                 : #define USTR_SC_SUB_OSTR(w, x, y, z) ustr_sc_sub_buf(w, x, y, z, sizeof(z) - 1)
      18                 : 
      19                 : #define USTRP_SC_SUB_OBJ(p, w, x, y, z)         \
      20                 :     ustrp_sc_sub_buf(p, w, x, y, z, sizeof(z))
      21                 : #define USTRP_SC_SUB_OSTR(p, w, x, y, z)        \
      22                 :     ustrp_sc_sub_buf(p, w, x, y, z, sizeof(z) - 1)
      23                 : 
      24                 : 
      25                 : USTR_CONF_E_PROTO int ustr_sub_undef(struct Ustr **ps1, size_t, size_t)
      26                 :     USTR__COMPILE_ATTR_NONNULL_A();
      27                 : USTR_CONF_E_PROTO int ustr_sub_buf(struct Ustr **, size_t, const void *, size_t)
      28                 :     USTR__COMPILE_ATTR_NONNULL_A();
      29                 : USTR_CONF_E_PROTO int ustr_sub(struct Ustr **, size_t, const struct Ustr *)
      30                 :     USTR__COMPILE_ATTR_NONNULL_A();
      31                 : USTR_CONF_EI_PROTO int ustr_sub_cstr(struct Ustr **, size_t, const char *)
      32                 :     USTR__COMPILE_ATTR_NONNULL_A();
      33                 : USTR_CONF_E_PROTO
      34                 : int ustr_sub_subustr(struct Ustr **, size_t, const struct Ustr *, size_t,size_t)
      35                 :     USTR__COMPILE_ATTR_NONNULL_A();
      36                 : USTR_CONF_E_PROTO int ustr_sub_rep_chr(struct Ustr **, size_t, char, size_t)
      37                 :     USTR__COMPILE_ATTR_NONNULL_A();
      38                 : 
      39                 : USTR_CONF_E_PROTO
      40                 : int ustrp_sub_undef(struct Ustr_pool *, struct Ustrp **, size_t, size_t)
      41                 :     USTR__COMPILE_ATTR_NONNULL_L((2));
      42                 : USTR_CONF_E_PROTO
      43                 : int ustrp_sub_buf(struct Ustr_pool *,struct Ustrp **,size_t,const void *,size_t)
      44                 :     USTR__COMPILE_ATTR_NONNULL_L((2, 4));
      45                 : USTR_CONF_E_PROTO
      46                 : int ustrp_sub(struct Ustr_pool *, struct Ustrp **, size_t, const struct Ustrp *)
      47                 :     USTR__COMPILE_ATTR_NONNULL_L((2, 4));
      48                 : USTR_CONF_EI_PROTO
      49                 : int ustrp_sub_cstr(struct Ustr_pool *, struct Ustrp **, size_t, const char *)
      50                 :     USTR__COMPILE_ATTR_NONNULL_L((2, 4));
      51                 : USTR_CONF_E_PROTO
      52                 : int ustrp_sub_subustrp(struct Ustr_pool *, struct Ustrp **, size_t,
      53                 :                        const struct Ustrp *, size_t,size_t)
      54                 :     USTR__COMPILE_ATTR_NONNULL_L((2, 4));
      55                 : USTR_CONF_E_PROTO
      56                 : int ustrp_sub_rep_chr(struct Ustr_pool *, struct Ustrp **, size_t, char, size_t)
      57                 :     USTR__COMPILE_ATTR_NONNULL_L((2));
      58                 : 
      59                 : USTR_CONF_E_PROTO
      60                 : int ustr_sc_sub_undef(struct Ustr **, size_t, size_t, size_t)
      61                 :     USTR__COMPILE_ATTR_NONNULL_A();
      62                 : USTR_CONF_E_PROTO
      63                 : int ustr_sc_sub_buf(struct Ustr **, size_t, size_t, const void *, size_t)
      64                 :     USTR__COMPILE_ATTR_NONNULL_A();
      65                 : USTR_CONF_E_PROTO
      66                 : int ustr_sc_sub(struct Ustr **, size_t, size_t, const struct Ustr *)
      67                 :     USTR__COMPILE_ATTR_NONNULL_A();
      68                 : USTR_CONF_EI_PROTO
      69                 : int ustr_sc_sub_cstr(struct Ustr **, size_t, size_t, const char *)
      70                 :     USTR__COMPILE_ATTR_NONNULL_A();
      71                 : USTR_CONF_E_PROTO
      72                 : int ustr_sc_sub_subustr(struct Ustr **, size_t, size_t,
      73                 :                         const struct Ustr *, size_t, size_t)
      74                 :     USTR__COMPILE_ATTR_NONNULL_A();
      75                 : USTR_CONF_E_PROTO
      76                 : int ustr_sc_sub_rep_chr(struct Ustr **, size_t, size_t, char, size_t)
      77                 :     USTR__COMPILE_ATTR_NONNULL_A();
      78                 : 
      79                 : USTR_CONF_E_PROTO
      80                 : int ustrp_sc_sub_undef(struct Ustr_pool *, struct Ustrp **,size_t,size_t,size_t)
      81                 :     USTR__COMPILE_ATTR_NONNULL_L((2));
      82                 : USTR_CONF_E_PROTO
      83                 : int ustrp_sc_sub_buf(struct Ustr_pool *, struct Ustrp **, size_t, size_t,
      84                 :                      const void *, size_t)
      85                 :     USTR__COMPILE_ATTR_NONNULL_L((2, 5));
      86                 : USTR_CONF_E_PROTO
      87                 : int ustrp_sc_sub(struct Ustr_pool *, struct Ustrp **, size_t, size_t,
      88                 :                  const struct Ustrp *)
      89                 :     USTR__COMPILE_ATTR_NONNULL_L((2, 5));
      90                 : USTR_CONF_EI_PROTO
      91                 : int ustrp_sc_sub_cstr(struct Ustr_pool *, struct Ustrp **, size_t, size_t,
      92                 :                       const char *)
      93                 :     USTR__COMPILE_ATTR_NONNULL_L((2, 5));
      94                 : USTR_CONF_E_PROTO
      95                 : int ustrp_sc_sub_subustrp(struct Ustr_pool *, struct Ustrp **, size_t, size_t,
      96                 :                           const struct Ustrp *, size_t, size_t)
      97                 :     USTR__COMPILE_ATTR_NONNULL_L((2, 5));
      98                 : USTR_CONF_E_PROTO
      99                 : int ustrp_sc_sub_rep_chr(struct Ustr_pool *, struct Ustrp **, size_t, size_t,
     100                 :                          char, size_t)
     101                 :     USTR__COMPILE_ATTR_NONNULL_L((2));
     102                 : 
     103                 : 
     104                 : #ifdef USTR_FMT_H
     105                 : # if USTR_CONF_HAVE_VA_COPY
     106                 : /* sub_fmt */
     107                 : USTR_CONF_E_PROTO
     108                 : int ustr_sub_vfmt_lim(struct Ustr **, size_t, size_t, const char *, va_list)
     109                 :     USTR__COMPILE_ATTR_NONNULL_L((1, 4)) USTR__COMPILE_ATTR_FMT(4, 0);
     110                 : USTR_CONF_E_PROTO
     111                 : int ustr_sub_vfmt(struct Ustr **, size_t, const char *, va_list)
     112                 :     USTR__COMPILE_ATTR_NONNULL_L((1, 3)) USTR__COMPILE_ATTR_FMT(3, 0);
     113                 : 
     114                 : USTR_CONF_E_PROTO
     115                 : int ustrp_sub_vfmt_lim(struct Ustr_pool *, struct Ustrp **, size_t, size_t,
     116                 :                        const char *, va_list)
     117                 :     USTR__COMPILE_ATTR_NONNULL_L((2, 5)) USTR__COMPILE_ATTR_FMT(5, 0);
     118                 : USTR_CONF_E_PROTO int ustrp_sub_vfmt(struct Ustr_pool *, struct Ustrp **,size_t,
     119                 :                                      const char *, va_list)
     120                 :     USTR__COMPILE_ATTR_NONNULL_L((2, 4)) USTR__COMPILE_ATTR_FMT(4, 0);
     121                 : USTR_CONF_E_PROTO
     122                 : int ustr_sub_fmt_lim(struct Ustr **, size_t, size_t, const char *, ...)
     123                 :     USTR__COMPILE_ATTR_NONNULL_L((1, 4)) USTR__COMPILE_ATTR_FMT(4, 5);
     124                 : USTR_CONF_E_PROTO int ustr_sub_fmt(struct Ustr **, size_t, const char *, ...)
     125                 :     USTR__COMPILE_ATTR_NONNULL_L((1, 3)) USTR__COMPILE_ATTR_FMT(3, 4);
     126                 : 
     127                 : USTR_CONF_E_PROTO
     128                 : int ustrp_sub_fmt_lim(struct Ustr_pool *, struct Ustrp **, size_t, size_t,
     129                 :                       const char *, ...)
     130                 :     USTR__COMPILE_ATTR_NONNULL_L((2, 5)) USTR__COMPILE_ATTR_FMT(5, 6);
     131                 : USTR_CONF_E_PROTO
     132                 : int ustrp_sub_fmt(struct Ustr_pool *, struct Ustrp **,size_t, const char *, ...)
     133                 :     USTR__COMPILE_ATTR_NONNULL_L((2, 4)) USTR__COMPILE_ATTR_FMT(4, 5);
     134                 : 
     135                 : /* sc_sub_fmt */
     136                 : USTR_CONF_E_PROTO
     137                 : int ustr_sc_sub_vfmt_lim(struct Ustr **, size_t, size_t,
     138                 :                          size_t, const char *, va_list)
     139                 :     USTR__COMPILE_ATTR_NONNULL_L((1, 5)) USTR__COMPILE_ATTR_FMT(5, 0);
     140                 : USTR_CONF_E_PROTO
     141                 : int ustr_sc_sub_vfmt(struct Ustr **, size_t, size_t, const char *, va_list)
     142                 :     USTR__COMPILE_ATTR_NONNULL_L((1, 4)) USTR__COMPILE_ATTR_FMT(4, 0);
     143                 : 
     144                 : USTR_CONF_E_PROTO
     145                 : int ustrp_sc_sub_vfmt_lim(struct Ustr_pool *, struct Ustrp **, size_t, size_t,
     146                 :                           size_t, const char *, va_list)
     147                 :     USTR__COMPILE_ATTR_NONNULL_L((2, 6)) USTR__COMPILE_ATTR_FMT(6, 0);
     148                 : USTR_CONF_E_PROTO
     149                 : int ustrp_sc_sub_vfmt(struct Ustr_pool *, struct Ustrp **,size_t, size_t,
     150                 :                       const char *, va_list)
     151                 :     USTR__COMPILE_ATTR_NONNULL_L((2, 5)) USTR__COMPILE_ATTR_FMT(5, 0);
     152                 : USTR_CONF_E_PROTO
     153                 : int ustr_sc_sub_fmt_lim(struct Ustr **, size_t, size_t, size_t,
     154                 :                         const char *, ...)
     155                 :     USTR__COMPILE_ATTR_NONNULL_L((1, 5)) USTR__COMPILE_ATTR_FMT(5, 6);
     156                 : USTR_CONF_E_PROTO int ustr_sc_sub_fmt(struct Ustr **, size_t, size_t,
     157                 :                                       const char *, ...)
     158                 :     USTR__COMPILE_ATTR_NONNULL_L((1, 4)) USTR__COMPILE_ATTR_FMT(4, 5);
     159                 : 
     160                 : USTR_CONF_E_PROTO
     161                 : int ustrp_sc_sub_fmt_lim(struct Ustr_pool *, struct Ustrp **, size_t, size_t,
     162                 :                          size_t, const char *, ...)
     163                 :     USTR__COMPILE_ATTR_NONNULL_L((2, 6)) USTR__COMPILE_ATTR_FMT(6, 7);
     164                 : USTR_CONF_E_PROTO
     165                 : int ustrp_sc_sub_fmt(struct Ustr_pool *, struct Ustrp **, size_t, size_t,
     166                 :                      const char *, ...)
     167                 :     USTR__COMPILE_ATTR_NONNULL_L((2, 5)) USTR__COMPILE_ATTR_FMT(5, 6);
     168                 : # endif
     169                 : #endif
     170                 : 
     171                 : #if USTR_CONF_INCLUDE_INTERNAL_HEADERS
     172                 : # include "ustr-sub-internal.h"
     173                 : #endif
     174                 : 
     175                 : #if USTR_CONF_INCLUDE_CODEONLY_HEADERS
     176                 : # include "ustr-sub-code.h"
     177                 : #endif
     178                 : 
     179                 : #if USTR_CONF_COMPILE_USE_INLINE
     180                 : USTR_CONF_II_PROTO int ustr_sub_cstr(struct Ustr **s1, size_t p, const char *c) 
     181              12 : { return (ustr_sub_buf(s1, p, c, strlen(c))); }
     182                 : USTR_CONF_II_PROTO
     183                 : int ustr_sc_sub_cstr(struct Ustr **s1, size_t pos, size_t len,const char *cstr) 
     184               8 : { return (ustr_sc_sub_buf(s1, pos, len, cstr, strlen(cstr))); }
     185                 : 
     186                 : USTR_CONF_II_PROTO int ustrp_sub_cstr(struct Ustr_pool *x, struct Ustrp **s1,
     187                 :                                       size_t p, const char *c) 
     188               4 : { return (ustrp_sub_buf(x, s1, p, c, strlen(c))); }
     189                 : USTR_CONF_II_PROTO
     190                 : int ustrp_sc_sub_cstr(struct Ustr_pool *p, struct Ustrp **s1,
     191                 :                       size_t pos, size_t len, const char *cstr)
     192               4 : { return (ustrp_sc_sub_buf(p, s1, pos, len, cstr, strlen(cstr))); }
     193                 : #endif
     194                 : 
     195                 : 
     196                 : #endif

Generated by: LTP GCOV extension version 1.4