aboutsummaryrefslogtreecommitdiff
path: root/fns.h
diff options
context:
space:
mode:
authorrodri <rgl@antares-labs.eu>2023-09-21 16:49:11 +0000
committerrodri <rgl@antares-labs.eu>2023-09-21 16:49:11 +0000
commit497acdd8860d629ba24ed9976fd47eeb743b74ab (patch)
tree7e8db0be276527ccc0b3d173290655653c8cdd64 /fns.h
parent33de2d046acfc7ee42fb71b1804b091f671b098a (diff)
downloadbattleship-497acdd8860d629ba24ed9976fd47eeb743b74ab.tar.gz
battleship-497acdd8860d629ba24ed9976fd47eeb743b74ab.tar.bz2
battleship-497acdd8860d629ba24ed9976fd47eeb743b74ab.zip
add parsecmd to the server.
modified it to allow for commands with the same name but different nargs. now each match list entry is preceded by an 'm', to simplify its processing. note that this breaks the client. the next commit will fix that.
Diffstat (limited to 'fns.h')
-rw-r--r--fns.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/fns.h b/fns.h
index 4e5656f..5940cb0 100644
--- a/fns.h
+++ b/fns.h
@@ -22,9 +22,16 @@ int shiplen(int);
char *shipname(int);
char *statename(int);
int max(int, int);
+int min(int, int);
/*
* menulist
*/
Menulist *newmenulist(int, char*);
void delmenulist(Menulist*);
+
+/*
+ * parse
+ */
+Cmdbuf *parsecmd(char*, int);
+Cmdtab *lookupcmd(Cmdbuf*, Cmdtab*, int);