]> git.pond.sub.org Git - empserver/blobdiff - include/com.h
info/Empire4.4: Improve a few change log entries
[empserver] / include / com.h
index 8132597e8c92e25bf418c23badfe92a6fe53d193..724b3cb3f7e51bb89ba29f2ac33677bb039b47ac 100644 (file)
@@ -1,11 +1,11 @@
 /*
  *  Empire - A multi-player, client/server Internet based war game.
- *  Copyright (C) 1986-2004, Dave Pare, Jeff Bailey, Thomas Ruschak,
- *                           Ken Stevens, Steve McClure
+ *  Copyright (C) 1986-2021, Dave Pare, Jeff Bailey, Thomas Ruschak,
+ *                Ken Stevens, Steve McClure, Markus Armbruster
  *
- *  This program is free software; you can redistribute it and/or modify
+ *  Empire is free software: you can redistribute it and/or modify
  *  it under the terms of the GNU General Public License as published by
- *  the Free Software Foundation; either version 2 of the License, or
+ *  the Free Software Foundation, either version 3 of the License, or
  *  (at your option) any later version.
  *
  *  This program is distributed in the hope that it will be useful,
  *  GNU General Public License for more details.
  *
  *  You should have received a copy of the GNU General Public License
- *  along with this program; if not, write to the Free Software
- *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  *  ---
  *
- *  See the "LEGAL", "LICENSE", "CREDITS" and "README" files for all the
- *  related information and legal notices. It is expected that any future
- *  projects/authors will amend these files as needed.
+ *  See files README, COPYING and CREDITS in the root of the source
+ *  tree for related information and legal notices.  It is expected
+ *  that future projects/authors will amend these files as needed.
  *
  *  ---
  *
  *  com.h: Definitions used to parse Empire commands
- * 
+ *
  *  Known contributors to this file:
- *  
+ *
  */
 
-#ifndef _COM_H_
-#define _COM_H_
+#ifndef COM_H
+#define COM_H
 
 struct cmndstr {
-    s_char *c_form;            /* prototype of command */
-    int c_cost;                        /* btu cost of command */
+    char *c_form;              /* prototype of command */
+    int c_cost;                        /* BTU cost of command */
     int (*c_addr)(void);       /* core addr of appropriate routine */
-    int c_flags;
-    int c_permit;              /* who is allowed to "do" this command */
+    int c_flags;               /* command flags */
+    int c_permit;              /* command capabilities required */
 };
 
-#define C_MOD          0x1     /* modifies database */
+/* Command flag bits */
+enum {
+    /*
+     * Command modifies database.
+     * This also prevents print functions from blocking.  In fact,
+     * that's the effective meaning of this flag.  Nothing stops a
+     * command without C_MOD modifying whatever it wants.
+     */
+    C_MOD = 1
+};
 
 /* variables associated with this stuff */
 
 extern struct cmndstr player_coms[];
 
-#endif /* _COM_H_ */
+#endif