LCOV - code coverage report
Current view: top level - src - iter.c (source / functions) Hit Total Coverage
Test: coverage.info Lines: 0 10 0.0 %
Date: 2016-12-21 02:12:01 Functions: 0 1 0.0 %

          Line data    Source code
       1             : /***************************************************************************//**
       2             : 
       3             :   @file         iter.c
       4             : 
       5             :   @author       Stephen Brennan
       6             : 
       7             :   @date         Created Monday,  4 August 2014
       8             : 
       9             :   @brief        Functions that act on iterators, "libstephen/list.h".
      10             : 
      11             :   @copyright    Copyright (c) 2013-2016, Stephen Brennan.  Released under the
      12             :                 Revised BSD License.  See the LICENSE.txt file for details.
      13             : 
      14             : *******************************************************************************/
      15             : 
      16             : #include <stdio.h>
      17             : #include <assert.h>
      18             : 
      19             : #include "libstephen/base.h"
      20             : #include "libstephen/list.h"
      21             : 
      22           0 : void iter_print(smb_iter it, FILE *f, DATA_PRINTER printer)
      23             : {
      24             :   DATA d;
      25             :   smb_status status;
      26           0 :   fprintf(f, "smb_iter {\n");
      27           0 :   while (it.has_next(&it)) {
      28           0 :     d = it.next(&it, &status);
      29             :     // used has_next
      30           0 :     assert(status == SMB_SUCCESS);
      31           0 :     printer(f, d);
      32           0 :     fprintf(f, ",\n");
      33             :   }
      34           0 :   it.destroy(&it);
      35           0 :   fprintf(f, "}\n");
      36           0 : }

Generated by: LCOV version 1.11