]> git.pond.sub.org Git - empserver/blobdiff - src/lib/gen/fnameat.c
Merge branch 'readline'
[empserver] / src / lib / gen / fnameat.c
index 8ddebcf4e1dbb23694706ccd8531a4c4af2d5afa..5a44bb25fea2251fab45f481341124255f139646 100644 (file)
@@ -1,11 +1,11 @@
 /*
  *  Empire - A multi-player, client/server Internet based war game.
- *  Copyright (C) 1986-2008, Dave Pare, Jeff Bailey, Thomas Ruschak,
- *                           Ken Stevens, Steve McClure
+ *  Copyright (C) 1986-2016, Dave Pare, Jeff Bailey, Thomas Ruschak,
+ *                Ken Stevens, Steve McClure, Markus Armbruster
  *
- *  This program is free software; you can redistribute it and/or modify
+ *  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 2 of the License, or
+ *  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,
@@ -14,8 +14,7 @@
  *  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, write to the Free Software
- *  Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
+ *  along with this program.  If not, see <http://www.gnu.org/licenses/>.
  *
  *  ---
  *
 #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 *);
 
 /*
- * Interpret FNAME relative to directory DIR.
- * Return FNAME if it is absolute, or DIR is null or empty.
- * Else return a malloc'ed string containing DIR/FNAME, or null
+ * Interpret @fname relative to directory @dir.
+ * Return @fname if it is absolute, or @dir is null or empty.
+ * Else return a malloc'ed string containing @dir/@fname, or null
  * pointer when that fails.
  */
 char *
@@ -74,8 +75,8 @@ fname_is_abs(const char *fname)
 
 /*
  * Open a stream like fopen(), optionally relative to a directory.
- * This is exactly like fopen(), except FNAME is interpreted relative
- * to DIR if that is neither null nor empty.
+ * This is exactly like fopen(), except @fname is interpreted relative
+ * to @dir if that is neither null nor empty.
  */
 FILE *
 fopenat(const char *fname, const char *mode, const char *dir)