]> git.pond.sub.org Git - empserver/commitdiff
Move declarations for chance.c to new chance.h
authorMarkus Armbruster <armbru@pond.sub.org>
Tue, 14 Aug 2012 16:57:17 +0000 (18:57 +0200)
committerMarkus Armbruster <armbru@pond.sub.org>
Wed, 8 May 2013 04:55:20 +0000 (06:55 +0200)
52 files changed:
include/chance.h [new file with mode: 0644]
include/prototypes.h
src/lib/commands/anti.c
src/lib/commands/assa.c
src/lib/commands/bomb.c
src/lib/commands/buil.c
src/lib/commands/buy.c
src/lib/commands/conv.c
src/lib/commands/enli.c
src/lib/commands/laun.c
src/lib/commands/look.c
src/lib/commands/mfir.c
src/lib/commands/move.c
src/lib/commands/rea.c
src/lib/commands/sabo.c
src/lib/commands/shoo.c
src/lib/commands/sona.c
src/lib/commands/spy.c
src/lib/commands/torp.c
src/lib/commands/trad.c
src/lib/commands/work.c
src/lib/common/btu.c
src/lib/gen/chance.c
src/lib/player/player.c
src/lib/subs/aircombat.c
src/lib/subs/attsub.c
src/lib/subs/damage.c
src/lib/subs/detonate.c
src/lib/subs/landgun.c
src/lib/subs/list.c
src/lib/subs/lndsub.c
src/lib/subs/mission.c
src/lib/subs/move.c
src/lib/subs/mslsub.c
src/lib/subs/nreport.c
src/lib/subs/plnsub.c
src/lib/subs/retreat.c
src/lib/subs/satmap.c
src/lib/subs/shpsub.c
src/lib/subs/supply.c
src/lib/subs/takeover.c
src/lib/update/age.c
src/lib/update/human.c
src/lib/update/land.c
src/lib/update/material.c
src/lib/update/plague.c
src/lib/update/plane.c
src/lib/update/populace.c
src/lib/update/produce.c
src/lib/update/revolt.c
src/lib/update/sect.c
src/lib/update/ship.c

diff --git a/include/chance.h b/include/chance.h
new file mode 100644 (file)
index 0000000..194dcf0
--- /dev/null
@@ -0,0 +1,40 @@
+/*
+ *  Empire - A multi-player, client/server Internet based war game.
+ *  Copyright (C) 1986-2012, Dave Pare, Jeff Bailey, Thomas Ruschak,
+ *                Ken Stevens, Steve McClure, Markus Armbruster
+ *
+ *  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 3 of the License, or
+ *  (at your option) any later version.
+ *
+ *  This program is distributed in the hope that it will be useful,
+ *  but WITHOUT ANY WARRANTY; without even the implied warranty of
+ *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ *  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, see <http://www.gnu.org/licenses/>.
+ *
+ *  ---
+ *
+ *  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.
+ *
+ *  ---
+ *
+ *  chance.h: Roll dice
+ *
+ *  Known contributors to this file:
+ *     Markus Armbruster, 2012
+ */
+
+#ifndef CHANCE_H
+#define CHANCE_H
+
+extern int chance(double);
+extern int roll(int);
+extern int roundavg(double);
+
+#endif
index 7eb82df6156bd75b95c296c4671241bde42cb629..5514d3ab8d26e00c0e901ce9b027f2aa44fe1f1a 100644 (file)
@@ -306,9 +306,6 @@ extern int fsize(int);
 extern int blksize(int);
 extern time_t fdate(int);
 
-extern int roll(int);
-extern int roundavg(double);
-extern int chance(double);
 extern int disassoc(void);
 extern char *effadv(int);
 extern int parse(char *, char *, char **, char **, char **, char **);
index 0da5920939434b6aec55288f574a38364a56b121..174b1dd2ba449814f5480362132ef056020c735e 100644 (file)
@@ -33,6 +33,7 @@
 
 #include <config.h>
 
+#include "chance.h"
 #include "commands.h"
 #include "item.h"
 #include "optlist.h"
