]> git.pond.sub.org Git - empserver/blobdiff - include/news.h
Fix trailing whitespace
[empserver] / include / news.h
index 2ad1df3b6b71fe7912d10108601175e7b5b397d4..9e5e2a3d3e808a3e24553fe988bc362c6ac8a63f 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-2008, Dave Pare, Jeff Bailey, Thomas Ruschak,
  *                           Ken Stevens, Steve McClure
  *
  *  This program is free software; you can redistribute it and/or modify
@@ -26,7 +26,7 @@
  *  ---
  *
  *  news.h: Definitions for Empire News
- * 
+ *
  *  Known contributors to this file:
  *     Dave Pare
  *     Thomas Ruschak
 #ifndef NEWS_H
 #define NEWS_H
 
+#include <time.h>
 #include "nsc.h"
 
 struct nwsstr {
+    /* initial part must match struct empobj */
     short ef_type;
+    short nws_uid;
+    unsigned nws_seqno;
+    time_t nws_timestamp;
+    /* end of part matching struct empobj */
     natid nws_ano;             /* "actor" country # */
-    short nws_uid;             /* unused */
-    signed char nws_vrb;       /* action (verb) */
+    unsigned char nws_vrb;     /* action (verb) */
     natid nws_vno;             /* "victim" country # */
     signed char nws_ntm;       /* number of times */
     time_t nws_when;           /* time of action */
@@ -161,12 +166,9 @@ struct rptstr {
 #define N_TELE          11
 #define        N_MAX_PAGE      11
 
-#define getnews(n, p) \
-       ef_read(EF_NEWS, n, p)
-#define putnews(n, p) \
-       ef_write(EF_NEWS, n, p)
-#define getnewsp(n) \
-       (struct nwsstr *) ef_ptr(EF_NEWS, n)
+#define getnews(n, p) ef_read(EF_NEWS, (n), (p))
+#define putnews(n, p) ef_write(EF_NEWS, (n), (p))
+#define getnewsp(n) ((struct nwsstr *)ef_ptr(EF_NEWS, (n)))
 
 extern struct rptstr rpt[N_MAX_VERB + 2];
 extern struct symbol page_headings[N_MAX_PAGE + 2];