Sophie

Sophie

distrib > Mandriva > 2010.2 > i586 > media > contrib-backports > by-pkgid > 9601c7beb4ff23e834bfa171795ed560 > files > 891

vidalia-0.2.9-1mdv2010.1.i586.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>Vidalia: po2nsh.cpp 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.6.3 -->
<div class="navigation" id="top">
  <div class="tabs">
    <ul>
      <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li><a href="annotated.html"><span>Classes</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>
    </ul>
  </div>
  <div class="tabs">
    <ul>
      <li><a href="files.html"><span>File&nbsp;List</span></a></li>
      <li><a href="globals.html"><span>File&nbsp;Members</span></a></li>
    </ul>
  </div>
  <div class="navpath"><a class="el" href="dir_b47abd1aad201a152869566145babb61.html">src</a>&nbsp;&raquo;&nbsp;<a class="el" href="dir_beeb2bbed11c559150a792aad3aaec87.html">tools</a>&nbsp;&raquo;&nbsp;<a class="el" href="dir_b64bc80a0889c3e4833a47c8f7a3b741.html">po2nsh</a>
  </div>
</div>
<div class="contents">
<h1>po2nsh.cpp File Reference</h1><code>#include &lt;QHash&gt;</code><br/>
<code>#include &lt;QFile&gt;</code><br/>
<code>#include &lt;QTextStream&gt;</code><br/>
<code>#include &lt;QTextCodec&gt;</code><br/>
<code>#include &lt;stdlib.h&gt;</code><br/>

