From 73a7fb467ff360a43ca718e99380bc4814f576cd Mon Sep 17 00:00:00 2001 From: Ari Johnson Date: Sat, 12 Jul 2008 19:49:40 +0000 Subject: [PATCH] Miscellaneous code cleanups for C standard compliance (cherry picked from commit 50a2d4024d8fc8c23610d9137d5cc297a67b9625) --- hdrs/division.h | 2 -- src/funtime.c | 12 ++++++------ src/notify.c | 3 +-- src/prog.c | 2 +- src/sql.c | 1 - 5 files changed, 8 insertions(+), 12 deletions(-) diff --git a/hdrs/division.h b/hdrs/division.h index 8d89025..cb9b780 100644 --- a/hdrs/division.h +++ b/hdrs/division.h @@ -200,8 +200,6 @@ typedef struct power_group_t POWERGROUP; thing, is the object receiving the effects of marker powerz */ #define marker_powers(t, m, o) SLEVEL(o) = m ? LEVEL_DIRECTOR : LEVEL_ADMIN ; - // division_powerlevel_set(GOD, o, (t ? (m ? PL_DIRECTOR : PL_ROYALTY) : PL_PLAYER), 1); - /* power over checks {{{1 */ #define POWC(x) int x(int, dbref, dbref) diff --git a/src/funtime.c b/src/funtime.c index 7cac6dc..3c64391 100644 --- a/src/funtime.c +++ b/src/funtime.c @@ -243,31 +243,31 @@ etime_to_secs(char *str1, int *secs) } str2[i] = '\0'; if (!*str1) { - *secs += parse_integer(str2); // no more chars, just add seconds and stop + *secs += parse_integer(str2); /* no more chars, just add seconds and stop */ break; } switch (*str1) { case 'd': case 'D': - *secs += (parse_integer(str2) * 86400); // days + *secs += (parse_integer(str2) * 86400); /* days */ break; case 'h': case 'H': - *secs += (parse_integer(str2) * 3600); // hours + *secs += (parse_integer(str2) * 3600); /* hours */ break; case 'm': case 'M': - *secs += (parse_integer(str2) * 60); // minutes + *secs += (parse_integer(str2) * 60); /* minutes */ break; case 's': case 'S': case ' ': - *secs += parse_integer(str2); // seconds + *secs += parse_integer(str2); /* seconds */ break; default: return 0; } - str1++; // move past the time char + str1++; /* move past the time char */ } return 1; } diff --git a/src/notify.c b/src/notify.c index 56a9e7f..387dab0 100644 --- a/src/notify.c +++ b/src/notify.c @@ -165,8 +165,7 @@ enum na_type { NA_NANSI, /**< ANSI and NOACCENTS */ NA_NCOLOR, /**< ANSI, COLOR, NOACCENTS */ NA_NPUEBLO, /**< html & NOACCENTS */ - NA_NPASCII, /**< NOACCENTS */ -// NA_EVALONCONTACT /**< Evaluate on Contact */ + NA_NPASCII /**< NOACCENTS */ }; /** Number of possible message text renderings */ diff --git a/src/prog.c b/src/prog.c index 65811f6..f47bd1d 100644 --- a/src/prog.c +++ b/src/prog.c @@ -59,6 +59,7 @@ COMMAND(cmd_prog) ATTR *patr; DESC *d; int i, pflags = 0; + char buf[BUFFER_LEN], *bp; if (!arg_left) { notify(player, "Invalid arguments."); @@ -163,7 +164,6 @@ COMMAND(cmd_prog) "WARNING: %s is using bad prompt syntax with @program. Refer to help @prompt.", object_header(Owner(player), player)); - char buf[BUFFER_LEN], *bp; tooref = ooref, ooref = NOTHING; atr_add(target, "XY_PROGPROMPT", t, GOD, NOTHING); ooref = tooref; diff --git a/src/sql.c b/src/sql.c index 8c75e7e..221c712 100644 --- a/src/sql.c +++ b/src/sql.c @@ -547,7 +547,6 @@ query_table: memset(buf, '\0', BUFFER_LEN); strncpy(buf, row_p[3], BUFFER_LEN-1); j = sqllist_check(Contents(SQLCMD_MasterRoom), player, '$', ':', buf, 0); - // j = list_check(Contents(SQLCMD_MasterRoom), player, '$', ':', buf, 0); if(j < 1) { mysql_free_result(qres2); mysql_query(mysql_struct, tprintf("UPDATE query_t SET query=\"-1\", io=0 WHERE id = %d", atoi(row_p[0]) )); -- 2.30.2