<p>You can even stick with only one "save" function and just simulate defaults. Say your function has the signature</p>

<pre><code>void save(X,Y,Z)
</code></pre>

<p>where X, Y and Z are some types, and you would like to simulate </p>

<pre><code>void save(X,Y, Z,bool=false)
</code></pre>

<p>where setting the bool parameter to true would cause the new behaviour - no popup on failure, but storing the error message in a global variable save_last_error. To do this in C, you would use a variable argument list, i.e.</p>

<pre><code>void save(X,Y,...)
</code></pre>

<p>and use va_arg to scan for the parameters which are present, and deduce the value of the bool from it.</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br>Reply to this email directly or <a href="https://github.com/geany/geany/issues/815#issuecomment-165044089">view it on GitHub</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/ABDrJ5sywb4J-ul_ix1UkyNuUsjL5Z0Mks5pQSS7gaJpZM4G04_e.gif" width="1" /></p>
<div itemscope itemtype="http://schema.org/EmailMessage">
<div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
  <link itemprop="url" href="https://github.com/geany/geany/issues/815#issuecomment-165044089"></link>
  <meta itemprop="name" content="View Issue"></meta>
</div>
<meta itemprop="description" content="View this Issue on GitHub"></meta>
</div>