<p></p>
<blockquote>
<p dir="auto">But one question that applies to both it and any script is how to know where the digits in the <code>version.txt</code> split, past contents have been <code>3211</code>. So without human intervention how will a script/program know if it is 3.21.1 (correct) or 3.2.11 (incorrect) or something else?</p>
</blockquote>
<p dir="auto">The "script" I had in mind is just a <code>sed</code> one-liner, based on Neil's own suggestion from a while back:</p>
<blockquote>
<p dir="auto">$ sed -e "s/(.)(.)(.)/\1.\2.\3/" < ~/merc/scintilla/version.txt<br>
<a href="https://groups.google.com/g/scintilla-interest/c/6Ertem36m_M/m/kvKhJQReAQAJ" rel="nofollow">https://groups.google.com/g/scintilla-interest/c/6Ertem36m_M/m/kvKhJQReAQAJ</a></p>
</blockquote>
<p dir="auto">Of course this assumes a single-digit major and minor number; the micro version can be any length.<br>
Dealing with double-digit major/minor increments might be unavoidable, but it would most likely be a rare occurrence.</p>
<blockquote>
<p dir="auto">If it needs human intervention it can't be runtime or makefile or configure, it could only be at update-scintilla.sh time.</p>
</blockquote>
<p dir="auto">I wouldn't suggest changing <code>update-scintilla.sh</code> for such a trivial feature. If the preference is to keep <code>config.h</code> generation as it is — and assuming 5.1.xx doesn't jump to 5.10.xx anytime soon — the least intrusive solution might look something like this:</p>
<div class="highlight highlight-source-diff"><pre><span class="pl-c1">diff --git a/src/Makefile.am b/src/Makefile.am</span>
index 8acddfb8..cf7abcda 100644
<span class="pl-md">--- a/src/Makefile.am</span>
<span class="pl-mi1">+++ b/src/Makefile.am</span>
<span class="pl-mdr">@@ -20,6 +20,7 @@</span> AM_CPPFLAGS = \
        -DGTK \
        -DGEANY_PRIVATE \
        -DG_LOG_DOMAIN=\""Geany"\" \
<span class="pl-mi1"><span class="pl-mi1">+</span>       -DSCI_VER=\""`sed -e 's/\(.\)\(.\)\(.\)/\1.\2.\3/' < $(top_srcdir)/scintilla/version.txt`"\" \</span>
        @GTK_CFLAGS@ @GTHREAD_CFLAGS@ \
        $(MAC_INTEGRATION_CFLAGS)

<span class="pl-c1">diff --git a/src/libmain.c b/src/libmain.c</span>
index d316f440..3d5437f0 100644
<span class="pl-md">--- a/src/libmain.c</span>
<span class="pl-mi1">+++ b/src/libmain.c</span>
<span class="pl-mdr">@@ -93,6 +93,10 @@</span> static gchar *original_cwd = NULL;

 static const gchar geany_lib_versions[] = "GTK %u.%u.%u, GLib %u.%u.%u";

<span class="pl-mi1"><span class="pl-mi1">+</span>#ifdef SCI_VER</span>
<span class="pl-mi1"><span class="pl-mi1">+</span>static const gchar geany_scintilla_version[] = "Scintilla %s";</span>
<span class="pl-mi1"><span class="pl-mi1">+</span>#endif</span>
<span class="pl-mi1"><span class="pl-mi1">+</span></span>
 static gboolean want_plugins;

 /* command-line options */
<span class="pl-mdr">@@ -1105,6 +1109,10 @@</span> gint main_lib(gint argc, gchar **argv)
                gtk_major_version, gtk_minor_version, gtk_micro_version,
                glib_major_version, glib_minor_version, glib_micro_version);

<span class="pl-mi1"><span class="pl-mi1">+</span>#ifdef SCI_VER</span>
<span class="pl-mi1"><span class="pl-mi1">+</span>       geany_debug(geany_scintilla_version, SCI_VER);</span>
<span class="pl-mi1"><span class="pl-mi1">+</span>#endif</span>
<span class="pl-mi1"><span class="pl-mi1">+</span></span>
        os_info = utils_get_os_info_string();
        if (os_info != NULL)
        {</pre></div>
<p dir="auto"><em>Lexilla version left out for brevity</em></p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />Reply to this email directly, <a href="https://github.com/geany/geany/discussions/3108#discussioncomment-2020495">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AAIOWJ22WU6G3G4XMTG4H73UXILWTANCNFSM5MPS4YVA">unsubscribe</a>.<br />Triage notifications on the go with GitHub Mobile for <a href="https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675">iOS</a> or <a href="https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub">Android</a>.
<br />You are receiving this because you are subscribed to this thread.<img src="https://github.com/notifications/beacon/AAIOWJ3BNDBCN47DDPFMNATUXILWTA5CNFSM5MPS4YVKYY3PNVWWK3TUL52HS4DFWFCGS43DOVZXG2LPNZBW63LNMVXHJKTDN5WW2ZLOORPWSZGOAAPNJDY.gif" height="1" width="1" alt="" /><span style="color: transparent; font-size: 0; display: none; visibility: hidden; overflow: hidden; opacity: 0; width: 0; height: 0; max-width: 0; max-height: 0; mso-hide: all">Message ID: <span><geany/geany/repo-discussions/3108/comments/2020495</span><span>@</span><span>github</span><span>.</span><span>com></span></span></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/geany/geany/discussions/3108#discussioncomment-2020495",
"url": "https://github.com/geany/geany/discussions/3108#discussioncomment-2020495",
"name": "View Discussion"
},
"description": "View this Discussion on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>