index bc794ae7f5f787b7f39f019375acfb25e2ec70c2..1ff036019fb96b0e2c2e360399bf6cdcd6c63e6c 100644 (file)
@@ -33,6 +33,7 @@
 
 #include <config.h>
 
+#include "chance.h"
 #include "combat.h"
 #include "commands.h"
 #include "empobj.h"
index 6ae775b95d2f2c76564878b9076dcd838029a261..9ebd780cb308abb9c8500ae4a236c26103e1230f 100644 (file)
@@ -36,6 +36,7 @@
 #include <config.h>
 
 #include <ctype.h>
+#include "chance.h"
 #include "commands.h"
 #include "damage.h"
 #include "item.h"
index c4c76c1c1699e5ec25f1f7425b21c58bcad54bc8..58bafa322278e79cdcd2a2da5ff2f2c5206834b3 100644 (file)
@@ -34,6 +34,7 @@
 #include <config.h>
 
 #include <limits.h>
+#include "chance.h"
 #include "commands.h"
 #include "game.h"
 #include "land.h"
index 33ab044e872e1053947eb40cc0790306d19a0d89..e7a8ef7057469d425baac69ded89fd8e22e4b735 100644 (file)
@@ -34,6 +34,7 @@
 
 #include <config.h>
 
+#include "chance.h"
 #include "commands.h"
 #include "commodity.h"
 #include "item.h"
index d442e9abbbcb702b4210729c96d26871a8ce9536..e2dfbe8127d8b65b49ca6c7bb1b3d242d93edbbf 100644 (file)
@@ -36,6 +36,7 @@
 
 #include <config.h>
 
+#include "chance.h"
 #include "commands.h"
 #include "land.h"
 
index b60613540391baa589e3d577b047ad13f6fb5324..7986ed52bcae97b79b5110b59239d303e6daba65 100644 (file)
@@ -32,6 +32,7 @@
 
 #include <config.h>
 
+#include "chance.h"
 #include "commands.h"
 #include "treaty.h"
 
index 2cdfb996203bfad52b922f6f0361b73429eecbe9..3078782a1f5663f59797d6ae0f3651e6d53c9482 100644 (file)
@@ -35,6 +35,7 @@
 
 #include <config.h>
 
+#include "chance.h"
 #include "commands.h"
 #include "damage.h"
 #include "mission.h"
index f3b716a519c0e1c4d43d8b804cbfdf76473e138f..d5d2d66834c73b983bc73197a7f05f44a1074f51 100644 (file)
@@ -32,6 +32,7 @@
 
 #include <config.h>
 
+#include "chance.h"
 #include "commands.h"
 #include "empobj.h"
 #include "map.h"
index 31a22d3ac82916345a1243a123f8afef03ffa351..b6c7da2f2814f57a81a6036bff83216b9853d8ac 100644 (file)
@@ -33,6 +33,7 @@
 
 #include <config.h>
 
+#include "chance.h"
 #include "commands.h"
 #include "empobj.h"
 #include "news.h"
index c83de66ec1e04100056cc111cf550a0c419518b9..95f6c885320d199bfc11abe63451f24af5cb0781 100644 (file)
@@ -32,6 +32,7 @@
 
 #include <config.h>
 
+#include "chance.h"
 #include "commands.h"
 #include "item.h"
 #include "map.h"
index 1b927bc1000b6822edd1fb4b1d6c013c392ab0c5..aaf57350691775ced95ce32c3f9366f6e2543955 100644 (file)
@@ -39,6 +39,7 @@
 #include <ctype.h>
 #include <errno.h>
 #include <stdio.h>
+#include "chance.h"
 #include "commands.h"
 #include "match.h"
 #include "misc.h"
index 6af8a1a74702aeb0e53e36f9898145df8abe97b7..44ff4c769e257d1695b6e744f6b6080aa9054620 100644 (file)
@@ -33,6 +33,7 @@
 
 #include <config.h>
 
+#include "chance.h"
 #include "commands.h"
 #include "land.h"
 
index 0414895327b69ca15917a563b407d3251a977422..3261a9827d8f29ae987c35f3cc2b6ffa590ba44a 100644 (file)
@@ -32,6 +32,7 @@
 
 #include <config.h>
 
