LCOV - code coverage report
Current view: top level - src - assuan-io.c (source / functions) Hit Total Coverage
Test: coverage.info Lines: 4 4 100.0 %
Date: 2016-11-29 14:54:18 Functions: 2 2 100.0 %

          Line data    Source code
       1             : /* assuan-io.c - Wraps the read and write functions.
       2             :    Copyright (C) 2002, 2004, 2006-2009 Free Software Foundation, Inc.
       3             : 
       4             :    This file is part of Assuan.
       5             : 
       6             :    Assuan is free software; you can redistribute it and/or modify it
       7             :    under the terms of the GNU Lesser General Public License as
       8             :    published by the Free Software Foundation; either version 2.1 of
       9             :    the License, or (at your option) any later version.
      10             : 
      11             :    Assuan is distributed in the hope that it will be useful, but
      12             :    WITHOUT ANY WARRANTY; without even the implied warranty of
      13             :    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
      14             :    Lesser General Public License for more details.
      15             : 
      16             :    You should have received a copy of the GNU Lesser General Public
      17             :    License along with this program; if not, see <http://www.gnu.org/licenses/>.
      18             :  */
      19             : 
      20             : #ifdef HAVE_CONFIG_H
      21             : #include <config.h>
      22             : #endif
      23             : 
      24             : #include <time.h>
      25             : #ifdef HAVE_SYS_TIME_H
      26             : # include <sys/time.h>
      27             : #endif
      28             : #ifdef HAVE_SYS_TYPES_H
      29             : # include <sys/types.h>
      30             : #endif
      31             : #ifdef HAVE_SYS_SOCKET_H
      32             : # include <sys/socket.h>
      33             : #endif
      34             : #ifdef HAVE_UNISTD_H
      35             : # include <unistd.h>
      36             : #endif
      37             : #include <errno.h>
      38             : #ifdef HAVE_W32_SYSTEM
      39             : # ifdef HAVE_WINSOCK2_H
      40             : #  include <winsock2.h>
      41             : # endif 
      42             : # include <windows.h>
      43             : #else
      44             : # include <sys/wait.h>
      45             : #endif
      46             : 
      47             : #include "assuan-defs.h"
      48             : 
      49             : 
      50             : ssize_t
      51           5 : _assuan_simple_read (assuan_context_t ctx, void *buffer, size_t size)
      52             : {
      53           5 :   return _assuan_read (ctx, ctx->inbound.fd, buffer, size);
      54             : }
      55             : 
      56             : 
      57             : ssize_t
      58          12 : _assuan_simple_write (assuan_context_t ctx, const void *buffer, size_t size)
      59             : {
      60          12 :   return _assuan_write (ctx, ctx->outbound.fd, buffer, size);
      61             : }

Generated by: LCOV version 1.11