From d335f003b9b5abe0e030be6090123192a595d9f2 Mon Sep 17 00:00:00 2001 From: sireus Date: Sat, 6 Oct 2012 23:18:20 +0000 Subject: [PATCH] restored docwriteref functionality git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6910 e016b1c5-ed68-44aa-a2f7-31cac88cffde --- source/src/docs.cpp | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-) diff --git a/source/src/docs.cpp b/source/src/docs.cpp index 4d4b4735..abbfd748 100644 --- a/source/src/docs.cpp +++ b/source/src/docs.cpp @@ -283,7 +283,7 @@ char *xmlstringenc(char *d, const char *s, size_t len) void docwriteref(int allidents, const char *ref, const char *schemalocation, const char *transformation) { - /*stream *f = openfile(path(allidents < 0 ? "docs/autogenerated_base_reference.xml" : "docs/autogenerated_todo_reference.xml", true), "w"); + stream *f = openfile(path(allidents < 0 ? "docs/autogenerated_base_reference.xml" : "docs/autogenerated_todo_reference.xml", true), "w"); if(!f) return; char desc[] = "TODO: Description"; @@ -304,7 +304,6 @@ void docwriteref(int allidents, const char *ref, const char *schemalocation, con f->printf("\t\t\t\n"); } - static const int bases[] = { "i", "s", "i", "i"F, ARG_1EST }; string name; loopv(inames) { @@ -312,18 +311,12 @@ void docwriteref(int allidents, const char *ref, const char *schemalocation, con if(!id || id->type != ID_COMMAND) continue; f->printf("\t\t\t\t\n", xmlstringenc(name, id->name, MAXSTRLEN)); f->printf("\t\t\t\t\t%s\n", desc); - if(id->narg != "" && id->narg != "d" && id->narg != ARG_IVAL && id->narg != ARG_FVAL && id->narg != ARG_SVAL) + if(id->sig && id->sig[0]) { f->printf("\t\t\t\t\t\n"); - if(id->narg == "c" || id->narg == "c"W || id->narg == ARG_VARI) f->printf("\t\t\t\t\t\t\n"); - else + loopi(strlen(id->sig)) { - int base = -1; - loopj(sizeof(bases)/sizeof(bases[0])) - { - if(id->narg < bases[j]) { if(j) base = bases[j-1]; break; } - } - if(base >= 0) loopj(id->narg-base+1) f->printf("\t\t\t\t\t\t\n", (char)(*"A")+j); + f->printf("\t\t\t\t\t\t\n", id->sig[i]); } f->printf("\t\t\t\t\t\n"); } @@ -358,7 +351,7 @@ void docwriteref(int allidents, const char *ref, const char *schemalocation, con } if(allidents < 0) f->printf("\t\t\t\n\t\t\n\t\n\n"); - delete f;*/ + delete f; } void docwritebaseref(char *ref, char *schemalocation, char *transformation)