From: Markus Armbruster Date: Sat, 2 Feb 2008 20:52:01 +0000 (+0100) Subject: Get rid of src/lib/gen/copy.c X-Git-Tag: v4.3.12~195 X-Git-Url: http://git.pond.sub.org/?p=empserver;a=commitdiff_plain;h=1cbb37d4fb45d5cf4f9c36b3384744b04b4634cb Get rid of src/lib/gen/copy.c The function that gave its name to this file is long gone, the file's description is bogus, and it contains just one definition. Move that to ../subs/border.c, and delete the file. --- diff --git a/include/map.h b/include/map.h index 9550c940b..8b3ce398f 100644 --- a/include/map.h +++ b/include/map.h @@ -38,12 +38,12 @@ #define MAPWIDTH(persec) ((WORLD_X/2) * ((persec) + 1) + 1) -extern void blankfill(char *, struct range *, int); /* src/lib/subs/bigmap.c */ extern int map_set(natid, coord, coord, char, int); extern void writebmap(natid); extern void writemap(natid); /* src/lib/subs/border.c */ +extern void blankfill(char *, struct range *, int); extern void border(struct range *, char *, char *); #define MAP_PLANE bit(0) /* this order must match */ diff --git a/src/lib/gen/copy.c b/src/lib/gen/copy.c deleted file mode 100644 index 267df8657..000000000 --- a/src/lib/gen/copy.c +++ /dev/null @@ -1,60 +0,0 @@ -/* - * Empire - A multi-player, client/server Internet based war game. - * Copyright (C) 1986-2008, Dave Pare, Jeff Bailey, Thomas Ruschak, - * Ken Stevens, Steve McClure - * - * This program 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 - * (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, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - * - * --- - * - * 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. - * - * --- - * - * copy.c: Copy and return pointer to end of copied string. - * - * Known contributors to this file: - * - */ - -#include - -#include "map.h" -#include "misc.h" -#include "optlist.h" -#include "xy.h" - -/* - * space-fill a map or radar scan; - * null terminate - */ -void -blankfill(char *ptr, struct range *range, int size) -{ - char *p; - int row; - int col; - - for (row = 0; row < range->height; row++) { - col = (range->width + 1) * (size + 1) / 2 - 1; - p = ptr; - while (--col >= 0) - *p++ = ' '; - *p++ = 0; - ptr += MAPWIDTH(size); - } -} diff --git a/src/lib/subs/border.c b/src/lib/subs/border.c index 8441595df..34f32e8ee 100644 --- a/src/lib/subs/border.c +++ b/src/lib/subs/border.c @@ -38,6 +38,27 @@ #include "prototypes.h" #include "xy.h" +/* + * space-fill a map or radar scan; + * null terminate + */ +void +blankfill(char *ptr, struct range *range, int size) +{ + char *p; + int row; + int col; + + for (row = 0; row < range->height; row++) { + col = (range->width + 1) * (size + 1) / 2 - 1; + p = ptr; + while (--col >= 0) + *p++ = ' '; + *p++ = 0; + ptr += MAPWIDTH(size); + } +} + void border(struct range *rp, char *prefstr, char *sep)