diff options
author | powwow@askgustav.com <powwow@askgustav.com> | 2019-03-18 23:05:26 (GMT) |
---|---|---|
committer | Steve Slaven <bpk@hoopajoo.net> | 2019-04-23 20:37:05 (GMT) |
commit | 304a722c426f47a461dc88c4493f800c0690b29b (patch) | |
tree | 151b974354c0c7ec4e89649a949db32f11b56442 /map.c | |
parent | 7db984561ef8fd0ff9165288324dbc81516113f0 (diff) | |
download | powwow-304a722c426f47a461dc88c4493f800c0690b29b.zip powwow-304a722c426f47a461dc88c4493f800c0690b29b.tar.gz powwow-304a722c426f47a461dc88c4493f800c0690b29b.tar.bz2 |
remove some non-ANSI C support
Diffstat (limited to 'map.c')
-rw-r--r-- | map.c | 26 |
1 files changed, 13 insertions, 13 deletions
@@ -39,7 +39,7 @@ static int mapend = 0; /* index one past last map entry */ /* * return reverse direction */ -static char reverse_dir __P1 (char,dir) +static char reverse_dir(char dir) { static char dirs[] = "nsewud"; char *p = strchr(dirs, dir); @@ -49,12 +49,12 @@ static char reverse_dir __P1 (char,dir) /* * retrace steps on map, optionally walk them back */ -void map_retrace __P2 (int,steps, int,walk_back) +void map_retrace(int steps, int walk_back) { char cmd[2]; - + cmd[1] = '\0'; - + if (!steps && !walk_back) mapend = mapstart; else { @@ -64,7 +64,7 @@ void map_retrace __P2 (int,steps, int,walk_back) status(1); tty_putc('['); } - + while (mapstart != mapend && steps--) { mapend = MAPINDEX(mapend - 1); if (walk_back) { @@ -82,7 +82,7 @@ void map_retrace __P2 (int,steps, int,walk_back) /* * show automatic map (latest steps) in the form s2ews14n */ -void map_show __P0 (void) +void map_show(void) { char lastdir; int count = 0; @@ -110,13 +110,13 @@ void map_show __P0 (void) tty_printf("%d", count); tty_printf("%c\n", lastdir); - } + } } /* * print map to string in the form seewsnnnnn */ -void map_sprintf __P1 (char *,buf) +void map_sprintf(char *buf) { int i; @@ -129,7 +129,7 @@ void map_sprintf __P1 (char *,buf) /* * add direction to automap */ -void map_add_dir __P1 (char,dir) +void map_add_dir(char dir) { #ifdef NOMAZEMAPPING if (mapend != mapstart && dir == reverse_dir(MAPENTRY(mapend - 1))) { @@ -148,25 +148,25 @@ void map_add_dir __P1 (char,dir) * execute walk if word is valid [speed]walk sequence - * return 1 if walked, 0 if not */ -int map_walk __P3 (char *,word, int,silent, int,maponly) +int map_walk(char *word, int silent, int maponly) { char buf[16]; int n = strlen(word); int is_main = (tcp_fd == tcp_main_fd); - + if (!is_main && !maponly && !opt_speedwalk) return 0; if (!n || (n > 1 && !opt_speedwalk && !maponly) || !strchr("neswud", word[n - 1]) || (int)strspn(word, "neswud0123456789") != n) return 0; - + if (maponly) silent = 1; buf[1] = '\0'; while (*word) { if (!silent) { status(1); tty_putc('['); } - + if (isdigit(*word)) { n = strtol(word, &word, 10); if (!silent) |