Re: Universal Ctags langmap

Jason Hood <[email protected]>
Newsgroups gmane.comp.gnu.global.bugs
Message-ID <[email protected]>
> I believe I have fixed the bug.

Confirmed.  Just a little patch to avoid requiring C99 and fix a typo.

-- 
Jason.

_______________________________________________
Bug-global mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/bug-global
patch-langmap1 (text/plain, 1 KB)
diff -urp global-6.5.3/libutil/langmap.c global-6.5-3/libutil/langmap.c
--- global-6.5.3/libutil/langmap.c	2016-03-24 16:28:09 +1000
+++ global-6.5-3/libutil/langmap.c	2016-03-24 16:16:43 +1000
@@ -141,6 +141,7 @@ trim_langmap(const char *map)
 	VARRAY *vb = varray_open(sizeof(SUFFIX), 32);
 	int index = 0;
 	SUFFIX *ent = NULL;
+	int i;
 
 	strbuf_clear(sb);
 	while (*p) {
@@ -163,10 +164,10 @@ trim_langmap(const char *map)
 		if (strbuf_getlen(list) == 0)
 			continue;
 		/*
-		 * examin whether it appeared already.
+		 * examine whether it appeared already.
 		 */
 		ent = NULL;
-		for (int i = 0; i < vb->length; i++) {
+		for (i = 0; i < vb->length; i++) {
 			SUFFIX *ent0 = varray_assign(vb, i, 0);
 			if (!strcmp(ent0->name, strbuf_value(name))) {
 				ent = ent0;
@@ -185,7 +186,7 @@ trim_langmap(const char *map)
 			strcat(ent->list, strbuf_value(list));
 		}
 	}
-	for (int i = 0; i < vb->length; i++) {
+	for (i = 0; i < vb->length; i++) {
 		ent = varray_assign(vb, i, 0);
 		if (i > 0)
 			strbuf_putc(sb, ',');
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.