(main) [_WIN32]: remove WIN32 flags for the getpid functions and
standardize the code. (nullify_objects): Remove unneccesary carriage returns.
This commit is contained in:
parent
098f7202b1
commit
e9047070c7
1 changed files with 9 additions and 14 deletions
|
@ -48,6 +48,7 @@
|
|||
|
||||
#if defined(_WIN32)
|
||||
#include <winsock.h>
|
||||
#include <process.h>
|
||||
#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)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue