/*
* Empire - A multi-player, client/server Internet based war game.
- * Copyright (C) 1986-2012, Dave Pare, Jeff Bailey, Thomas Ruschak,
+ * Copyright (C) 1986-2020, 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 "file.h"
#include "optlist.h"
#include "path.h"
#include "player.h"
}
/*
- * Map direction DIR to a direction index DIR_STOP..DIR_LAST.
- * DIR must be a valid direction.
+ * Map direction @dir to a direction index DIR_STOP..DIR_LAST.
+ * @dir must be a valid direction.
*/
int
diridx(char dir)
break;
}
if (dir == DIR_STOP) {
- p[1] = 0;
+ *p = 0;
return buf;
}
++p;
strcpy(p, bp);
if (*bp)
goto more;
- return buf;
+ return buf[0] ? buf : NULL;
}
/*