<!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"/> <meta http-equiv="X-UA-Compatible" content="IE=9"/> <meta name="generator" content="Doxygen 1.8.5"/> <title>libnjb: /home/iurt/rpmbuild/BUILD/libnjb-2.2.6/src/ioutil.c File Reference</title> <link href="tabs.css" rel="stylesheet" type="text/css"/> <script type="text/javascript" src="jquery.js"></script> <script type="text/javascript" src="dynsections.js"></script> <link href="doxygen.css" rel="stylesheet" type="text/css" /> </head> <body> <div id="top"><!-- do not remove this div, it is closed by doxygen! --> <div id="titlearea"> <table cellspacing="0" cellpadding="0"> <tbody> <tr style="height: 56px;"> <td style="padding-left: 0.5em;"> <div id="projectname">libnjb  <span id="projectnumber">2.2.6</span> </div> </td> </tr> </tbody> </table> </div> <!-- end header part --> <!-- Generated by Doxygen 1.8.5 --> <div id="navrow1" class="tabs"> <ul class="tablist"> <li><a href="index.html"><span>Main Page</span></a></li> <li><a href="modules.html"><span>Modules</span></a></li> <li><a href="annotated.html"><span>Data Structures</span></a></li> <li class="current"><a href="files.html"><span>Files</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 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_68267d1309a1af8e8297ef4c3efbcdba.html">src</a></li> </ul> </div> </div><!-- top --> <div class="header"> <div class="summary"> <a href="#func-members">Functions</a> | <a href="#var-members">Variables</a> </div> <div class="headertitle"> <div class="title">ioutil.c File Reference</div> </div> </div><!--header--> <div class="contents"> <div class="textblock"><code>#include <sys/time.h></code><br/> <code>#include <unistd.h></code><br/> <code>#include <stdio.h></code><br/> <code>#include <stdlib.h></code><br/> <code>#include <errno.h></code><br/> <code>#include <sys/stat.h></code><br/> <code>#include <fcntl.h></code><br/> <code>#include "<a class="el" href="libnjb_8h_source.html">libnjb.h</a>"</code><br/> <code>#include "defs.h"</code><br/> <code>#include "base.h"</code><br/> <code>#include "ioutil.h"</code><br/> </div><table class="memberdecls"> <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a> Functions</h2></td></tr> <tr class="memitem:ab37e1a214ef2b2e62314d95f68e216a4"><td class="memItemLeft" align="right" valign="top">void </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 class="separator:ab37e1a214ef2b2e62314d95f68e216a4"><td class="memSeparator" colspan="2"> </td></tr> <tr class="memitem:a7583c2079ba212fc5d9cf4f5d331c41a"><td class="memItemLeft" align="right" valign="top">void </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 class="separator:a7583c2079ba212fc5d9cf4f5d331c41a"><td class="memSeparator" colspan="2"> </td></tr> </table><table class="memberdecls"> <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="var-members"></a> Variables</h2></td></tr> <tr class="memitem:a60db410c9e82d9e61b1bf0be607922ed"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="ioutil_8c.html#a60db410c9e82d9e61b1bf0be607922ed">__sub_depth</a></td></tr> <tr class="separator:a60db410c9e82d9e61b1bf0be607922ed"><td class="memSeparator" colspan="2"> </td></tr> </table> <a name="details" id="details"></a><h2 class="groupheader">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><h2 class="groupheader">Function Documentation</h2> <a class="anchor" id="ab37e1a214ef2b2e62314d95f68e216a4"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void data_dump </td> <td>(</td> <td class="paramtype">FILE * </td> <td class="paramname"><em>f</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">void * </td> <td class="paramname"><em>buf</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">size_t </td> <td class="paramname"><em>n</em> </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 class="params"><dt>Parameters</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> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">void data_dump_ascii </td> <td>(</td> <td class="paramtype">FILE * </td> <td class="paramname"><em>f</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">void * </td> <td class="paramname"><em>buf</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">size_t </td> <td class="paramname"><em>n</em>, </td> </tr> <tr> <td class="paramkey"></td> <td></td> <td class="paramtype">size_t </td> <td class="paramname"><em>dump_boundry</em> </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 class="params"><dt>Parameters</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> <h2 class="groupheader">Variable Documentation</h2> <a class="anchor" id="a60db410c9e82d9e61b1bf0be607922ed"></a> <div class="memitem"> <div class="memproto"> <table class="memname"> <tr> <td class="memname">int __sub_depth</td> </tr> </table> </div><div class="memdoc"> <p>The current subroutine depth for all of libnjb (global) </p> </div> </div> </div><!-- contents --> <!-- start footer part --> <hr class="footer"/><address class="footer"><small> Generated on Fri Oct 18 2013 20:16:58 for libnjb by  <a href="http://www.doxygen.org/index.html"> <img class="footer" src="doxygen.png" alt="doxygen"/> </a> 1.8.5 </small></address> </body> </html>