]> git.pond.sub.org Git - empserver/blobdiff - src/lib/subs/snxtitem.c
Update copyright notice.
[empserver] / src / lib / subs / snxtitem.c
index e88ff7731e67d6993d0b5d5cc4cc49cf007629ab..4cac3a71566eaacb5357e07a9bfa4d80992e61f2 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *  Empire - A multi-player, client/server Internet based war game.
- *  Copyright (C) 1986-2006, Dave Pare, Jeff Bailey, Thomas Ruschak,
+ *  Copyright (C) 1986-2007, Dave Pare, Jeff Bailey, Thomas Ruschak,
  *                           Ken Stevens, Steve McClure
  *
  *  This program is free software; you can redistribute it and/or modify
@@ -33,6 +33,7 @@
 
 #include <config.h>
 
+#include <ctype.h>
 #include "misc.h"
 #include "player.h"
 #include "xy.h"
@@ -45,6 +46,9 @@
  * can select on NS_ALL, NS_AREA, NS_DIST, and NS_LIST.
  * iterate thru the "condarg" string looking
  * for arguments to compile into the nstr.
+ * Using this function for anything but command arguments is usually
+ * incorrect, because it respects conditionals.  Use the snxtitem_FOO()
+ * instead.
  */
 int
 snxtitem(struct nstr_item *np, int type, char *str)
@@ -192,10 +196,10 @@ snxtitem_all(struct nstr_item *np, int type)
 }
 
 void
-snxtitem_group(struct nstr_item *np, int type, s_char group)
+snxtitem_group(struct nstr_item *np, int type, char group)
 {
     if (group == '~')
-       group = ' ';
+       group = 0;
     memset(np, 0, sizeof(*np));
     np->cur = -1;
     np->sel = NS_GROUP;