Sophie

Sophie

distrib > Fedora > 13 > x86_64 > by-pkgid > ca44e7e21c4b6cd5e0c5fdfbf12b4de7 > files > 91

libnjb-devel-2.2.6-6.fc12.x86_64.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>libnjb: /builddir/build/BUILD/libnjb-2.2.6/src/ioutil.c File Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css">
<link href="doxygen.css" rel="stylesheet" type="text/css">
</head><body>
<!-- Generated by Doxygen 1.5.9 -->
<div class="navigation" id="top">
  <div class="tabs">
    <ul>
      <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="annotated.html"><span>Data&nbsp;Structures</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li><a href="dirs.html"><span>Directories</span></a></li>
      <li><a href="examples.html"><span>Examples</span></a></li>
    </ul>
  </div>
  <div class="tabs">
    <ul>
      <li><a href="files.html"><span>File&nbsp;List</span></a></li>
      <li><a href="globals.html"><span>Globals</span></a></li>
    </ul>
  </div>
  <div class="navpath"><a class="el" href="dir_a231d544ee85f784af5e92462fb4d8ea.html">src</a>
  </div>
</div>
<div class="contents">
<h1>ioutil.c File Reference</h1><code>#include &lt;sys/time.h&gt;</code><br>
<code>#include &lt;unistd.h&gt;</code><br>
<code>#include &lt;stdio.h&gt;</code><br>
<code>#include &lt;stdlib.h&gt;</code><br>
<code>#include &lt;errno.h&gt;</code><br>
<code>#include &lt;sys/stat.h&gt;</code><br>
<code>#include &lt;fcntl.h&gt;</code><br>
<code>#include &quot;<a class="el" href="libnjb_8h_source.html">libnjb.h</a>&quot;</code><br>
<code>#include &quot;defs.h&quot;</code><br>
<code>#include &quot;base.h&quot;</code><br>
<code>#include &quot;ioutil.h&quot;</code><br>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td></td></tr>
<tr><td colspan="2"><br><h2>Functions</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="ioutil_8c.html#b37e1a214ef2b2e62314d95f68e216a4">data_dump</a> (FILE *f, void *buf, size_t n)</td></tr>

<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="ioutil_8c.html#7583c2079ba212fc5d9cf4f5d331c41a">data_dump_ascii</a> (FILE *f, void *buf, size_t n, size_t dump_boundry)</td></tr>

<tr><td colspan="2"><br><h2>Variables</h2></td></tr>
<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="ioutil_8c.html#60db410c9e82d9e61b1bf0be607922ed">__sub_depth</a></td></tr>

</table>
<hr><h2>Detailed Description</h2>
This file contain some general I/O helper routines, related to the operating system and debug output. <hr><h2>Function Documentation</h2>
<a class="anchor" name="b37e1a214ef2b2e62314d95f68e216a4"></a><!-- doxytag: member="ioutil.c::data_dump" ref="b37e1a214ef2b2e62314d95f68e216a4" args="(FILE *f, void *buf, size_t n)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void data_dump           </td>
          <td>(</td>
          <td class="paramtype">FILE *&nbsp;</td>
          <td class="paramname"> <em>f</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&nbsp;</td>
          <td class="paramname"> <em>buf</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&nbsp;</td>
          <td class="paramname"> <em>n</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
This dumps out a number of bytes to a textual, hexadecimal dump.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>f</em>&nbsp;</td><td>the file to dump to (e.g. stdout or stderr) </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>buf</em>&nbsp;</td><td>a pointer to the buffer containing the bytes to be dumped out in hex </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>n</em>&nbsp;</td><td>the number of bytes to dump from this buffer </td></tr>
  </table>
</dl>

<p>Referenced by <a class="el" href="protocol_8c_source.html#l00241">njb_get_library_counter()</a>, <a class="el" href="protocol_8c_source.html#l00285">njb_ping()</a>, and <a class="el" href="usb__io_8c_source.html#l00123">usb_setup()</a>.</p>

</div>
</div><p>
<a class="anchor" name="7583c2079ba212fc5d9cf4f5d331c41a"></a><!-- doxytag: member="ioutil.c::data_dump_ascii" ref="7583c2079ba212fc5d9cf4f5d331c41a" args="(FILE *f, void *buf, size_t n, size_t dump_boundry)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void data_dump_ascii           </td>
          <td>(</td>
          <td class="paramtype">FILE *&nbsp;</td>
          <td class="paramname"> <em>f</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&nbsp;</td>
          <td class="paramname"> <em>buf</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&nbsp;</td>
          <td class="paramname"> <em>n</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&nbsp;</td>
          <td class="paramname"> <em>dump_boundry</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
This dumps out a number of bytes to a textual, hexadecimal dump, and also prints out the string ASCII representation for each line of bytes. It will also print the memory address offset from a certain boundry.<p>
<dl compact><dt><b>Parameters:</b></dt><dd>
  <table border="0" cellspacing="2" cellpadding="0">
    <tr><td valign="top"></td><td valign="top"><em>f</em>&nbsp;</td><td>the file to dump to (e.g. stdout or stderr) </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>buf</em>&nbsp;</td><td>a pointer to the buffer containing the bytes to be dumped out in hex </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>n</em>&nbsp;</td><td>the number of bytes to dump from this buffer </td></tr>
    <tr><td valign="top"></td><td valign="top"><em>dump_boundry</em>&nbsp;</td><td>the address offset to start at (usually 0) </td></tr>
  </table>
</dl>

<p>Referenced by <a class="el" href="usb__io_8c_source.html#l00076">usb_pipe_read()</a>, <a class="el" href="usb__io_8c_source.html#l00027">usb_pipe_write()</a>, and <a class="el" href="usb__io_8c_source.html#l00123">usb_setup()</a>.</p>

</div>
</div><p>
<hr><h2>Variable Documentation</h2>
<a class="anchor" name="60db410c9e82d9e61b1bf0be607922ed"></a><!-- doxytag: member="ioutil.c::__sub_depth" ref="60db410c9e82d9e61b1bf0be607922ed" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int <a class="el" href="usb__io_8c.html#60db410c9e82d9e61b1bf0be607922ed">__sub_depth</a>          </td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>
The current subroutine depth for all of libnjb (global) 
</div>
</div><p>
</div>
<hr size="1"><address style="text-align: right;"><small>Generated on Sun Jul 26 17:17:29 2009 for libnjb by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.5.9 </small></address>
</body>
</html>