+#include "chance.h"
 #include "commands.h"
 #include "item.h"
 #include "land.h"
index 6206577ebef36c0fef9f25b0fc1ddf7f6a3b47cc..0f27f300bc621b8c45311644926e07dbd485c3e2 100644 (file)
@@ -33,6 +33,7 @@
 
 #include <config.h>
 
+#include "chance.h"
 #include "commands.h"
 #include "map.h"
 #include "optlist.h"
index f97830104b9624e6def1f3d0f2a061666763f10e..60505d50272347a1b9e15e55a3409770910f93f5 100644 (file)
@@ -34,6 +34,7 @@
 
 #include <config.h>
 
+#include "chance.h"
 #include "commands.h"
 #include "item.h"
 #include "land.h"
index 1cdd7ba68a113ce6084f4672c054b0d17673d4db..cddf1c4633369d82897cc3cfd3cee359158de8cc 100644 (file)
@@ -36,6 +36,7 @@
 
 #include <config.h>
 
+#include "chance.h"
 #include "commands.h"
 #include "news.h"
 #include "retreat.h"
index a524b65f8fccfa50dbf35c0b7165249bf642d93f..ed5879629fbb0cd8bbbac88837194b40d377ed06 100644 (file)
@@ -35,6 +35,7 @@
 #include <config.h>
 
 #include <ctype.h>
+#include "chance.h"
 #include "commands.h"
 #include "commodity.h"
 #include "empobj.h"
index ddf6c6c026d723f4012122d7c8ddc976d63a6bc9..8675b64a2e7c427ebf886b79ba719758d3cb0120 100644 (file)
@@ -32,6 +32,7 @@
 
 #include <config.h>
 
+#include "chance.h"
 #include "commands.h"
 #include "land.h"
 #include "optlist.h"
index 4c23c1529b38886d43e41f1b577a5bae10d5f12e..d3796b6969495ca3c4d335baf1c7e87955caedd7 100644 (file)
 
 #include <config.h>
 
+#include "chance.h"
 #include "file.h"
 #include "nat.h"
 #include "optlist.h"
