Mercurial > hg > batmud > maputils
changeset 268:651b9bafd198
Some cleanups.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Tue, 05 Jun 2007 11:59:25 +0000 |
parents | aa85d87d7b75 |
children | 0a2be000bf66 |
files | mkbcmap.c |
diffstat | 1 files changed, 7 insertions(+), 11 deletions(-) [+] |
line wrap: on
line diff
--- a/mkbcmap.c Tue Jun 05 11:59:13 2007 +0000 +++ b/mkbcmap.c Tue Jun 05 11:59:25 2007 +0000 @@ -39,10 +39,9 @@ { int i; - for (i = 0; i < nlocations; i++) { - if (locations[i].c == c) - return i; - } + for (i = 0; i < nlocations; i++) + if (locations[i].c == c) + return i; return -1; } @@ -51,7 +50,6 @@ int getColor(int c) { int i; - if (c >= '0' && c <= '9') i = (c - '0' + 1); else if (c >= 'A' && c <= 'Z') @@ -62,10 +60,11 @@ i = col_yellow; else i = -1; - + return i; } + void putEnd(FILE *f, int c, int p) { int i, l; @@ -102,10 +101,7 @@ break; default: - i = getColor(c); - if (i < 0) - i = col_white; - + i = col_light_red; l = getLoc(c); if (l >= 0 && locations[l].desc) isURL = TRUE; @@ -241,7 +237,7 @@ "<table width=\"100%%\">\n" " <tr>\n" " <td valign=\"top\">\n" - " <pre>\n", + " <pre>", mapTitle );