You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

394 lines
19KB

  1. <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "https://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
  2. <html xmlns="http://www.w3.org/1999/xhtml">
  3. <head>
  4. <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
  5. <meta http-equiv="X-UA-Compatible" content="IE=9"/>
  6. <meta name="generator" content="Doxygen 1.8.16"/>
  7. <meta name="viewport" content="width=device-width, initial-scale=1"/>
  8. <title>SdFat: ArduinoSdFat/libraries/SdFat/src/common/PrintTemplates.h File Reference</title>
  9. <link href="tabs.css" rel="stylesheet" type="text/css"/>
  10. <script type="text/javascript" src="jquery.js"></script>
  11. <script type="text/javascript" src="dynsections.js"></script>
  12. <link href="search/search.css" rel="stylesheet" type="text/css"/>
  13. <script type="text/javascript" src="search/searchdata.js"></script>
  14. <script type="text/javascript" src="search/search.js"></script>
  15. <link href="doxygen.css" rel="stylesheet" type="text/css" />
  16. </head>
  17. <body>
  18. <div id="top"><!-- do not remove this div, it is closed by doxygen! -->
  19. <div id="titlearea">
  20. <table cellspacing="0" cellpadding="0">
  21. <tbody>
  22. <tr style="height: 56px;">
  23. <td id="projectalign" style="padding-left: 0.5em;">
  24. <div id="projectname">SdFat
  25. </div>
  26. </td>
  27. </tr>
  28. </tbody>
  29. </table>
  30. </div>
  31. <!-- end header part -->
  32. <!-- Generated by Doxygen 1.8.16 -->
  33. <script type="text/javascript">
  34. /* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
  35. var searchBox = new SearchBox("searchBox", "search",false,'Search');
  36. /* @license-end */
  37. </script>
  38. <script type="text/javascript" src="menudata.js"></script>
  39. <script type="text/javascript" src="menu.js"></script>
  40. <script type="text/javascript">
  41. /* @license magnet:?xt=urn:btih:cf05388f2679ee054f2beb29a391d25f4e673ac3&amp;dn=gpl-2.0.txt GPL-v2 */
  42. $(function() {
  43. initMenu('',true,false,'search.php','Search');
  44. $(document).ready(function() { init_search(); });
  45. });
  46. /* @license-end */</script>
  47. <div id="main-nav"></div>
  48. <!-- window showing the filter options -->
  49. <div id="MSearchSelectWindow"
  50. onmouseover="return searchBox.OnSearchSelectShow()"
  51. onmouseout="return searchBox.OnSearchSelectHide()"
  52. onkeydown="return searchBox.OnSearchSelectKey(event)">
  53. </div>
  54. <!-- iframe showing the search results (closed by default) -->
  55. <div id="MSearchResultsWindow">
  56. <iframe src="javascript:void(0)" frameborder="0"
  57. name="MSearchResults" id="MSearchResults">
  58. </iframe>
  59. </div>
  60. <div id="nav-path" class="navpath">
  61. <ul>
  62. <li class="navelem"><a class="el" href="dir_bd3b508a448b79faa7486a2af0c5c4a2.html">ArduinoSdFat</a></li><li class="navelem"><a class="el" href="dir_d7cdc5eb6907b67ec8d6facf0ac28083.html">libraries</a></li><li class="navelem"><a class="el" href="dir_30f4e013e11264f0426cd7e4f10b230b.html">SdFat</a></li><li class="navelem"><a class="el" href="dir_ffa9b8a1695a52c2b9469cb7873a40f4.html">src</a></li><li class="navelem"><a class="el" href="dir_3fb0493066cff5e444f8bd6d60885f74.html">common</a></li> </ul>
  63. </div>
  64. </div><!-- top -->
  65. <div class="header">
  66. <div class="summary">
  67. <a href="#define-members">Macros</a> &#124;
  68. <a href="#func-members">Functions</a> </div>
  69. <div class="headertitle">
  70. <div class="title">PrintTemplates.h File Reference</div> </div>
  71. </div><!--header-->
  72. <div class="contents">
  73. <p>templates for printf
  74. <a href="#details">More...</a></p>
  75. <div class="textblock"><code>#include &lt;stdarg.h&gt;</code><br />
  76. <code>#include &quot;FmtNumber.h&quot;</code><br />
  77. </div><div class="textblock"><div class="dynheader">
  78. Include dependency graph for PrintTemplates.h:</div>
  79. <div class="dyncontent">
  80. <div class="center"><img src="_print_templates_8h__incl.png" border="0" usemap="#_arduino_sd_fat_2libraries_2_sd_fat_2src_2common_2_print_templates_8h" alt=""/></div>
  81. <map name="_arduino_sd_fat_2libraries_2_sd_fat_2src_2common_2_print_templates_8h" id="_arduino_sd_fat_2libraries_2_sd_fat_2src_2common_2_print_templates_8h">
  82. <area shape="rect" title="templates for printf" alt="" coords="5,5,244,47"/>
  83. <area shape="rect" title=" " alt="" coords="90,95,159,121"/>
  84. </map>
  85. </div>
  86. </div><table class="memberdecls">
  87. <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a>
  88. Macros</h2></td></tr>
  89. <tr class="memitem:ab82ae47ddc52e7a1a9400cc3c42a9de7"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_print_templates_8h.html#ab82ae47ddc52e7a1a9400cc3c42a9de7">isDigit</a>(d)&#160;&#160;&#160;('0' &lt;= (d) &amp;&amp; (d) &lt;= '9')</td></tr>
  90. <tr class="separator:ab82ae47ddc52e7a1a9400cc3c42a9de7"><td class="memSeparator" colspan="2">&#160;</td></tr>
  91. <tr class="memitem:a26baac10baccbe6d4f13f98981dd202a"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="_print_templates_8h.html#a26baac10baccbe6d4f13f98981dd202a">PRINTF_USE_FLOAT</a>&#160;&#160;&#160;2</td></tr>
  92. <tr class="separator:a26baac10baccbe6d4f13f98981dd202a"><td class="memSeparator" colspan="2">&#160;</td></tr>
  93. </table><table class="memberdecls">
  94. <tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
  95. Functions</h2></td></tr>
  96. <tr class="memitem:a3899b48e0eb6938ff58ca3accd53402a"><td class="memTemplParams" colspan="2">template&lt;typename T &gt; </td></tr>
  97. <tr class="memitem:a3899b48e0eb6938ff58ca3accd53402a"><td class="memTemplItemLeft" align="right" valign="top">int&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="_print_templates_8h.html#a3899b48e0eb6938ff58ca3accd53402a">fprintf</a> (T *file, const char *fmt,...)</td></tr>
  98. <tr class="separator:a3899b48e0eb6938ff58ca3accd53402a"><td class="memSeparator" colspan="2">&#160;</td></tr>
  99. <tr class="memitem:a5893e928fd47234a7a69049f9e769359"><td class="memTemplParams" colspan="2">template&lt;typename F &gt; </td></tr>
  100. <tr class="memitem:a5893e928fd47234a7a69049f9e769359"><td class="memTemplItemLeft" align="right" valign="top">int&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="_print_templates_8h.html#a5893e928fd47234a7a69049f9e769359">mprintf</a> (<a class="el" href="_sys_call_8h.html#a0e3009529aac180ed5f48296d6670d6b">F</a> *file, const __FlashStringHelper *ifsh,...)</td></tr>
  101. <tr class="separator:a5893e928fd47234a7a69049f9e769359"><td class="memSeparator" colspan="2">&#160;</td></tr>
  102. <tr class="memitem:afceda1e76dbfc91ef2d06925a10eaea9"><td class="memTemplParams" colspan="2">template&lt;typename T &gt; </td></tr>
  103. <tr class="memitem:afceda1e76dbfc91ef2d06925a10eaea9"><td class="memTemplItemLeft" align="right" valign="top">int&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="_print_templates_8h.html#afceda1e76dbfc91ef2d06925a10eaea9">mprintf</a> (T *file, const char *fmt,...)</td></tr>
  104. <tr class="separator:afceda1e76dbfc91ef2d06925a10eaea9"><td class="memSeparator" colspan="2">&#160;</td></tr>
  105. <tr class="memitem:aa3bc14da82a850b0f8ce848a6d54045f"><td class="memTemplParams" colspan="2">template&lt;typename F &gt; </td></tr>
  106. <tr class="memitem:aa3bc14da82a850b0f8ce848a6d54045f"><td class="memTemplItemLeft" align="right" valign="top">int&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="_print_templates_8h.html#aa3bc14da82a850b0f8ce848a6d54045f">vfprintf</a> (<a class="el" href="_sys_call_8h.html#a0e3009529aac180ed5f48296d6670d6b">F</a> *file, const char *fmt, va_list ap)</td></tr>
  107. <tr class="separator:aa3bc14da82a850b0f8ce848a6d54045f"><td class="memSeparator" colspan="2">&#160;</td></tr>
  108. <tr class="memitem:ad139f8bf9b6ead8bd28abf1dd412a8a4"><td class="memTemplParams" colspan="2">template&lt;typename F &gt; </td></tr>
  109. <tr class="memitem:ad139f8bf9b6ead8bd28abf1dd412a8a4"><td class="memTemplItemLeft" align="right" valign="top">int&#160;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="_print_templates_8h.html#ad139f8bf9b6ead8bd28abf1dd412a8a4">vmprintf</a> (<a class="el" href="_sys_call_8h.html#a0e3009529aac180ed5f48296d6670d6b">F</a> *file, const char *fmt, va_list ap)</td></tr>
  110. <tr class="separator:ad139f8bf9b6ead8bd28abf1dd412a8a4"><td class="memSeparator" colspan="2">&#160;</td></tr>
  111. </table>
  112. <a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
  113. <div class="textblock"><p>templates for printf </p>
  114. <p>Copyright (c) 2011-2019 Bill Greiman This file is part of the SdFat library for SD memory cards.</p>
  115. <p>MIT License</p>
  116. <p>Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:</p>
  117. <p>The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.</p>
  118. <p>THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. </p>
  119. </div><h2 class="groupheader">Macro Definition Documentation</h2>
  120. <a id="ab82ae47ddc52e7a1a9400cc3c42a9de7"></a>
  121. <h2 class="memtitle"><span class="permalink"><a href="#ab82ae47ddc52e7a1a9400cc3c42a9de7">&#9670;&nbsp;</a></span>isDigit</h2>
  122. <div class="memitem">
  123. <div class="memproto">
  124. <table class="memname">
  125. <tr>
  126. <td class="memname">#define isDigit</td>
  127. <td>(</td>
  128. <td class="paramtype">&#160;</td>
  129. <td class="paramname">d</td><td>)</td>
  130. <td>&#160;&#160;&#160;('0' &lt;= (d) &amp;&amp; (d) &lt;= '9')</td>
  131. </tr>
  132. </table>
  133. </div><div class="memdoc">
  134. <p>test for digit </p>
  135. </div>
  136. </div>
  137. <a id="a26baac10baccbe6d4f13f98981dd202a"></a>
  138. <h2 class="memtitle"><span class="permalink"><a href="#a26baac10baccbe6d4f13f98981dd202a">&#9670;&nbsp;</a></span>PRINTF_USE_FLOAT</h2>
  139. <div class="memitem">
  140. <div class="memproto">
  141. <table class="memname">
  142. <tr>
  143. <td class="memname">#define PRINTF_USE_FLOAT&#160;&#160;&#160;2</td>
  144. </tr>
  145. </table>
  146. </div><div class="memdoc">
  147. <p>control for supported floating formats </p>
  148. </div>
  149. </div>
  150. <h2 class="groupheader">Function Documentation</h2>
  151. <a id="a3899b48e0eb6938ff58ca3accd53402a"></a>
  152. <h2 class="memtitle"><span class="permalink"><a href="#a3899b48e0eb6938ff58ca3accd53402a">&#9670;&nbsp;</a></span>fprintf()</h2>
  153. <div class="memitem">
  154. <div class="memproto">
  155. <div class="memtemplate">
  156. template&lt;typename T &gt; </div>
  157. <table class="memname">
  158. <tr>
  159. <td class="memname">int fprintf </td>
  160. <td>(</td>
  161. <td class="paramtype">T *&#160;</td>
  162. <td class="paramname"><em>file</em>, </td>
  163. </tr>
  164. <tr>
  165. <td class="paramkey"></td>
  166. <td></td>
  167. <td class="paramtype">const char *&#160;</td>
  168. <td class="paramname"><em>fmt</em>, </td>
  169. </tr>
  170. <tr>
  171. <td class="paramkey"></td>
  172. <td></td>
  173. <td class="paramtype">&#160;</td>
  174. <td class="paramname"><em>...</em>&#160;</td>
  175. </tr>
  176. <tr>
  177. <td></td>
  178. <td>)</td>
  179. <td></td><td></td>
  180. </tr>
  181. </table>
  182. </div><div class="memdoc">
  183. <p>Formatted print.</p>
  184. <dl class="params"><dt>Parameters</dt><dd>
  185. <table class="params">
  186. <tr><td class="paramdir">[in]</td><td class="paramname">file</td><td>destination file or device. </td></tr>
  187. <tr><td class="paramdir">[in]</td><td class="paramname">fmt</td><td>format string.</td></tr>
  188. </table>
  189. </dd>
  190. </dl>
  191. <dl class="section return"><dt>Returns</dt><dd>number of character printed for success else a negative value. </dd></dl>
  192. </div>
  193. </div>
  194. <a id="a5893e928fd47234a7a69049f9e769359"></a>
  195. <h2 class="memtitle"><span class="permalink"><a href="#a5893e928fd47234a7a69049f9e769359">&#9670;&nbsp;</a></span>mprintf() <span class="overload">[1/2]</span></h2>
  196. <div class="memitem">
  197. <div class="memproto">
  198. <div class="memtemplate">
  199. template&lt;typename F &gt; </div>
  200. <table class="memname">
  201. <tr>
  202. <td class="memname">int mprintf </td>
  203. <td>(</td>
  204. <td class="paramtype"><a class="el" href="_sys_call_8h.html#a0e3009529aac180ed5f48296d6670d6b">F</a> *&#160;</td>
  205. <td class="paramname"><em>file</em>, </td>
  206. </tr>
  207. <tr>
  208. <td class="paramkey"></td>
  209. <td></td>
  210. <td class="paramtype">const __FlashStringHelper *&#160;</td>
  211. <td class="paramname"><em>ifsh</em>, </td>
  212. </tr>
  213. <tr>
  214. <td class="paramkey"></td>
  215. <td></td>
  216. <td class="paramtype">&#160;</td>
  217. <td class="paramname"><em>...</em>&#160;</td>
  218. </tr>
  219. <tr>
  220. <td></td>
  221. <td>)</td>
  222. <td></td><td></td>
  223. </tr>
  224. </table>
  225. </div><div class="memdoc">
  226. <p>Minimal formatted print.</p>
  227. <dl class="params"><dt>Parameters</dt><dd>
  228. <table class="params">
  229. <tr><td class="paramdir">[in]</td><td class="paramname">file</td><td>destination file or device. </td></tr>
  230. <tr><td class="paramdir">[in]</td><td class="paramname">ifsh</td><td>format string using <a class="el" href="_sys_call_8h.html#a0e3009529aac180ed5f48296d6670d6b">F()</a> macro.</td></tr>
  231. </table>
  232. </dd>
  233. </dl>
  234. <dl class="section return"><dt>Returns</dt><dd>number of character printed for success else a negative value. </dd></dl>
  235. </div>
  236. </div>
  237. <a id="afceda1e76dbfc91ef2d06925a10eaea9"></a>
  238. <h2 class="memtitle"><span class="permalink"><a href="#afceda1e76dbfc91ef2d06925a10eaea9">&#9670;&nbsp;</a></span>mprintf() <span class="overload">[2/2]</span></h2>
  239. <div class="memitem">
  240. <div class="memproto">
  241. <div class="memtemplate">
  242. template&lt;typename T &gt; </div>
  243. <table class="memname">
  244. <tr>
  245. <td class="memname">int mprintf </td>
  246. <td>(</td>
  247. <td class="paramtype">T *&#160;</td>
  248. <td class="paramname"><em>file</em>, </td>
  249. </tr>
  250. <tr>
  251. <td class="paramkey"></td>
  252. <td></td>
  253. <td class="paramtype">const char *&#160;</td>
  254. <td class="paramname"><em>fmt</em>, </td>
  255. </tr>
  256. <tr>
  257. <td class="paramkey"></td>
  258. <td></td>
  259. <td class="paramtype">&#160;</td>
  260. <td class="paramname"><em>...</em>&#160;</td>
  261. </tr>
  262. <tr>
  263. <td></td>
  264. <td>)</td>
  265. <td></td><td></td>
  266. </tr>
  267. </table>
  268. </div><div class="memdoc">
  269. <p>Minimal formatted print.</p>
  270. <dl class="params"><dt>Parameters</dt><dd>
  271. <table class="params">
  272. <tr><td class="paramdir">[in]</td><td class="paramname">file</td><td>destination file or device. </td></tr>
  273. <tr><td class="paramdir">[in]</td><td class="paramname">fmt</td><td>format string.</td></tr>
  274. </table>
  275. </dd>
  276. </dl>
  277. <dl class="section return"><dt>Returns</dt><dd>number of character printed for success else a negative value. </dd></dl>
  278. </div>
  279. </div>
  280. <a id="aa3bc14da82a850b0f8ce848a6d54045f"></a>
  281. <h2 class="memtitle"><span class="permalink"><a href="#aa3bc14da82a850b0f8ce848a6d54045f">&#9670;&nbsp;</a></span>vfprintf()</h2>
  282. <div class="memitem">
  283. <div class="memproto">
  284. <div class="memtemplate">
  285. template&lt;typename F &gt; </div>
  286. <table class="memname">
  287. <tr>
  288. <td class="memname">int vfprintf </td>
  289. <td>(</td>
  290. <td class="paramtype"><a class="el" href="_sys_call_8h.html#a0e3009529aac180ed5f48296d6670d6b">F</a> *&#160;</td>
  291. <td class="paramname"><em>file</em>, </td>
  292. </tr>
  293. <tr>
  294. <td class="paramkey"></td>
  295. <td></td>
  296. <td class="paramtype">const char *&#160;</td>
  297. <td class="paramname"><em>fmt</em>, </td>
  298. </tr>
  299. <tr>
  300. <td class="paramkey"></td>
  301. <td></td>
  302. <td class="paramtype">va_list&#160;</td>
  303. <td class="paramname"><em>ap</em>&#160;</td>
  304. </tr>
  305. <tr>
  306. <td></td>
  307. <td>)</td>
  308. <td></td><td></td>
  309. </tr>
  310. </table>
  311. </div><div class="memdoc">
  312. <p>Formatted print.</p>
  313. <dl class="params"><dt>Parameters</dt><dd>
  314. <table class="params">
  315. <tr><td class="paramdir">[in]</td><td class="paramname">file</td><td>destination file or device. </td></tr>
  316. <tr><td class="paramdir">[in]</td><td class="paramname">fmt</td><td>format string. </td></tr>
  317. <tr><td class="paramdir">[in]</td><td class="paramname">ap</td><td>argument list.</td></tr>
  318. </table>
  319. </dd>
  320. </dl>
  321. <dl class="section return"><dt>Returns</dt><dd>number of character printed for success else a negative value. </dd></dl>
  322. </div>
  323. </div>
  324. <a id="ad139f8bf9b6ead8bd28abf1dd412a8a4"></a>
  325. <h2 class="memtitle"><span class="permalink"><a href="#ad139f8bf9b6ead8bd28abf1dd412a8a4">&#9670;&nbsp;</a></span>vmprintf()</h2>
  326. <div class="memitem">
  327. <div class="memproto">
  328. <div class="memtemplate">
  329. template&lt;typename F &gt; </div>
  330. <table class="memname">
  331. <tr>
  332. <td class="memname">int vmprintf </td>
  333. <td>(</td>
  334. <td class="paramtype"><a class="el" href="_sys_call_8h.html#a0e3009529aac180ed5f48296d6670d6b">F</a> *&#160;</td>
  335. <td class="paramname"><em>file</em>, </td>
  336. </tr>
  337. <tr>
  338. <td class="paramkey"></td>
  339. <td></td>
  340. <td class="paramtype">const char *&#160;</td>
  341. <td class="paramname"><em>fmt</em>, </td>
  342. </tr>
  343. <tr>
  344. <td class="paramkey"></td>
  345. <td></td>
  346. <td class="paramtype">va_list&#160;</td>
  347. <td class="paramname"><em>ap</em>&#160;</td>
  348. </tr>
  349. <tr>
  350. <td></td>
  351. <td>)</td>
  352. <td></td><td></td>
  353. </tr>
  354. </table>
  355. </div><div class="memdoc">
  356. <p>Minimal formatted print.</p>
  357. <dl class="params"><dt>Parameters</dt><dd>
  358. <table class="params">
  359. <tr><td class="paramdir">[in]</td><td class="paramname">file</td><td>destination file or device. </td></tr>
  360. <tr><td class="paramdir">[in]</td><td class="paramname">fmt</td><td>format string. </td></tr>
  361. <tr><td class="paramdir">[in]</td><td class="paramname">ap</td><td>argument list.</td></tr>
  362. </table>
  363. </dd>
  364. </dl>
  365. <dl class="section return"><dt>Returns</dt><dd>number of character printed for success else a negative value. </dd></dl>
  366. </div>
  367. </div>
  368. </div><!-- contents -->
  369. <!-- start footer part -->
  370. <hr class="footer"/><address class="footer"><small>
  371. Generated on Fri Dec 6 2019 09:45:11 for SdFat by &#160;<a href="http://www.doxygen.org/index.html">
  372. <img class="footer" src="doxygen.png" alt="doxygen"/>
  373. </a> 1.8.16
  374. </small></address>
  375. </body>
  376. </html>