<p>The macros were used to generate the key string to use in the [build-menu] setting of each keyfile.</p>
<ul>
<li>Use one function to set both the group and command index, encapsulating the <code>sprintf(cmdbuf</code> code.</li>
<li>Use a separate function to set the field of the command, as this is needed 3 times per command. This takes a GEANY_BC_* value instead of a string literal for clarity.</li>
<li>Merge 2 for loops.</li>
</ul>
<p>(This also makes 2 global scope string arrays into local arrays).</p>

<hr>

<h4>You can view, comment on, or merge this pull request online at:</h4>
<p>  <a href='https://github.com/geany/geany/pull/2286'>https://github.com/geany/geany/pull/2286</a></p>

<h4>Commit Summary</h4>
<ul>
  <li>build.c: Replace unhygienic set_key_* macros with 2 functions</li>
</ul>

<h4>File Changes</h4>
<ul>
  <li>
    <strong>M</strong>
    <a href="https://github.com/geany/geany/pull/2286/files#diff-0">src/build.c</a>
    (74)
  </li>
</ul>

<h4>Patch Links:</h4>
<ul>
  <li><a href='https://github.com/geany/geany/pull/2286.patch'>https://github.com/geany/geany/pull/2286.patch</a></li>
  <li><a href='https://github.com/geany/geany/pull/2286.diff'>https://github.com/geany/geany/pull/2286.diff</a></li>
</ul>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/geany/geany/pull/2286?email_source=notifications&email_token=AAIOWJ774MPCGTQKODN4LYTQIESSZA5CNFSM4IT7PYSKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HJSPR2Q">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAIOWJ2OVZWQ4L7KPOHCTRTQIESSZANCNFSM4IT7PYSA">mute the thread</a>.<img src="https://github.com/notifications/beacon/AAIOWJ4ZJRX3YZ75XIWORW3QIESSZA5CNFSM4IT7PYSKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HJSPR2Q.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/geany/geany/pull/2286?email_source=notifications\u0026email_token=AAIOWJ774MPCGTQKODN4LYTQIESSZA5CNFSM4IT7PYSKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HJSPR2Q",
"url": "https://github.com/geany/geany/pull/2286?email_source=notifications\u0026email_token=AAIOWJ774MPCGTQKODN4LYTQIESSZA5CNFSM4IT7PYSKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HJSPR2Q",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>