)]}'
{"/PATCHSET_LEVEL":[{"author":{"_account_id":1000438,"name":"R. Diez","email":"rdiez-2006@rd10.de","username":"rdiez"},"change_message_id":"8b1635f815a4381240cdbe05568d8a8ccb0a04b0","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":1,"id":"db02d7eb_ca0dd50a","updated":"2026-02-16 18:04:55.000000000","message":"This patch is not finished yet, the documentation for the new command is missing, but I want to get some feedback before carrying on.","commit_id":"f69f79b3c2a2331fc2e7dce0d3413b2f8c35de19"},{"author":{"_account_id":1000438,"name":"R. Diez","email":"rdiez-2006@rd10.de","username":"rdiez"},"change_message_id":"4f52898bb2ae7d0e0b292c351aefe77d4fdd5e43","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":1,"id":"c6c80498_c58af941","in_reply_to":"db02d7eb_ca0dd50a","updated":"2026-02-22 17:28:55.000000000","message":"Ack","commit_id":"f69f79b3c2a2331fc2e7dce0d3413b2f8c35de19"},{"author":{"_account_id":1000853,"name":"zapb","display_name":"Marc Schink","email":"dev@zapb.de","username":"zapb"},"change_message_id":"26bd067d4bcf9c70e2518d6d1554696b6149890a","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"d422afd4_fb53de26","updated":"2026-02-16 20:43:57.000000000","message":"Can you provide some background about your use case?\n\nI\u0027m not opposed to provide a version that is easier to parse but this should be implemented directly in the `version` command (with a new argument, similar to `git`). With your patch, it\u0027s still \"not trivial\" to parse the version but you have an additional and dedicated function for a single use case.\n\nBtw, parsing the version number in Tcl is actuall quite easy:\n\n```\nregexp {([0-9]+)\\.([0-9]+)\\.([0-9]+)} [version] -\u003e major minor revision\necho \"$major $minor $revision\"\n```","commit_id":"bea4c506cc3371a2b930bcad1ffd0d6d795953c8"},{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"af59f69f8bafebfbd090ee8a042d26beab6eadcc","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"58dc2d09_25f62fa7","updated":"2026-02-17 10:47:43.000000000","message":"Instead of these changes in the already complicated configure.ac, I would suggest adding an internal function that converts the string to a numeric packed value.\nAnd using the format `[vV]a.b.c[.*]` for the command argument instead of three arguments.\nApparently `sscanf()` is now deprecated for numeric conversions and `strtol()` must be used, requiring quite few lines. E.g.\n```\nstatic int version_to_int(const char *s)\n{\n\t// skip optional prefix for version\n\tif (*s \u003d\u003d \u0027v\u0027 || *s \u003d\u003d \u0027V\u0027)\n\t\ts++;\n\n\tint v \u003d 0;\n\tfor (unsigned int i \u003d 0; i \u003c 3; i++) {\n\t\tif (i \u0026\u0026 *s++ !\u003d \u0027.\u0027)\n\t\t\treturn -1;\n\n\t\tchar *endptr;\n\t\tlong l \u003d strtol(s, \u0026endptr, 10);\n\t\tif (l \u003c 0 || l \u003e 255 || endptr \u003d\u003d s)\n\t\t\treturn -1;\n\t\tv \u003d (v \u003c\u003c 8) + l;\n\t\ts \u003d endptr;\n\t}\n\n\treturn v;\n}\n```\n\nthen the code of the new command can directly check\n```\nint v \u003d version_to_int(CMD_ARGV[0]);\nif (v \u003c 0)\n    command_print(CMD, \"error message\");\n    return ERROR_COMMAND_ARGUMENT_INVALID;\n}\ncommand_print(CMD, v \u003c\u003d version_to_int(VERSION) ? \"0\" : \"1\");\n```","commit_id":"bea4c506cc3371a2b930bcad1ffd0d6d795953c8"},{"author":{"_account_id":1000438,"name":"R. Diez","email":"rdiez-2006@rd10.de","username":"rdiez"},"change_message_id":"4f52898bb2ae7d0e0b292c351aefe77d4fdd5e43","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"1eab2bcf_9ec0acf2","updated":"2026-02-22 17:28:55.000000000","message":"Let\u0027s see whether we can find a common ground for me to carry on with this patch:\n\n1) I do not want to parse the OpenOCD version string, for the reasons I have stated above.\n\nThat means I want to keep DEF_OPENOCD_VERSION_MAJOR etc. as separate integers in configure.ac.\n\n2) I do not want to convert a version number into a packed number, for the reasons I have stated above.\n\n3) The easiest way would be to export the 3 global Tcl variables I mentioned, like $open_ocd_version_major, but I gather this suggestion hasn\u0027t gained any traction.\n\n4) I wouldn\u0027t implement an \u0027is_version_at_least\u0027 anymore, but something like \"version compare a.b.c\", as Antonio originally suggested in the mailing list.\n\nThat would remove the need to compare 3 integers, or some packed variant, in Tcl code.\n\nBut this suggestion did not seem to find any resonance either.\n\n\nI am not particularly attached to this new version check command, so I wouldn\u0027t mind letting this feature be, or letting somebody else implement it.","commit_id":"bea4c506cc3371a2b930bcad1ffd0d6d795953c8"},{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"f56b53a9b6831a73629bfb546b1a5b3ee94eab1c","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":3,"id":"949ad08e_e78f13cd","in_reply_to":"1eab2bcf_9ec0acf2","updated":"2026-02-24 11:52:50.000000000","message":"\u003e Let\u0027s see whether we can find a common ground ...\n\nYes, agree. The objective here is to improve OpenOCD without too much headache either for developers and for maintainers.\n\nHaving the version in `configure.ac` as a string or set of values is not really relevant. The important thing is that it\u0027s well compacted and in one place only (not necessarily one line!)\nWould be nice if it\u0027s something like `whatever_syntax(0, 12, 0, \"-dev\")` where last parameter can be an empty string. Let\u0027s see!\n\nThe `version compare`, if implemented as a variant of the existing `version` command (without making it a subcommand), will prevent adding a new command.\nI would like to avoid making this exploding, later-on, as multiple variants like `version lower_then`, `version higher_or_equal` and so on.\nPlease propose what would be the returned value.\nWorst case, back to `version is_at_least` with the same return value as in current patch.","commit_id":"bea4c506cc3371a2b930bcad1ffd0d6d795953c8"},{"author":{"_account_id":1000853,"name":"zapb","display_name":"Marc Schink","email":"dev@zapb.de","username":"zapb"},"change_message_id":"a72f54b84223403542568b7a4b896bb24750b7f7","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"b7acc2d1_144552eb","in_reply_to":"58dc2d09_25f62fa7","updated":"2026-02-17 11:38:07.000000000","message":"Antonio, if we consider version string parsing to be (1) problematic and overly complex, and (2) potentially unstable because the string format may change, then we should address the root issue: provide a version number that is easy to parse and stable.\n\nInstead, this patch introduces a use-case-specific solution and an **additional** command for version comparison - something that could be handled by a single (Tcl) `if` statement if we had a simple version API.","commit_id":"bea4c506cc3371a2b930bcad1ffd0d6d795953c8"},{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"c6d434c1719df295f1b539c8bdca38183ae1056d","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":3,"id":"e453d0d6_44908cfa","in_reply_to":"61b5ceb5_296c0116","updated":"2026-02-18 09:22:07.000000000","message":"The version of OpenOCD is in the format `a.b.c` only at release delivery.\nIf you checkout the commit at git tag `v0.12.0` and build, you get in the generated `config.h`\n`#define VERSION \"0.12.0\"`\nand command `version` returns (it\u0027s the same first line of log)\n`Open On-Chip Debugger 0.12.0 (2026-02-18-09:38)`\n\nBut the following commit f8a6553e8291 (\"Restore normal development cycle\")\nthat starts the development cycle makes the version\n`#define VERSION \"0.12.0+dev\"`\nand log\n`Open On-Chip Debugger 0.12.0+dev-00001-gf8a6553e8 (2026-02-18-09:34)`\n\nI assume you only want to check the versions against tagged releases, as extending the check for all the intermediate dev commits would probably have no sense.\nNevertheless the command should be functional during dev cycle, when the suffix \u0027-dev` is added.\n\nI consider more natural having the new command using the same format of the OpenOCD version as parameter\n`is_version_at_least a.b.c`\ninstead of having it split it in 3 parameters\n`is_version_at_least a  b  c`\n\nMarc proposal of moving the comparison in Tcl instead of adding a new command is interesting but comparing the 3 numbers is awful.\nTo make the Tcl comparison easy, the version should be returned as a single numeric value.\nSo somehow packing in an integer the triplet `a.b.c`, like in my proposal. The weakness is that the user should know the packing algorithm and later we cannot easily change it.\nAn improvement could be to hide the packing from user\u0027s view:\n- `version -n` returns the current version as an obscure packed number;\n- `version -n a.b.c` returns the packed number for the version indicated;\n- Tcl compares the numbers returned by the two commands,\n\nChanging later the packing algorithm would be trivial.\n\nWhile we could easily add inside more information, like the commits counting from last tag, this would be a mess if someone builds in a fork. He would get the commit counting in that fork, completely unrelated with upstream dev.\nI think it\u0027s better sticking at comparing official releases only.\n\nAll this independently from how we define the triplet `a.b.c` in `configure.ac`.","commit_id":"bea4c506cc3371a2b930bcad1ffd0d6d795953c8"},{"author":{"_account_id":1000438,"name":"R. Diez","email":"rdiez-2006@rd10.de","username":"rdiez"},"change_message_id":"df522d8a921fbe0b0e94ac694a636610b9f33b55","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"52aedf81_7a76e420","in_reply_to":"671fd812_7c46b944","updated":"2026-03-01 11:55:00.000000000","message":"That implementation is an interesting Autoconf gymnastic which parses this way:\n\nm4_unquote(m4_split(m4_expand([$2]), [\\.]))\n  \nThis is not the kind of code which I would like to contribute, but perhaps you want to contribute it yourself? The only thing missing is handling the optional \"+dev\" suffix in the OpenOCD version string.\n\nThere is no time pressure, as I am pausing my work on this anyway.","commit_id":"bea4c506cc3371a2b930bcad1ffd0d6d795953c8"},{"author":{"_account_id":1000438,"name":"R. Diez","email":"rdiez-2006@rd10.de","username":"rdiez"},"change_message_id":"af5552da778517703ee8719d0b4face0a70dec4a","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":3,"id":"61b5ceb5_296c0116","in_reply_to":"6916fdc8_50961e61","updated":"2026-02-17 18:11:48.000000000","message":"I do not understand you guys. The concept of version components major, minor and revision is very widespread, see for example __GNUC__, __GNUC_MINOR__ and __GNUC_PATCHLEVEL__. It is very simple to implement, it\u0027s just 3 integers. I already found the right Autoconf magic to keep both the half-broken Autoconf 2.69 and OpenOCD\u0027s maximum line length checker happy.\n\nIt is nothing out of the ordinary in Autoconf. Many other projects set the version that way, and some even read the version number from a file from inside configure.ac .\n\nThose 3 integers are very easy to use everywhere: in configure.ac, Makefile.am, shell scripts, C, Tcl... But you want a string which you then have to parse everywhere in those languages whenever you want to check the version number. And then you can never change the version string format for fear of breaking parsers everywhere.\n\nAnd now the new command to compare version numbers should take a string like [vV]a.b.c[.*] . Why should we accept any rubbish at end? If the user passes \"1.2.3-4\", like some Ubuntu package version numbers, should we make the user believe the function is going to consider the -4 suffix, when in fact it just ignores it?\n\nFurthermore, we should now pack the version in a 32-bit integer. Should we force the users to apply some math or bit shifting in order to check a simple minimum version number? Like if I just want to check that the major version is not 0? Wasn\u0027t it not long ago that some Linux Kernel tooling started to have problems because the lowest kernel version component got \u003e 255?\n\nDo we want to parse the OpenOCD version number once on start-up? What are we going to do if version_to_int() fails on start-up? Should we panic? Or do we want to parse every time? Or only on first touch?\n\nHow about we drop the idea of parsing and keep the 3 simple integers in configure.ac?\n\nCan we start by just exporting 3 global Tcl variables named like this?\n\n$open_ocd_version_major\n$open_ocd_version_minor\n$open_ocd_version_revision\n\nCan we make them read only? I am guessing that Tcl does not know the concept of a constant.\n\nThen we can decide whether we want to provide a helper function to compare version numbers in C or in Tcl.","commit_id":"bea4c506cc3371a2b930bcad1ffd0d6d795953c8"},{"author":{"_account_id":1000853,"name":"zapb","display_name":"Marc Schink","email":"dev@zapb.de","username":"zapb"},"change_message_id":"4208423e44702713bb539f8a23a603c49e397eb6","unresolved":true,"context_lines":[],"source_content_type":"","patch_set":3,"id":"671fd812_7c46b944","in_reply_to":"949ad08e_e78f13cd","updated":"2026-02-24 12:21:17.000000000","message":"\u003e Having the version in configure.ac as a string or set of values is not really relevant. The important thing is that it\u0027s well compacted and in one place only (not necessarily one line!)\nWould be nice if it\u0027s something like whatever_syntax(0, 12, 0, \"-dev\") where last parameter can be an empty string. Let\u0027s see!\n\nA similar approach [1,2] to the one I use in libjaylink could also be used here.\n\n[1] https://gitlab.zapb.de/libjaylink/libjaylink/-/blob/master/configure.ac?ref_type\u003dheads#L54\n[2] https://gitlab.zapb.de/libjaylink/libjaylink/-/blob/master/m4/jaylink.m4?ref_type\u003dheads#L35","commit_id":"bea4c506cc3371a2b930bcad1ffd0d6d795953c8"},{"author":{"_account_id":1000021,"name":"Antonio Borneo","email":"borneo.antonio@gmail.com","username":"borneoa"},"change_message_id":"93760525084ea6798833e7bfc2bfbc5232f28c8f","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"6916fdc8_50961e61","in_reply_to":"b7acc2d1_144552eb","updated":"2026-02-17 13:31:58.000000000","message":"Yes, just adding a flag, e.g. `-n` will let the command `version` to return the packed unsigned value instead of the string. That\u0027s way better than adding a new command.\n\nRegarding future changes in version number, I think the relevant code should be adapted at that time. We don\u0027t know how it will change, so nothing we can or should anticipate now.\nAnd if we say that for the moment we stick to the current version structure, then let\u0027s trash my proposal and go directly to a simpler code with even no boundaries and error checks.\n```\n/*\n * Current assumption for VERSION is that it is composed by three unsigned values\n * lower than 256, separated by a single dot \u0027.\u0027, plus a non-numeric suffix that\n * gets ignored in the code below.\n * This code has to change if the format of VERSION changes.\n */\nuint8_t v[3];\n(void)sscanf(VERSION, \"%hhu.%hhu.%hhu\", \u0026v[2], \u0026v[1], \u0026v[0]);\nuint32_t version \u003d buf_get_u32(v, 0, 24);\n```\n\n```\nset version_0_12_3 0x000c03\nif { [version -n] \u003c $version_0_12_3} {...}\n```","commit_id":"bea4c506cc3371a2b930bcad1ffd0d6d795953c8"},{"author":{"_account_id":1000438,"name":"R. Diez","email":"rdiez-2006@rd10.de","username":"rdiez"},"change_message_id":"4f52898bb2ae7d0e0b292c351aefe77d4fdd5e43","unresolved":false,"context_lines":[],"source_content_type":"","patch_set":3,"id":"087af6a9_868c9cca","in_reply_to":"e453d0d6_44908cfa","updated":"2026-02-22 17:28:55.000000000","message":"Ack","commit_id":"bea4c506cc3371a2b930bcad1ffd0d6d795953c8"}],"configure.ac":[{"author":{"_account_id":1000438,"name":"R. Diez","email":"rdiez-2006@rd10.de","username":"rdiez"},"change_message_id":"8b1635f815a4381240cdbe05568d8a8ccb0a04b0","unresolved":true,"context_lines":[{"line_number":6,"context_line":"m4_define([DEF_OPENOCD_VERSION_MINOR],[12])"},{"line_number":7,"context_line":"m4_define([DEF_OPENOCD_VERSION_REVISION],[0])"},{"line_number":8,"context_line":"m4_define([DEF_OPENOCD_VERSION],"},{"line_number":9,"context_line":"m4_defn([DEF_OPENOCD_VERSION_MAJOR]).\\"},{"line_number":10,"context_line":"m4_defn([DEF_OPENOCD_VERSION_MINOR]).\\"},{"line_number":11,"context_line":"m4_defn([DEF_OPENOCD_VERSION_REVISION]))"},{"line_number":12,"context_line":""}],"source_content_type":"application/octet-stream","patch_set":1,"id":"c17dd1b8_2078ca63","line":9,"updated":"2026-02-16 18:04:55.000000000","message":"About the lack of indentation here:\nI could not find a way to keep this line\u0027s length under 120 characters.\nIf you indent the components, I could not find a way to remove the spaces and/or newlines between the version components, even if you use m4_normalize.","commit_id":"f69f79b3c2a2331fc2e7dce0d3413b2f8c35de19"},{"author":{"_account_id":1000438,"name":"R. Diez","email":"rdiez-2006@rd10.de","username":"rdiez"},"change_message_id":"496ff76ca8d2de702b9391e2ae004117062c7999","unresolved":false,"context_lines":[{"line_number":6,"context_line":"m4_define([DEF_OPENOCD_VERSION_MINOR],[12])"},{"line_number":7,"context_line":"m4_define([DEF_OPENOCD_VERSION_REVISION],[0])"},{"line_number":8,"context_line":"m4_define([DEF_OPENOCD_VERSION],"},{"line_number":9,"context_line":"m4_defn([DEF_OPENOCD_VERSION_MAJOR]).\\"},{"line_number":10,"context_line":"m4_defn([DEF_OPENOCD_VERSION_MINOR]).\\"},{"line_number":11,"context_line":"m4_defn([DEF_OPENOCD_VERSION_REVISION]))"},{"line_number":12,"context_line":""}],"source_content_type":"application/octet-stream","patch_set":1,"id":"b3dd7517_dceecefa","line":9,"in_reply_to":"c17dd1b8_2078ca63","updated":"2026-02-16 20:30:33.000000000","message":"I had to rearrange this line due to an issue with the older Autoconf 2.69.","commit_id":"f69f79b3c2a2331fc2e7dce0d3413b2f8c35de19"}],"src/openocd.c":[{"author":{"_account_id":1000853,"name":"zapb","display_name":"Marc Schink","email":"dev@zapb.de","username":"zapb"},"change_message_id":"26bd067d4bcf9c70e2518d6d1554696b6149890a","unresolved":true,"context_lines":[{"line_number":70,"context_line":"\treturn ERROR_OK;"},{"line_number":71,"context_line":"}"},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"COMMAND_HANDLER(handle_is_version_at_least_command)"},{"line_number":74,"context_line":"{"},{"line_number":75,"context_line":"\tif (CMD_ARGC !\u003d 3)"},{"line_number":76,"context_line":"\t\treturn ERROR_COMMAND_SYNTAX_ERROR;"}],"source_content_type":"text/x-csrc","patch_set":3,"id":"88789846_d268f3ba","line":73,"updated":"2026-02-16 20:43:57.000000000","message":"However we proceed with this patch, this should be implemented in Tcl rather than directly in OpenOCD. It\u0027s a perfect fit for Tcl.","commit_id":"bea4c506cc3371a2b930bcad1ffd0d6d795953c8"},{"author":{"_account_id":1000438,"name":"R. Diez","email":"rdiez-2006@rd10.de","username":"rdiez"},"change_message_id":"e7d7337df5dac1445f6c06cf5ce93146d15f904a","unresolved":true,"context_lines":[{"line_number":70,"context_line":"\treturn ERROR_OK;"},{"line_number":71,"context_line":"}"},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"COMMAND_HANDLER(handle_is_version_at_least_command)"},{"line_number":74,"context_line":"{"},{"line_number":75,"context_line":"\tif (CMD_ARGC !\u003d 3)"},{"line_number":76,"context_line":"\t\treturn ERROR_COMMAND_SYNTAX_ERROR;"}],"source_content_type":"text/x-csrc","patch_set":3,"id":"98276535_018b62ab","line":73,"in_reply_to":"88789846_d268f3ba","updated":"2026-02-16 21:24:21.000000000","message":"In complex software, especially with built-in scripting, there is often a need to check the platform version. For example, you may want to warn the user about a known bug between 2 OpenOCD versions. Here is a longer discussion about checking the version number:\n\nCheck OpenOCD version in Tcl because of mem2array deprecation\n\nhttps://sourceforge.net/p/openocd/mailman/openocd-user/thread/54d7e609-8491-2f29-b38d-f1f530907ac9%40yahoo.de/#msg37670805\n\nParsing the version string with a regular expression is brittle and slow, not really \"a perfect fit\". In an case, it would be better to export the version components to Tcl as separate integers. That was actually the hardest thing to do in configure.ac.\n\nIn my opinion, there is no reason to resort to Tcl when you can add a simple command or subcommand in C. With separate version components, it is trivial to follow all users of the version number in the code, should something need to change in the future. If other code starts parsing the version string, it is easy to miss and break the parser should you change the version string format.\n\nI do not mind how the command is called, or whether it should be a subcommand of \"version\". In the latter case, it would not really make sense to implement it in Tcl if the main \"version\" command is in C.\n\nI realise now that the new command should be called something like \"version_cmp\", as Antonio suggested, and return an integer value like -1, 0 and +1.","commit_id":"bea4c506cc3371a2b930bcad1ffd0d6d795953c8"},{"author":{"_account_id":1000853,"name":"zapb","display_name":"Marc Schink","email":"dev@zapb.de","username":"zapb"},"change_message_id":"16d744082d69062cbbb8e7716a1ae1a11db0c281","unresolved":true,"context_lines":[{"line_number":70,"context_line":"\treturn ERROR_OK;"},{"line_number":71,"context_line":"}"},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"COMMAND_HANDLER(handle_is_version_at_least_command)"},{"line_number":74,"context_line":"{"},{"line_number":75,"context_line":"\tif (CMD_ARGC !\u003d 3)"},{"line_number":76,"context_line":"\t\treturn ERROR_COMMAND_SYNTAX_ERROR;"}],"source_content_type":"text/x-csrc","patch_set":3,"id":"a24e6986_4490bd5f","line":73,"in_reply_to":"98276535_018b62ab","updated":"2026-02-16 21:37:18.000000000","message":"\u003e In complex software, especially with built-in scripting, there is often a need to check the platform version. For example, you may want to warn the user about a known bug between 2 OpenOCD versions. Here is a longer discussion about checking the version number:\n\u003e \n\u003e Check OpenOCD version in Tcl because of mem2array deprecation\n\u003e \n\u003e https://sourceforge.net/p/openocd/mailman/openocd-user/thread/54d7e609-8491-2f29-b38d-f1f530907ac9%40yahoo.de/#msg37670805\n\nPerfect use case, I\u0027m on your side.\n\n\u003e Parsing the version string with a regular expression is brittle and slow, not really \"a perfect fit\". In an case, it would be better to export the version components to Tcl as separate integers. That was actually the hardest thing to do in configure.ac.\n\nThis is something you do once for an entire OpenOCD debug session. Performace is not an issue here at all. Anyway, this was only an example to show that parsing the string is not complicated. But as I said before: I\u0027m not opposed to provide a simpler version string.\n\n\u003e In my opinion, there is no reason to resort to Tcl when you can add a simple command or subcommand in C. With separate version components, it is trivial to follow all users of the version number in the code, should something need to change in the future. If other code starts parsing the version string, it is easy to miss and break the parser should you change the version string format.\n\nSee my comment above.\n\n\u003e I do not mind how the command is called, or whether it should be a subcommand of \"version\". In the latter case, it would not really make sense to implement it in Tcl if the main \"version\" command is in C.\n\nObviously (and highlighted) I\u0027m takling about your comparison function that should be implemented in Tcl and not the (already existing) `version` command.","commit_id":"bea4c506cc3371a2b930bcad1ffd0d6d795953c8"},{"author":{"_account_id":1000438,"name":"R. Diez","email":"rdiez-2006@rd10.de","username":"rdiez"},"change_message_id":"4f52898bb2ae7d0e0b292c351aefe77d4fdd5e43","unresolved":false,"context_lines":[{"line_number":70,"context_line":"\treturn ERROR_OK;"},{"line_number":71,"context_line":"}"},{"line_number":72,"context_line":""},{"line_number":73,"context_line":"COMMAND_HANDLER(handle_is_version_at_least_command)"},{"line_number":74,"context_line":"{"},{"line_number":75,"context_line":"\tif (CMD_ARGC !\u003d 3)"},{"line_number":76,"context_line":"\t\treturn ERROR_COMMAND_SYNTAX_ERROR;"}],"source_content_type":"text/x-csrc","patch_set":3,"id":"aa684533_c4a939bf","line":73,"in_reply_to":"a24e6986_4490bd5f","updated":"2026-02-22 17:28:55.000000000","message":"Ack","commit_id":"bea4c506cc3371a2b930bcad1ffd0d6d795953c8"}]}
