]> git.pond.sub.org Git - empserver/blobdiff - src/util/files.c
Update copyright notice
[empserver] / src / util / files.c
index 20481dd149ab4f86523d06db732e76934a31ec14..ca6d0c69cf9cde496502040aee4c429588286db0 100644 (file)
@@ -1,6 +1,6 @@
 /*
  *  Empire - A multi-player, client/server Internet based war game.
- *  Copyright (C) 1986-2011, Dave Pare, Jeff Bailey, Thomas Ruschak,
+ *  Copyright (C) 1986-2015, Dave Pare, Jeff Bailey, Thomas Ruschak,
  *                Ken Stevens, Steve McClure, Markus Armbruster
  *
  *  Empire is free software: you can redistribute it and/or modify
 #include <config.h>
 
 #include <errno.h>
-#include <fcntl.h>
 #include <sys/stat.h>
 #include <unistd.h>
 #include "file.h"
-#include "game.h"
-#include "land.h"
-#include "misc.h"
 #include "nat.h"
-#include "nuke.h"
 #include "optlist.h"
-#include "plane.h"
-#include "power.h"
 #include "prototypes.h"
-#include "sect.h"
-#include "ship.h"
 #include "tel.h"
-#include "trade.h"
 #include "version.h"
 
 static void
@@ -71,7 +61,6 @@ int
 main(int argc, char *argv[])
 {
     char buf[255];
-    char *filename;
     struct natstr nat;
     int i;
     int opt;
@@ -141,14 +130,13 @@ main(int argc, char *argv[])
        exit(1);
     }
     for (i = 0; i < MAXNOC; i++) {
-       filename = mailbox(buf, i);
-       close(creat(filename, S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP));
+       if (mailbox_create(mailbox(buf, i)) < 0)
+           exit(1);
     }
-    close(creat(annfil, S_IRUSR | S_IWUSR | S_IRGRP | S_IWGRP));
+    if (mailbox_create(annfil) < 0)
+       exit(1);
 
     nat_reset(&nat, 0, "POGO", "peter", STAT_GOD);
-    nat.nat_btu = 255;
-    nat.nat_money = 123456789;
     putnat(&nat);
     printf("All praise to %s!\n", nat.nat_cnam);