]> git.pond.sub.org Git - empserver/commitdiff
include: Factor fnameat.h out of prototypes.h
authorMarkus Armbruster <armbru@pond.sub.org>
Sun, 13 Dec 2015 07:31:16 +0000 (08:31 +0100)
committerMarkus Armbruster <armbru@pond.sub.org>
Sun, 6 Aug 2017 09:22:30 +0000 (11:22 +0200)
Signed-off-by: Markus Armbruster <armbru@pond.sub.org>
include/fnameat.h [new file with mode: 0644]
include/prototypes.h
src/lib/common/conftab.c
src/lib/common/emp_config.c
src/lib/gen/fnameat.c

diff --git a/include/fnameat.h b/include/fnameat.h
new file mode 100644 (file)
index 0000000..5bd91c2
--- /dev/null
@@ -0,0 +1,41 @@
+/*
+ *  Empire - A multi-player, client/server Internet based war game.
+ *  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
+ *  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.
+ *
+ *  ---
+ *
+ *  fnameat.h: Interpret file names relative to a directory
+ *
+ *  Known contributors to this file:
+ *     Markus Armbruster, 2015
+ */
+
+#ifndef FNAMEAT_H
+#define FNAMEAT_H
+
+#include <stdio.h>
+
+extern char *fnameat(const char *, const char *);
+extern FILE *fopenat(const char *, const char *, const char *);
+
+#endif
index 5760a29c423a9335d9bbf0692e05d2e35ebc9691..6fca449d3331f5c97d949b7a04073c5e88265683 100644 (file)
@@ -287,8 +287,7 @@ extern int demandupdatecheck(void);
 /* disassoc.c */
 extern int disassoc(void);
 /* fnameat.c */
 /* disassoc.c */
 extern int disassoc(void);
 /* fnameat.c */
-extern char *fnameat(const char *, const char *);
-extern FILE *fopenat(const char *, const char *, const char *);
+/* in fnameat.h */
 /* fsize.c */
 extern int fsize(int);
 extern int blksize(int);
 /* fsize.c */
 extern int fsize(int);
 extern int blksize(int);
index 9a743d28572b2e8497e825c9ff62285848105d9f..2c5d48e34d1bdce8b5df628263b43f5fad89c3d1 100644 (file)
@@ -35,6 +35,7 @@
 #include <errno.h>
 #include <stdio.h>
 #include "file.h"
 #include <errno.h>
 #include <stdio.h>
 #include "file.h"
+#include "fnameat.h"
 #include "optlist.h"
 #include "prototypes.h"
 #include "xdump.h"
 #include "optlist.h"
 #include "prototypes.h"
 #include "xdump.h"
index ff698ff6a16544583a533f32da49a103b1f0f7aa..d084e3a1ff1907276e371331c37d624aa8bff4a1 100644 (file)
@@ -50,6 +50,7 @@
 #include <string.h>
 #include <unistd.h>
 
 #include <string.h>
 #include <unistd.h>
 
+#include "fnameat.h"
 #include "misc.h"
 #include "optlist.h"
 #include "prototypes.h"
 #include "misc.h"
 #include "optlist.h"
 #include "prototypes.h"
index 181b74ab6906e913218215ce15a9a4f34235331e..d970372c9d8d4e9139bf3edbc22b11b4338213d9 100644 (file)
@@ -33,7 +33,9 @@
 #include <config.h>
 
 #include <errno.h>
 #include <config.h>
 
 #include <errno.h>
-#include "prototypes.h"
+#include <stdlib.h>
+#include <string.h>
+#include "fnameat.h"
 
 static int fname_is_abs(const char *);
 
 
 static int fname_is_abs(const char *);