From: Ron Koenderink Date: Tue, 7 Dec 2004 18:48:27 +0000 (+0000) Subject: (main) [_WIN32]: remove WIN32 flags for the getpid functions and X-Git-Tag: v4.2.19~73 X-Git-Url: http://git.pond.sub.org/?p=empserver;a=commitdiff_plain;h=e9047070c7e3ac32904790b4465e8c37bcaa80f6 (main) [_WIN32]: remove WIN32 flags for the getpid functions and standardize the code. (nullify_objects): Remove unneccesary carriage returns. --- diff --git a/src/server/main.c b/src/server/main.c index e9604a8be..e81226611 100644 --- a/src/server/main.c +++ b/src/server/main.c @@ -48,6 +48,7 @@ #if defined(_WIN32) #include +#include #endif #include "misc.h" @@ -75,9 +76,7 @@ static void loc_NTInit(void); static void loc_NTTerm(void); #endif -#if !defined(_WIN32) static int mainpid = 0; -#endif /* * Debugging? @@ -101,8 +100,8 @@ main(int argc, char **argv) loginit("server"); -#if !defined(_WIN32) mainpid = getpid(); +#if !defined(_WIN32) while ((op = getopt(argc, argv, "D:de:psh")) != EOF) { switch (op) { @@ -134,11 +133,7 @@ main(int argc, char **argv) } logerror("------------------------------------------------------"); -#if !defined(_WIN32) logerror("Empire server (pid %d) started", getpid()); -#else - logerror("Empire server started"); -#endif /* _WIN32 */ #if defined(_WIN32) loc_NTInit(); @@ -397,13 +392,13 @@ nullify_objects(void) dchr[SCT_CAPIT].d_hcms = bigcity_dchr.d_hcms; dchr[SCT_CAPIT].d_name = bigcity_dchr.d_name; } - if (opt_NO_LCMS) - dchr[SCT_LIGHT].d_cost = -1; - if (opt_NO_HCMS) - dchr[SCT_HEAVY].d_cost = -1; - if (opt_NO_OIL) { - dchr[SCT_OIL].d_cost = -1; - dchr[SCT_REFINE].d_cost = -1; + if (opt_NO_LCMS) + dchr[SCT_LIGHT].d_cost = -1; + if (opt_NO_HCMS) + dchr[SCT_HEAVY].d_cost = -1; + if (opt_NO_OIL) { + dchr[SCT_OIL].d_cost = -1; + dchr[SCT_REFINE].d_cost = -1; } for (i = 0; i < pln_maxno; i++) { if (opt_NO_HCMS)