Re: [AD] makedocs BUG (CVS 19Mar) |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
Thomas Fjellstrom wrote:
On March 26, 2005 03:45 am, Michal Molhanec wrote:
Thomas Fjellstrom wrote:
MSVC7 is that badly broken?
MSVC is not broken. MSVC is, and always was, ISO C90 compiler, not C99.
(e.g. try gcc -pedantic-errors -c makehtml.c)
I'm pretty sure c89 includes asigning to vars in the decl.
Patch committed, end of discussion.
Index: makehtml.c
===================================================================
RCS file: /cvsroot/alleg/allegro/docs/src/makedoc/makehtml.c,v
retrieving revision 1.37
diff -u -r1.37 makehtml.c
--- makehtml.c 12 Mar 2005 22:28:22 -0000 1.37
+++ makehtml.c 26 Mar 2005 12:24:58 -0000
@@ -1546,6 +1546,8 @@
fprintf(_file, "\n</div>\n\n");
for (f = 0, last_letter = -1; f < num; f++) {
+ char *p, *temp;
+
/* Did we change letter section? */
if (list[f][0] >= 'A' && list[f][0] <= 'z' && list[f][0] !=
last_letter) {
/* Is this the first section or another one? */
@@ -1559,7 +1561,7 @@
}
/* Before writing the string, remove possible short descriptions. */
- char *p, *temp = m_strdup(list[f]);
+ temp = m_strdup(list[f]);
p = strchr(temp, ',');
if (p)
*p = 0;