<p><a href="po2nsh_8cpp_source.html">Go to the source code of this file.</a></p>
<table border="0" cellpadding="0" cellspacing="0">
<tr><td colspan="2"><h2>Functions</h2></td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QString&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="po2nsh_8cpp.html#a365f06fe0efd30b4822c6b74fb8a8312">parse_message_context</a> (const QString &amp;str)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QString&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="po2nsh_8cpp.html#a041f6703063a9673d913561962ddbc6c">parse_message_context_lame</a> (const QString &amp;str)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QString&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="po2nsh_8cpp.html#a2536f50f6d8ff0752b5fd134a7ef7082">parse_message_string</a> (const QString &amp;msg)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">QString&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="po2nsh_8cpp.html#a30bb52b8ae8ec480fb93b39710da3b45">read_next_line</a> (QTextStream *stream)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="po2nsh_8cpp.html#a8c13543b77ece0e6dc9d0fe52b59e57d">skip_po_header</a> (QTextStream *po)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="po2nsh_8cpp.html#a55320e7c95b3bea6021cd245c677f0ec">po2nsh</a> (QTextStream *po, QString *nsh, const QString &amp;language, QString *errorMessage)</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="po2nsh_8cpp.html#a068e9e76bf4a101f996e30fd122df007">print_usage_and_exit</a> ()</td></tr>
<tr><td class="memItemLeft" align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="po2nsh_8cpp.html#a0ddf1224851353fc92bfbff6f499fa97">main</a> (int argc, char *argv[])</td></tr>
</table>
<hr/><h2>Function Documentation</h2>
<a class="anchor" id="a0ddf1224851353fc92bfbff6f499fa97"></a><!-- doxytag: member="po2nsh.cpp::main" ref="a0ddf1224851353fc92bfbff6f499fa97" args="(int argc, char *argv[])" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int main </td>
          <td>(</td>
          <td class="paramtype">int&nbsp;</td>
          <td class="paramname"> <em>argc</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">char *&nbsp;</td>
          <td class="paramname"> <em>argv</em>[]</td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">

<p>Definition at line <a class="el" href="po2nsh_8cpp_source.html#l00180">180</a> of file <a class="el" href="po2nsh_8cpp_source.html">po2nsh.cpp</a>.</p>

<p>References <a class="el" href="namespacetc.html#aa7353218fd7baef0876bbb422ce818af">tc::error()</a>, <a class="el" href="html_8cpp_source.html#l00033">i()</a>, <a class="el" href="po2nsh_8cpp_source.html#l00085">po2nsh()</a>, and <a class="el" href="nsh2po_8cpp_source.html#l00259">print_usage_and_exit()</a>.</p>

</div>
</div>
<a class="anchor" id="a365f06fe0efd30b4822c6b74fb8a8312"></a><!-- doxytag: member="po2nsh.cpp::parse_message_context" ref="a365f06fe0efd30b4822c6b74fb8a8312" args="(const QString &amp;str)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">QString parse_message_context </td>
          <td>(</td>
          <td class="paramtype">const QString &amp;&nbsp;</td>
          <td class="paramname"> <em>str</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Parse the context name from <b>str</b>, where the context name is of the form DQUOTE ContextName DQUOTE. </p>

<p>Definition at line <a class="el" href="po2nsh_8cpp_source.html#l00021">21</a> of file <a class="el" href="po2nsh_8cpp_source.html">po2nsh.cpp</a>.</p>

</div>
</div>
<a class="anchor" id="a041f6703063a9673d913561962ddbc6c"></a><!-- doxytag: member="po2nsh.cpp::parse_message_context_lame" ref="a041f6703063a9673d913561962ddbc6c" args="(const QString &amp;str)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">QString parse_message_context_lame </td>
          <td>(</td>
          <td class="paramtype">const QString &amp;&nbsp;</td>
          <td class="paramname"> <em>str</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Parse the context name from <b>str</b>, where <b>str</b> is of the form ContextName::Number. This is the format used by translate-toolkit. </p>

<p>Definition at line <a class="el" href="po2nsh_8cpp_source.html#l00031">31</a> of file <a class="el" href="po2nsh_8cpp_source.html">po2nsh.cpp</a>.</p>

</div>
</div>
<a class="anchor" id="a2536f50f6d8ff0752b5fd134a7ef7082"></a><!-- doxytag: member="po2nsh.cpp::parse_message_string" ref="a2536f50f6d8ff0752b5fd134a7ef7082" args="(const QString &amp;msg)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">QString parse_message_string </td>
          <td>(</td>
          <td class="paramtype">const QString &amp;&nbsp;</td>
          <td class="paramname"> <em>msg</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Parse the PO-formatted message string from <b>msg</b>. If <b>msg</b> is a multiline string, the extra double quotes will be replaced with newlines appropriately. </p>

<p>Definition at line <a class="el" href="po2nsh_8cpp_source.html#l00042">42</a> of file <a class="el" href="po2nsh_8cpp_source.html">po2nsh.cpp</a>.</p>

</div>
</div>
<a class="anchor" id="a55320e7c95b3bea6021cd245c677f0ec"></a><!-- doxytag: member="po2nsh.cpp::po2nsh" ref="a55320e7c95b3bea6021cd245c677f0ec" args="(QTextStream *po, QString *nsh, const QString &amp;language, QString *errorMessage)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int po2nsh </td>
          <td>(</td>
          <td class="paramtype">QTextStream *&nbsp;</td>
          <td class="paramname"> <em>po</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">QString *&nbsp;</td>
          <td class="paramname"> <em>nsh</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const QString &amp;&nbsp;</td>
          <td class="paramname"> <em>language</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">QString *&nbsp;</td>
          <td class="paramname"> <em>errorMessage</em></td><td>&nbsp;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td><td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Convert <b>po</b> from the PO format to a NSIS-formatted .nsh document. <b>nsh</b> will be set to the resulting .nsh document. Return the number of converted strings on success, or -1 on error and <b>errorMessage</b> will be set. </p>

<p>Definition at line <a class="el" href="po2nsh_8cpp_source.html#l00085">85</a> of file <a class="el" href="po2nsh_8cpp_source.html">po2nsh.cpp</a>.</p>

<p>References <a class="el" href="nsh2po_8cpp_source.html#l00025">parse_message_context()</a>, <a class="el" href="nsh2po_8cpp_source.html#l00035">parse_message_context_lame()</a>, <a class="el" href="nsh2po_8cpp_source.html#l00044">parse_message_string()</a>, <a class="el" href="nsh2po_8cpp_source.html#l00109">read_next_line()</a>, and <a class="el" href="po2nsh_8cpp_source.html#l00069">skip_po_header()</a>.</p>

<p>Referenced by <a class="el" href="po2nsh_8cpp_source.html#l00180">main()</a>.</p>

</div>
</div>
<a class="anchor" id="a068e9e76bf4a101f996e30fd122df007"></a><!-- doxytag: member="po2nsh.cpp::print_usage_and_exit" ref="a068e9e76bf4a101f996e30fd122df007" args="()" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void print_usage_and_exit </td>
          <td>(</td>
          <td class="paramname"></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Display application usage and exit. </p>

<p>Definition at line <a class="el" href="po2nsh_8cpp_source.html#l00164">164</a> of file <a class="el" href="po2nsh_8cpp_source.html">po2nsh.cpp</a>.</p>

<p>References <a class="el" href="namespacetc.html#aa7353218fd7baef0876bbb422ce818af">tc::error()</a>.</p>

</div>
</div>
<a class="anchor" id="a30bb52b8ae8ec480fb93b39710da3b45"></a><!-- doxytag: member="po2nsh.cpp::read_next_line" ref="a30bb52b8ae8ec480fb93b39710da3b45" args="(QTextStream *stream)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">QString read_next_line </td>
          <td>(</td>
          <td class="paramtype">QTextStream *&nbsp;</td>
          <td class="paramname"> <em>stream</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Read and return the next non-empty line from <b>stream</b>. </p>

<p>Definition at line <a class="el" href="po2nsh_8cpp_source.html#l00059">59</a> of file <a class="el" href="po2nsh_8cpp_source.html">po2nsh.cpp</a>.</p>

</div>
</div>
<a class="anchor" id="a8c13543b77ece0e6dc9d0fe52b59e57d"></a><!-- doxytag: member="po2nsh.cpp::skip_po_header" ref="a8c13543b77ece0e6dc9d0fe52b59e57d" args="(QTextStream *po)" -->
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void skip_po_header </td>
          <td>(</td>
          <td class="paramtype">QTextStream *&nbsp;</td>
          <td class="paramname"> <em>po</em></td>
          <td>&nbsp;)&nbsp;</td>
          <td></td>
        </tr>
      </table>
</div>
<div class="memdoc">
<p>Skip past the header portion of the PO file and any leading whitespace. The next line read from <b>po</b> will be the first non-header line in the document. </p>

<p>Definition at line <a class="el" href="po2nsh_8cpp_source.html#l00069">69</a> of file <a class="el" href="po2nsh_8cpp_source.html">po2nsh.cpp</a>.</p>

<p>Referenced by <a class="el" href="po2nsh_8cpp_source.html#l00085">po2nsh()</a>, <a class="el" href="po2ts_8cpp_source.html#l00152">po2ts()</a>, and <a class="el" href="po2wxl_8cpp_source.html#l00177">po2wxl()</a>.</p>

</div>
</div>
</div>
<hr class="footer"/><address style="text-align: right;"><small>Generated on Mon Aug 30 22:58:55 2010 for Vidalia by&nbsp;
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.6.3 </small></address>
</body>
</html>