Sophie

Sophie

distrib > Fedora > 14 > x86_64 > media > updates > by-pkgid > f2adb5ed02e83f2c51981c1b15594e22 > files > 93

libnjb-devel-2.2.7-1.fc14.x86_64.rpm

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<title>libnjb: /builddir/build/BUILD/libnjb-2.2.7/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.7.4 -->
<div id="top">
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td style="padding-left: 0.5em;">
   <div id="projectname">libnjb&#160;<span id="projectnumber">2.2.7</span></div>
  </td>
 </tr>
 </tbody>
</table>
</div>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="modules.html"><span>Modules</span></a></li>
      <li><a href="annotated.html"><span>Data&#160;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 id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>Globals</span></a></li>
    </ul>
  </div>
  <div id="nav-path" class="navpath">
    <ul>
      <li class="navelem"><a class="el" href="dir_55a6aa4feb4da29582c8781b5e808e47.html">src</a>      </li>
    </ul>
  </div>
</div>
<div class="header">
  <div class="summary">
<a href="#func-members">Functions</a> &#124;
<a href="#var-members">Variables</a>  </div>
  <div class="headertitle">
<div class="title">ioutil.c File Reference</div>  </div>
</div>
<div class="contents">
<div class="textblock"><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/>
</div><table class="memberdecls">
<tr><td colspan="2"><h2><a name="func-members"></a>
Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ioutil_8c.html#ab37e1a214ef2b2e62314d95f68e216a4">data_dump</a> (FILE *f, void *buf, size_t n)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ioutil_8c.html#a7583c2079ba212fc5d9cf4f5d331c41a">data_dump_ascii</a> (FILE *f, void *buf, size_t n, size_t dump_boundry)</td></tr>
<tr><td colspan="2"><h2><a name="var-members"></a>
Variables</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="ioutil_8c.html#a60db410c9e82d9e61b1bf0be607922ed">__sub_depth</a></td></tr>
</table>
<hr/><a name="details" id="details"></a><h2>Detailed Description</h2>
<div class="textblock"><p>This file contain some general I/O helper routines, related to the operating system and debug output. </p>
</div><hr/><h2>Function Documentation</h2>
<a class="anchor" id="ab37e1a214ef2b2e62314d95f68e216a4"></a><!-- doxytag: member="ioutil.c::data_dump" ref="ab37e1a214ef2b2e62314d95f68e216a4" 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 *&#160;</td>
          <td class="paramname"><em>f</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>buf</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>n</em>&#160;</td>
        </tr>
        <tr>
          <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><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">f</td><td>the file to dump to (e.g. stdout or stderr) </td></tr>
    <tr><td class="paramname">buf</td><td>a pointer to the buffer containing the bytes to be dumped out in hex </td></tr>
    <tr><td class="paramname">n</td><td>the number of bytes to dump from this buffer </td></tr>
  </table>
  </dd>
</dl>

<p>Referenced by <a class="el" href="protocol_8c.html#ad4c55baa3faa179396f2f76ce9fbd5ca">njb_get_library_counter()</a>, <a class="el" href="protocol_8c.html#ae959b6717b8bd6b3bcd61447e8ddda17">njb_ping()</a>, and <a class="el" href="usb__io_8c.html#ab032ff44f65d3d873b2200e71ecfcf5e">usb_setup()</a>.</p>

</div>
</div>
<a class="anchor" id="a7583c2079ba212fc5d9cf4f5d331c41a"></a><!-- doxytag: member="ioutil.c::data_dump_ascii" ref="a7583c2079ba212fc5d9cf4f5d331c41a" 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 *&#160;</td>
          <td class="paramname"><em>f</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">void *&#160;</td>
          <td class="paramname"><em>buf</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>n</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">size_t&#160;</td>
          <td class="paramname"><em>dump_boundry</em>&#160;</td>
        </tr>
        <tr>
          <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><dt><b>Parameters:</b></dt><dd>
  <table class="params">
    <tr><td class="paramname">f</td><td>the file to dump to (e.g. stdout or stderr) </td></tr>
    <tr><td class="paramname">buf</td><td>a pointer to the buffer containing the bytes to be dumped out in hex </td></tr>
    <tr><td class="paramname">n</td><td>the number of bytes to dump from this buffer </td></tr>
    <tr><td class="paramname">dump_boundry</td><td>the address offset to start at (usually 0) </td></tr>
  </table>
  </dd>
</dl>

<p>Referenced by <a class="el" href="usb__io_8c.html#a8c28681c955500d111dcf28ff9532b94">usb_pipe_read()</a>, <a class="el" href="usb__io_8c.html#a96ae11691769c1bd4bda3ea0ceaa76a5">usb_pipe_write()</a>, and <a class="el" href="usb__io_8c.html#ab032ff44f65d3d873b2200e71ecfcf5e">usb_setup()</a>.</p>

</div>
</div>
<hr/><h2>Variable Documentation</h2>
<a class="anchor" id="a60db410c9e82d9e61b1bf0be607922ed"></a><!-- doxytag: member="ioutil.c::__sub_depth" ref="a60db410c9e82d9e61b1bf0be607922ed" args="" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int <a class="el" href="usb__io_8c.html#a60db410c9e82d9e61b1bf0be607922ed">__sub_depth</a></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>The current subroutine depth for all of libnjb (global) </p>

</div>
</div>
</div>
<hr class="footer"/><address class="footer"><small>Generated on Sat Jun 25 2011 for libnjb by&#160;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.7.4 </small></address>
</body>
</html>