Package: geany / 1.37.1-2

20_debian_control_tags.patch Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
Author: Damián Viano <des@debian.org>
Description: Add support for having 'Source:' and 'Package:' as tags in a 
RFC2822 file as debian/control
Index: geany/ctags/parsers/iniconf.c
===================================================================
--- geany.orig/ctags/parsers/iniconf.c	2019-05-08 09:34:36.379950225 +0800
+++ geany/ctags/parsers/iniconf.c	2019-05-13 09:25:32.418735716 +0800
@@ -14,6 +14,7 @@
 #include "general.h"	/* must always come first */
 
 #include <ctype.h>
+#include <string.h>
 
 #include "parse.h"
 #include "read.h"
@@ -73,6 +74,19 @@
 			vStringClear (name);
 			continue;
 		}
+
+		/* look for a stanza */
+		if (*cp != '\0' && (strncmp((const char*) cp, "Source:", 7) == 0 ||
+			strncmp((const char*) cp, "Package:", 8) == 0))
+		{
+			cp = (const unsigned char*) strchr((const char*) cp, ':') + 1;
+			while (isspace ((int) *cp))
+				++cp;
+			vStringCopyS (name, (const char*) cp);
+			makeSimpleTag (name, K_SECTION);
+			vStringClear (name);
+			continue;
+		}
 
 		while (*cp != '\0')
 		{