[Github-comments] [geany/geany] Improve handling of anonymous tags (PR #3059)

elextr notifications at xxxxx
Mon Dec 20 12:29:28 UTC 2021


@elextr commented on this pull request.



> @@ -818,6 +818,28 @@ void tm_parser_verify_type_mappings(void)
 }
 
 
+/* determine anonymous tags from tag names only when corresponding
+ * ctags information is not available */
+gboolean tm_parser_is_anon_name(TMParserType lang, gchar *name)
+{
+	guint i;
+	char dummy;
+
+	if (lang == TM_PARSER_C || lang == TM_PARSER_CPP)
+	{
+		return sscanf(name, "anon_%*[a-z]_%u%c", &i, &dummy) == 1 ||

Yes on [Linux](https://man7.org/linux/man-pages/man3/scanf.3.html) but IIUC its not portable, especially `a-z` meaning lower case ASCII alphabetic, see [here](https://en.cppreference.com/w/c/io/fscanf)

-- 
Reply to this email directly or view it on GitHub:
https://github.com/geany/geany/pull/3059#discussion_r772325333
You are receiving this because you are subscribed to this thread.

Message ID: <geany/geany/pull/3059/review/836335718 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.geany.org/pipermail/github-comments/attachments/20211220/f1b9858c/attachment.htm>


More information about the Github-comments mailing list