-#include "prototypes.h"
 #include "sect.h"
 
 /*
index 535f4f341ba17509201206d43135a55278cf85b5..284680b1bb946ff1f8ae9f4e09ab1bd30945b234 100644 (file)
@@ -33,7 +33,8 @@
 #include <config.h>
 
 #include <math.h>
-#include "prototypes.h"
+#include <stdlib.h>
+#include "chance.h"
 
 int
 chance(double d)
index b68622f8cba6f8504230d6b2abac9c5b1d5bc5be..5f2719ed13628ccc9401f60c2758eb92997ff714 100644 (file)
@@ -34,6 +34,7 @@
 
 #include <config.h>
 
+#include "chance.h"
 #include "empio.h"
 #include "empthread.h"
 #include "file.h"
index 7d4773190b6fa341140246049200ff4448370369..abc351536ca5d5c042b08e860fb95277e08349ab 100644 (file)
@@ -35,6 +35,7 @@
 
 #include <config.h>
 
+#include "chance.h"
 #include "file.h"
 #include "land.h"
 #include "map.h"
index 5f3bbe71b88b758cd3c34067eda341e6578cc810..292c71f754ca22ba75493947f1f293626bb80274 100644 (file)
@@ -36,6 +36,7 @@
 
 #include <ctype.h>
 #include <math.h>
+#include "chance.h"
 #include "combat.h"
 #include "empobj.h"
 #include "file.h"
index 43d424891a71b5448b8e551581f4f9f0e0e91fe2..4c0f8f9c1a530e488b0904d7e295c436f7ba6059 100644 (file)
@@ -33,6 +33,7 @@
 
 #include <config.h>
 
+#include "chance.h"
 #include "damage.h"
 #include "land.h"
 #include "misc.h"
index a60923ad31e8de3ba397b4e9495740768641a584..4204d2629e2f32d7058020f9b74a80ff044d52cd 100644 (file)
@@ -33,6 +33,7 @@
 
 #include <config.h>
 
+#include "chance.h"
 #include "file.h"
 #include "land.h"
 #include "map.h"
index 14ebcdf94d17e85bb69bd499809edaa46f9fb8ad..fc6f3607935ae71fced7690e4acd9fddea404369 100644 (file)
@@ -32,6 +32,7 @@
 
 #include <config.h>
 
+#include "chance.h"
 #include "damage.h"
 #include "file.h"
 #include "land.h"
index fd6366ecf139788c82322e964d53f9c3d6e41e92..32f1997e180ff37082c03165466a421291df64d4 100644 (file)
@@ -33,6 +33,7 @@
 #include <config.h>
 
 #include <ctype.h>
+#include "chance.h"
 #include "file.h"
 #include "land.h"
 #include "misc.h"
index a4bc04ac2482db77a1a938d1b6a2d23b630aa443..8c4f6c3f2b443484e0f5de984f3173501650e9fc 100644 (file)
@@ -36,6 +36,7 @@
 
 #include <math.h>
 #include <stdlib.h>
+#include "chance.h"
 #include "combat.h"
 #include "damage.h"
 #include "empobj.h"
index 04685dd0421b20d8b67793669e6b342e5387a58a..08debd42a30b0c55f0270219092d205303535267 100644 (file)
@@ -35,6 +35,7 @@
 #include <config.h>
 
 #include <stdlib.h>
+#include "chance.h"
 #include "empobj.h"
 #include "file.h"
 #include "item.h"
index ac06d7d2cfe9d4d3e8bbe084df6ff2a5401f8e3a..61fd3a4102d51e5555336ac9cd17022bc0e450e0 100644 (file)
@@ -33,6 +33,7 @@
 #include <config.h>
 
 #include <ctype.h>
+#include "chance.h"
 #include "damage.h"
 #include "file.h"
 #include "map.h"
index a8a5ddecbeff4970b50f2a46a41be4132490405f..f2aaf01c7ea94d4d6b5d65725d3b591a2dee4986 100644 (file)
@@ -35,6 +35,7 @@
 #include <config.h>
 
 #include <stdlib.h>
+#include "chance.h"
 #include "file.h"
 #include "misc.h"
 #include "nat.h"
index c6797b880333069175e66c16fcdda6964428cc46..b1020b756c4c20ec0a94839960734a70f544ded9 100644 (file)
@@ -35,6 +35,7 @@
 
 #include <config.h>
 
+#include "chance.h"
 #include "file.h"
 #include "nat.h"
 #include "news.h"
index f0ce33349087e606a5185f62b23ae39fbb778c95..b0a4bd3b666598728102660f66602fd3e98e56ef 100644 (file)
@@ -35,6 +35,7 @@
 
 #include <config.h>
 
+#include "chance.h"
 #include "empobj.h"
 #include "file.h"
 #include "item.h"
index ce210bc73c72a9336f9fd2096607b37ab2da0eb8..c62aca55c0659eb9599b9ea0b949d55ce17874d0 100644 (file)
@@ -32,6 +32,7 @@
 
 #include <config.h>
 
+#include "chance.h"
 #include "damage.h"
 #include "file.h"
 #include "land.h"
index 58512a45d6ee5a7b9c3ca5246fb930ed16206687..e016e54d3fa6531bc940c5d0548a4a16be26a6fc 100644 (file)
@@ -34,6 +34,7 @@
 #include <config.h>
 
 #include <stdlib.h>
+#include "chance.h"
 #include "file.h"
 #include "land.h"
 #include "map.h"
index e7963f7326ed95d6190bac9ae0e62037d05cf093..364e54870c40cf0813ff57852020b1db46e393a7 100644 (file)
@@ -35,6 +35,7 @@
 #include <config.h>
 
 #include <stdlib.h>
+#include "chance.h"
 #include "damage.h"
 #include "empobj.h"
 #include "file.h"
index 398096ea093c96fb26ed2f1c394cab519f23286b..ff084dc2d939aef2a4ebda52964172e3eeaddbd8 100644 (file)
@@ -33,6 +33,7 @@
 #include <config.h>
 
 #include <math.h>
+#include "chance.h"
 #include "empobj.h"
 #include "file.h"
 #include "land.h"
index e754c40b1e337d6bdc7f09f47b536dce3ae36635..3a2ec8ead682e67a81cdeb653ca822cee280cf18 100644 (file)
@@ -34,6 +34,7 @@
 
 #include <config.h>
 
+#include "chance.h"
 #include "file.h"
 #include "empobj.h"
 #include "game.h"
index 1ee6f48e2f3b68d4ad915c0cb3ec1e6f4830a114..4f572a73c4de6bd264bea675a2c2cb1bdac3ce50 100644 (file)
@@ -32,6 +32,7 @@
 
 #include <config.h>
 
+#include "chance.h"
 #include "update.h"
 
 int
index f5f4905b9ee86728388d4e19997c9537f96dc52f..56d0a8fd6910f524e253eeb8a01bc0e21c5a4707 100644 (file)
@@ -35,6 +35,7 @@
 #include <config.h>
 
 #include <math.h>
+#include "chance.h"
 #include "item.h"
 #include "news.h"
 #include "player.h"
index 27c0ff10cadc4b4b11ee0917ce55c280825eb8c0..8b8a783fd4cf7074193148f63e52562ec8afbb59 100644 (file)
@@ -37,6 +37,7 @@
 
 #include <math.h>
 #include "budg.h"
+#include "chance.h"
 #include "land.h"
 #include "lost.h"
 #include "news.h"
index 024c36fe36809596bf96d88497e74557706b8c6a..f44879962d4d2e1dde251d5bc75eaf46ada2102d 100644 (file)
@@ -34,6 +34,7 @@
 #include <config.h>
 
 #include "budg.h"
+#include "chance.h"
 #include "player.h"
 #include "update.h"
 
index d2c3a6220691c52decc4a878eb89be0b2865fb57..0cfbfe3716ccc0dc009ad2f5735e87fd0767b8b7 100644 (file)
@@ -32,6 +32,7 @@
 
 #include <config.h>
 
+#include "chance.h"
 #include "item.h"
 #include "lost.h"
 #include "news.h"
index d6ae289402bd97cff7e81a10d76cb50d6479e628..e5be2988e380a784f1ca96ef654a428eb3a89638 100644 (file)
@@ -35,6 +35,7 @@
 #include <config.h>
 
 #include "budg.h"
+#include "chance.h"
 #include "lost.h"
 #include "plane.h"
 #include "player.h"
index 57a948e7fdffa0d42b28733eaa6e02af5be48a68..e87da3ce8bc7521e6b45cd4841456b0326d9deb4 100644 (file)
@@ -32,6 +32,7 @@
 
 #include <config.h>
 
+#include "chance.h"
 #include "lost.h"
 #include "update.h"
 
index e88bb3f8f66047237583767841e3caced3cbcedd..f0dec1ed5579c5eb24d37d694790bf7b21a419d8 100644 (file)
@@ -33,6 +33,7 @@
 #include <config.h>
 
 #include "budg.h"
+#include "chance.h"
 #include "player.h"
 #include "product.h"
 #include "update.h"
index f93c783e53b87838eeca6608603fe648416eed5e..4818f1d94b4a9d76763e2998dc16b950c78d8f32 100644 (file)
@@ -34,6 +34,7 @@
 
 #include <config.h>
 
+#include "chance.h"
 #include "land.h"
 #include "lost.h"
 #include "news.h"
index 2723c8c61e8b249c34dc2c4d6f1e82e6b68aa836..99310647d49655fd4cfe2579760537003c3b8577 100644 (file)
@@ -35,6 +35,7 @@
 #include <config.h>
 
 #include "budg.h"
+#include "chance.h"
 #include "item.h"
 #include "land.h"
 #include "lost.h"
index 876be4f966f68b2ee62f40582017aee49d330ec4..e28c8c2f9af915c7db8d66dc987e542607000a01 100644 (file)
@@ -37,6 +37,7 @@
 
 #include <math.h>
 #include "budg.h"
+#include "chance.h"
 #include "land.h"
 #include "lost.h"
 #include "news.h"