aboutsummaryrefslogtreecommitdiff
path: root/coverage-report/libc/string/strtok.c.gcov.html
blob: 2a850495770691fc644810172a397a8753a3ef1b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">

<html lang="en">

<head>
  <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  <title>LCOV - skiboot.info - libc/string/strtok.c</title>
  <link rel="stylesheet" type="text/css" href="../../gcov.css">
</head>

<body>

  <table width="100%" border=0 cellspacing=0 cellpadding=0>
    <tr><td class="title">LCOV - code coverage report</td></tr>
    <tr><td class="ruler"><img src="../../glass.png" width=3 height=3 alt=""></td></tr>

    <tr>
      <td width="100%">
        <table cellpadding=1 border=0 width="100%">
          <tr>
            <td width="10%" class="headerItem">Current view:</td>
            <td width="35%" class="headerValue"><a href="../../index.html">top level</a> - <a href="index.html">libc/string</a> - strtok.c<span style="font-size: 80%;"> (source / <a href="strtok.c.func-sort-c.html">functions</a>)</span></td>
            <td width="5%"></td>
            <td width="15%"></td>
            <td width="10%" class="headerCovTableHead">Hit</td>
            <td width="10%" class="headerCovTableHead">Total</td>
            <td width="15%" class="headerCovTableHead">Coverage</td>
          </tr>
          <tr>
            <td class="headerItem">Test:</td>
            <td class="headerValue">skiboot.info</td>
            <td></td>
            <td class="headerItem">Lines:</td>
            <td class="headerCovTableEntry">0</td>
            <td class="headerCovTableEntry">21</td>
            <td class="headerCovTableEntryLo">0.0 %</td>
          </tr>
          <tr>
            <td class="headerItem">Date:</td>
            <td class="headerValue">2022-06-13 20:37:26</td>
            <td></td>
            <td class="headerItem">Functions:</td>
            <td class="headerCovTableEntry">0</td>
            <td class="headerCovTableEntry">1</td>
            <td class="headerCovTableEntryLo">0.0 %</td>
          </tr>
          <tr>
            <td></td>
            <td></td>
            <td></td>
            <td class="headerItem">Branches:</td>
            <td class="headerCovTableEntry">0</td>
            <td class="headerCovTableEntry">0</td>
            <td class="headerCovTableEntryHi">-</td>
          </tr>
          <tr><td><img src="../../glass.png" width=3 height=3 alt=""></td></tr>
        </table>
      </td>
    </tr>

    <tr><td class="ruler"><img src="../../glass.png" width=3 height=3 alt=""></td></tr>
  </table>

  <table cellpadding=0 cellspacing=0 border=0>
    <tr>
      <td><br></td>
    </tr>
    <tr>
      <td>
