Update of /cvsroot/monetdb/MonetDB5/src/mal
In directory sc8-pr-cvs16.sourceforge.net:/tmp/cvs-serv14186/src/mal
Modified Files:
Tag: MonetDB_5-4
mal_module.mx
Log Message:
ensure that dumpManualHelp() aka, manual.summary()
produces proper/correct texi, i.e.,
quotes special texi charaters '@', '{', '}'
with '@'
Index: mal_module.mx
===================================================================
RCS file: /cvsroot/monetdb/MonetDB5/src/mal/mal_module.mx,v
retrieving revision 1.66
retrieving revision 1.66.2.1
diff -u -d -r1.66 -r1.66.2.1
--- mal_module.mx 11 Jan 2008 10:41:32 -0000 1.66
+++ mal_module.mx 6 Feb 2008 08:48:30 -0000 1.66.2.1
@@ -695,6 +695,8 @@
Module list[256]; int k, ftop, fnd,top=0;
InstrPtr fcn[5000];
str hlp[5000],msg;
+ str hlp_texi = NULL;
+ size_t hlp_texi_len = 0;
if(s==NULL || f==NULL){
@@ -740,11 +742,41 @@
for(z=0; z<ftop; z++){
stream_printf(f,"@" "item %s.%s\n",
getModuleId(fcn[z]), getFunctionId(fcn[z]));
- if( hlp[z] )
- stream_printf(f,"@" "tab %s\n", hlp[z]);
+ if( hlp[z] ) {
+ str hlp_ = hlp[z];
+ size_t hlp_len = 2*strlen(hlp[z]) + 1;
+ if (hlp_texi == NULL) {
+ hlp_texi = (str) GDKmalloc(hlp_len);
+ hlp_texi_len = hlp_len;
+ } else if (hlp_len > hlp_texi_len) {
+ hlp_texi = (str) GDKrealloc(hlp_texi,
hlp_len);
+ hlp_texi_len = hlp_len;
+ }
+ if (hlp_texi != NULL) {
+ str i = hlp[z];
+ str o = hlp_texi;
+ char c;
+ while ((c = (*i++))) {
+ /* quote special texi
characters with '@' */
+ switch (c) {
+ case '@':
+ case '{':
+ case '}':
+ *o++ = '@';
+ break;
+ }
+ *o++ = c;
+ }
+ *o++ = '\0';
+ hlp_ = hlp_texi;
+ }
+ stream_printf(f,"@" "tab %s\n", hlp_);
+ }
}
}
stream_printf(f,"@end multitable\n");
+ if (hlp_texi != NULL)
+ GDKfree(hlp_texi);
}
@-
Summarize the type resolution table.
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Monetdb-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/monetdb-checkins