sane(r) command signatures (warning: huge commit)
git-svn-id: svn://svn.code.sf.net/p/actiongame/code/trunk/ac@6908 e016b1c5-ed68-44aa-a2f7-31cac88cffde
This commit is contained in:
+21
-21
@@ -157,13 +157,13 @@ void adddockey(char *alias, char *name, char *desc)
|
||||
k.desc = desc && strlen(desc) ? newstring(desc) : NULL;
|
||||
}
|
||||
|
||||
COMMANDN(docsection, adddocsection, ARG_1STR);
|
||||
COMMANDN(docident, adddocident, ARG_2STR);
|
||||
COMMANDN(docargument, adddocargument, ARG_4STR);
|
||||
COMMANDN(docremark, adddocremark, ARG_1STR);
|
||||
COMMANDN(docref, adddocref, ARG_4STR);
|
||||
COMMANDN(docexample, adddocexample, ARG_2STR);
|
||||
COMMANDN(dockey, adddockey, ARG_3STR);
|
||||
COMMANDN(docsection, adddocsection, "s");
|
||||
COMMANDN(docident, adddocident, "ss");
|
||||
COMMANDN(docargument, adddocargument, "ssss");
|
||||
COMMANDN(docremark, adddocremark, "s");
|
||||
COMMANDN(docref, adddocref, "ssss");
|
||||
COMMANDN(docexample, adddocexample, "ss");
|
||||
COMMANDN(dockey, adddockey, "sss");
|
||||
|
||||
int stringsort(const char **a, const char **b) { return strcmp(*a, *b); }
|
||||
|
||||
@@ -211,10 +211,10 @@ void listundoneidents(vector<const char *> &inames, int allidents)
|
||||
inames.sort(stringsort);
|
||||
}
|
||||
|
||||
void docundone(int allidents)
|
||||
void docundone(int *allidents)
|
||||
{
|
||||
vector<const char *> inames;
|
||||
listundoneidents(inames, allidents);
|
||||
listundoneidents(inames, *allidents);
|
||||
inames.sort(stringsort);
|
||||
loopv(inames) conoutf("%s", inames[i]);
|
||||
}
|
||||
@@ -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[] = "<description>TODO: Description</description>";
|
||||
|
||||
@@ -304,7 +304,7 @@ void docwriteref(int allidents, const char *ref, const char *schemalocation, con
|
||||
f->printf("\t\t\t<identifiers>\n");
|
||||
}
|
||||
|
||||
static const int bases[] = { ARG_1INT, ARG_1STR, ARG_1EXP, ARG_1EXPF, ARG_1EST };
|
||||
static const int bases[] = { "i", "s", "i", "i"F, ARG_1EST };
|
||||
string name;
|
||||
loopv(inames)
|
||||
{
|
||||
@@ -312,10 +312,10 @@ void docwriteref(int allidents, const char *ref, const char *schemalocation, con
|
||||
if(!id || id->type != ID_COMMAND) continue;
|
||||
f->printf("\t\t\t\t<command name=\"%s\">\n", xmlstringenc(name, id->name, MAXSTRLEN));
|
||||
f->printf("\t\t\t\t\t%s\n", desc);
|
||||
if(id->narg != ARG_NONE && id->narg != ARG_DOWN && id->narg != ARG_IVAL && id->narg != ARG_FVAL && id->narg != ARG_SVAL)
|
||||
if(id->narg != "" && id->narg != "d" && id->narg != ARG_IVAL && id->narg != ARG_FVAL && id->narg != ARG_SVAL)
|
||||
{
|
||||
f->printf("\t\t\t\t\t<arguments>\n");
|
||||
if(id->narg == ARG_CONC || id->narg == ARG_CONCW || id->narg == ARG_VARI) f->printf("\t\t\t\t\t\t<variableArgument token=\"...\" description=\"TODO\"/>\n");
|
||||
if(id->narg == "c" || id->narg == "c"W || id->narg == ARG_VARI) f->printf("\t\t\t\t\t\t<variableArgument token=\"...\" description=\"TODO\"/>\n");
|
||||
else
|
||||
{
|
||||
int base = -1;
|
||||
@@ -358,7 +358,7 @@ void docwriteref(int allidents, const char *ref, const char *schemalocation, con
|
||||
}
|
||||
|
||||
if(allidents < 0) f->printf("\t\t\t</identifiers>\n\t\t</section>\n\t</sections>\n</cuberef>\n");
|
||||
delete f;
|
||||
delete f;*/
|
||||
}
|
||||
|
||||
void docwritebaseref(char *ref, char *schemalocation, char *transformation)
|
||||
@@ -366,16 +366,16 @@ void docwritebaseref(char *ref, char *schemalocation, char *transformation)
|
||||
docwriteref(-1, ref, schemalocation, transformation);
|
||||
}
|
||||
|
||||
void docwritetodoref(int allidents)
|
||||
void docwritetodoref(int *allidents)
|
||||
{
|
||||
docwriteref(allidents ? 1 : 0, "", "", "");
|
||||
docwriteref(*allidents ? 1 : 0, "", "", "");
|
||||
}
|
||||
|
||||
COMMAND(docundone, ARG_1INT);
|
||||
COMMAND(docinvalid, ARG_NONE);
|
||||
COMMAND(docfind, ARG_1STR);
|
||||
COMMAND(docwritebaseref, ARG_3STR);
|
||||
COMMAND(docwritetodoref, ARG_1INT);
|
||||
COMMAND(docundone, "i");
|
||||
COMMAND(docinvalid, "");
|
||||
COMMAND(docfind, "s");
|
||||
COMMAND(docwritebaseref, "sss");
|
||||
COMMAND(docwritetodoref, "i");
|
||||
VAR(docvisible, 0, 1, 1);
|
||||
VAR(docskip, 0, 0, 1000);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user