<pre class="sourceHeading">           Branch data     Line data    Source code</pre>
<pre class="source">
<a name="1"><span class="lineNum">       1 </span>                :            : /******************************************************************************</a>
<a name="2"><span class="lineNum">       2 </span>                :            :  * Copyright (c) 2004, 2008 IBM Corporation</a>
<a name="3"><span class="lineNum">       3 </span>                :            :  * All rights reserved.</a>
<a name="4"><span class="lineNum">       4 </span>                :            :  * This program and the accompanying materials</a>
<a name="5"><span class="lineNum">       5 </span>                :            :  * are made available under the terms of the BSD License</a>
<a name="6"><span class="lineNum">       6 </span>                :            :  * which accompanies this distribution, and is available at</a>
<a name="7"><span class="lineNum">       7 </span>                :            :  * http://www.opensource.org/licenses/bsd-license.php</a>
<a name="8"><span class="lineNum">       8 </span>                :            :  *</a>
<a name="9"><span class="lineNum">       9 </span>                :            :  * Contributors:</a>
<a name="10"><span class="lineNum">      10 </span>                :            :  *     IBM Corporation - initial implementation</a>
<a name="11"><span class="lineNum">      11 </span>                :            :  *****************************************************************************/</a>
<a name="12"><span class="lineNum">      12 </span>                :            : </a>
<a name="13"><span class="lineNum">      13 </span>                :            : #include &lt;stddef.h&gt;</a>
<a name="14"><span class="lineNum">      14 </span>                :            : </a>
<a name="15"><span class="lineNum">      15 </span>                :            : char *strtok(char *src, const char *pattern);</a>
<a name="16"><span class="lineNum">      16 </span>                :<span class="lineNoCov">          0 : char *strtok(char *src, const char *pattern)</span></a>
<a name="17"><span class="lineNum">      17 </span>                :            : {</a>
<a name="18"><span class="lineNum">      18 </span>                :            :         static char *nxtTok;</a>
<a name="19"><span class="lineNum">      19 </span>                :<span class="lineNoCov">          0 :         char *retVal = NULL;</span></a>
<a name="20"><span class="lineNum">      20 </span>                :            : </a>
<a name="21"><span class="lineNum">      21 </span>                :<span class="lineNoCov">          0 :         if (!src) {</span></a>
<a name="22"><span class="lineNum">      22 </span>                :<span class="lineNoCov">          0 :                 src = nxtTok;</span></a>
<a name="23"><span class="lineNum">      23 </span>                :<span class="lineNoCov">          0 :                 if (!src)</span></a>
<a name="24"><span class="lineNum">      24 </span>                :<span class="lineNoCov">          0 :                         return retVal;</span></a>
<a name="25"><span class="lineNum">      25 </span>                :            :         }</a>
<a name="26"><span class="lineNum">      26 </span>                :            : </a>
<a name="27"><span class="lineNum">      27 </span>                :<span class="lineNoCov">          0 :         while (*src) {</span></a>
<a name="28"><span class="lineNum">      28 </span>                :<span class="lineNoCov">          0 :                 const char *pp = pattern;</span></a>
<a name="29"><span class="lineNum">      29 </span>                :<span class="lineNoCov">          0 :                 while (*pp) {</span></a>
<a name="30"><span class="lineNum">      30 </span>                :<span class="lineNoCov">          0 :                         if (*pp == *src) {</span></a>
<a name="31"><span class="lineNum">      31 </span>                :<span class="lineNoCov">          0 :                                 break;</span></a>
<a name="32"><span class="lineNum">      32 </span>                :            :                         }</a>
<a name="33"><span class="lineNum">      33 </span>                :<span class="lineNoCov">          0 :                         pp++;</span></a>
<a name="34"><span class="lineNum">      34 </span>                :            :                 }</a>
<a name="35"><span class="lineNum">      35 </span>                :<span class="lineNoCov">          0 :                 if (!*pp) {</span></a>
<a name="36"><span class="lineNum">      36 </span>                :<span class="lineNoCov">          0 :                         if (!retVal)</span></a>
<a name="37"><span class="lineNum">      37 </span>                :<span class="lineNoCov">          0 :                                 retVal = src;</span></a>
<a name="38"><span class="lineNum">      38 </span>                :<span class="lineNoCov">          0 :                         else if (!src[-1])</span></a>
<a name="39"><span class="lineNum">      39 </span>                :<span class="lineNoCov">          0 :                                 break;</span></a>
<a name="40"><span class="lineNum">      40 </span>                :            :                 } else</a>
<a name="41"><span class="lineNum">      41 </span>                :<span class="lineNoCov">          0 :                         *src = '\0';</span></a>
<a name="42"><span class="lineNum">      42 </span>                :<span class="lineNoCov">          0 :                 src++;</span></a>
<a name="43"><span class="lineNum">      43 </span>                :            :         }</a>
<a name="44"><span class="lineNum">      44 </span>                :            : </a>
<a name="45"><span class="lineNum">      45 </span>                :<span class="lineNoCov">          0 :         nxtTok = src;</span></a>
<a name="46"><span class="lineNum">      46 </span>                :            : </a>
<a name="47"><span class="lineNum">      47 </span>                :<span class="lineNoCov">          0 :         return retVal;</span></a>
<a name="48"><span class="lineNum">      48 </span>                :            : }</a>
</pre>
      </td>
    </tr>
  </table>
  <br>

  <table width="100%" border=0 cellspacing=0 cellpadding=0>
    <tr><td class="ruler"><img src="../../glass.png" width=3 height=3 alt=""></td></tr>
    <tr><td class="versionInfo">Generated by: <a href="http://ltp.sourceforge.net/coverage/lcov.php" target="_parent">LCOV version 1.14</a></td></tr>
  </table>
  <br>

</body>
</html>