more pointer style consistency

This commit is contained in:
nhmall
2024-02-20 13:04:32 -05:00
parent d5f2b681af
commit b4f578495c
10 changed files with 43 additions and 43 deletions

View File

@@ -1821,9 +1821,9 @@ dopay(void)
*/
static int
dopayobj(
struct monst* shkp,
struct bill_x* bp,
struct obj** obj_p,
struct monst *shkp,
struct bill_x *bp,
struct obj **obj_p,
int which /* 0 => used-up item, 1 => other (unpaid or lost) */,
boolean itemize)
@@ -2328,8 +2328,8 @@ oid_price_adjustment(struct obj *obj, unsigned int oid)
/* calculate the value that the shk will charge for [one of] an object */
static long
get_cost(
struct obj* obj,
struct monst* shkp) /* if angry, impose a surcharge */
struct obj *obj,
struct monst *shkp) /* if angry, impose a surcharge */
{
long tmp = getprice(obj, FALSE),
/* used to perform a single calculation even when multiple
@@ -2681,7 +2681,7 @@ gem_learned(int oindx)
[if the new price drops for some reason, keep the old one in place] */
void
alter_cost(
struct obj* obj,
struct obj *obj,
long amt) /* if 0, use regular shop pricing, otherwise force amount;
if negative, use abs(amt) even if it's less than old cost */
{
@@ -3086,7 +3086,7 @@ splitbill(struct obj *obj, struct obj *otmp)
}
static void
sub_one_frombill(struct obj* obj, struct monst* shkp)
sub_one_frombill(struct obj *obj, struct monst *shkp)
{
struct bill_x *bp;
@@ -3881,7 +3881,7 @@ static boolean
repairable_damage(struct damage *dam, struct monst *shkp)
{
coordxy x, y;
struct trap* ttmp;
struct trap *ttmp;
struct monst *mtmp;
if (!dam || shk_impaired(shkp))

View File

@@ -784,7 +784,7 @@ stock_room(int shp_indx, struct mkroom *sroom)
/* Hack for Orcus's level: it's a ghost town, get rid of shopkeepers */
if (on_level(&u.uz, &orcus_level)) {
struct monst* mtmp = shop_keeper(rmno);
struct monst *mtmp = shop_keeper(rmno);
mongone(mtmp);
}

View File

@@ -961,7 +961,7 @@ gettty(void)
/* reset terminal to original state */
void
settty(const char* s)
settty(const char *s)
{
cmov(ttyDisplay->curx, ttyDisplay->cury);
end_screen();
@@ -1227,7 +1227,7 @@ nocmov(int x, int y)
}
void
xputs(const char* s)
xputs(const char *s)
{
int k;
int slen = (int) strlen(s);
@@ -1837,7 +1837,7 @@ toggle_mouse_support(void)
/* handle tty options updates here */
void
consoletty_preference_update(const char* pref)
consoletty_preference_update(const char *pref)
{
if (stricmp(pref, "mouse_support") == 0) {
#ifndef NO_MOUSE_ALLOWED
@@ -1989,7 +1989,7 @@ win32con_toggle_cursor_info(void)
#endif
void
map_subkeyvalue(char* op)
map_subkeyvalue(char *op)
{
char digits[] = "0123456789";
int length, i, idx, val;
@@ -2862,8 +2862,8 @@ set_keyhandling_via_option(void)
int
default_processkeystroke(
HANDLE hConIn,
INPUT_RECORD* ir,
boolean* valid,
INPUT_RECORD *ir,
boolean *valid,
boolean numberpad,
int portdebug)
{
@@ -3030,7 +3030,7 @@ int
default_checkinput(
HANDLE hConIn,
INPUT_RECORD *ir,
DWORD* count,
DWORD *count,
boolean numpad,
int mode,
int *mod,

View File

@@ -119,7 +119,7 @@ void copy_symbols_content(void);
#ifdef PORT_HELP
void port_help(void);
#endif
void windows_raw_print(const char* str);
void windows_raw_print(const char *str);
@@ -1141,7 +1141,7 @@ windows_exepath(void)
}
char *
translate_path_variables(const char* str, char* buf)
translate_path_variables(const char *str, char *buf)
{
const char *src;
char evar[BUFSZ], *dest, *envp, *eptr = (char *) 0;
@@ -1195,7 +1195,7 @@ translate_path_variables(const char* str, char* buf)
/*ARGSUSED*/
void
windows_raw_print(const char* str)
windows_raw_print(const char *str)
{
if (str)
fprintf(stdout, "%s\n", str);
@@ -1205,7 +1205,7 @@ windows_raw_print(const char* str)
/*ARGSUSED*/
void
windows_raw_print_bold(const char* str)
windows_raw_print_bold(const char *str)
{
windows_raw_print(str);
return;
@@ -1233,7 +1233,7 @@ windows_nh_poskey(int *x UNUSED, int *y UNUSED, int *mod UNUSED)
/*ARGSUSED*/
char
windows_yn_function(const char* query UNUSED, const char* resp UNUSED,
windows_yn_function(const char *query UNUSED, const char *resp UNUSED,
char def UNUSED)
{
return '\033';
@@ -1241,7 +1241,7 @@ windows_yn_function(const char* query UNUSED, const char* resp UNUSED,
/*ARGSUSED*/
static void
windows_getlin(const char* prompt UNUSED, char* outbuf)
windows_getlin(const char *prompt UNUSED, char *outbuf)
{
Strcpy(outbuf, "\033");
}
@@ -1408,7 +1408,7 @@ gotlock:
#endif /* PC_LOCKING */
boolean
file_exists(const char* path)
file_exists(const char *path)
{
struct stat sb;
@@ -1427,7 +1427,7 @@ RESTORE_WARNING_UNREACHABLE_CODE
does not exist, it returns TRUE.
*/
boolean
file_newer(const char* a_path, const char* b_path)
file_newer(const char *a_path, const char *b_path)
{
struct stat a_sb = { 0 };
struct stat b_sb = { 0 };

View File

@@ -102,7 +102,7 @@ switchar(void)
}
long
freediskspace(char* path)
freediskspace(char *path)
{
char tmppath[4];
DWORD SectorsPerCluster = 0;
@@ -123,7 +123,7 @@ freediskspace(char* path)
* Functions to get filenames using wildcards
*/
int
findfirst(char* path)
findfirst(char *path)
{
if (ffhandle) {
FindClose(ffhandle);
@@ -146,7 +146,7 @@ foundfile_buffer(void)
}
long
filesize(char* file)
filesize(char *file)
{
if (findfirst(file)) {
return ((long) ffd.nFileSizeLow);
@@ -158,7 +158,7 @@ filesize(char* file)
* Chdrive() changes the default drive.
*/
void
chdrive(char* str)
chdrive(char *str)
{
char *ptr;
char drive;

View File

@@ -423,7 +423,7 @@ static char namebuf[1000];
DISABLE_WARNING_FORMAT_NONLITERAL
static char *
name_file(const char* template, const char* tag)
name_file(const char *template, const char *tag)
{
Sprintf(namebuf, template, tag);
return namebuf;
@@ -442,7 +442,7 @@ delete_file(const char *template, const char *tag)
#endif
static FILE *
getfp(const char* template, const char* tag, const char* mode, int flg)
getfp(const char *template, const char *tag, const char *mode, int flg)
{
char *name = name_file(template, tag);
FILE *rv = (FILE *) 0;
@@ -740,7 +740,7 @@ do_grep_showvars(void)
}
static struct grep_var *
grepsearch(const char* name)
grepsearch(const char *name)
{
/* XXX make into binary search */
int x = 0;
@@ -754,7 +754,7 @@ grepsearch(const char* name)
}
static int
grep_check_id(const char* id)
grep_check_id(const char *id)
{
struct grep_var *rv;
@@ -783,7 +783,7 @@ grep_check_id(const char* id)
}
static void
grep_show_wstack(const char* tag)
grep_show_wstack(const char *tag)
{
int x;
@@ -976,7 +976,7 @@ grep0(FILE *inputfp0, FILE* outputfp0, int flg)
/* trivial text encryption routine which can't be broken with `tr' */
static char *
xcrypt(const char* str)
xcrypt(const char *str)
{ /* duplicated in src/hacklib.c */
static char buf[BUFSZ];
const char *p;
@@ -2361,7 +2361,7 @@ do_objs(void)
}
static char *
tmpdup(const char* str)
tmpdup(const char *str)
{
static char buf[128];

View File

@@ -139,7 +139,7 @@ xpm_write(FILE *fp)
}
Fprintf(fp, "/* XPM */\n");
Fprintf(fp, "static char* nhtiles[] = {\n");
Fprintf(fp, "static char *nhtiles[] = {\n");
Fprintf(fp, "\"%lu %lu %lu %d\",\n", header.tile_width * header.per_row,
(header.tile_height * header.ntiles) / header.per_row,
header.ncolors, 1 /* char per color */);

View File

@@ -157,7 +157,7 @@ color_attr curses_menu_promptstyle = { NO_COLOR, ATR_NONE };
static int inv_update = 0;
/*
init_nhwindows(int* argcp, char** argv)
init_nhwindows(int *argcp, char **argv)
-- Initialize the windows used by NetHack. This can also
create the standard windows listed at the top, but does
not display them.

View File

@@ -430,7 +430,7 @@ safe_outrip(winid tmpwin UNUSED, int how UNUSED, time_t when UNUSED)
/*ARGSUSED*/
void
safe_preference_update(const char* pref UNUSED)
safe_preference_update(const char *pref UNUSED)
{
return;
}
@@ -518,7 +518,7 @@ stdio_wait_synch(void)
/* Add to your code: windowprocs.win_raw_print = stdio_raw_print; */
void
stdio_raw_print(const char* str)
stdio_raw_print(const char *str)
{
if (str)
fprintf(stdout, "%s\n", str);
@@ -528,7 +528,7 @@ stdio_raw_print(const char* str)
/* no newline variation, add to your code:
windowprocs.win_raw_print = stdio_nonl_raw_print; */
void
stdio_nonl_raw_print(const char* str)
stdio_nonl_raw_print(const char *str)
{
if (str)
fprintf(stdout, "%s", str);
@@ -537,7 +537,7 @@ stdio_nonl_raw_print(const char* str)
/* Add to your code: windowprocs.win_raw_print_bold = stdio_raw_print_bold; */
void
stdio_raw_print_bold(const char* str)
stdio_raw_print_bold(const char *str)
{
stdio_raw_print(str);
return;

View File

@@ -35,7 +35,7 @@
#ifdef DEBUG
# ifdef _DEBUG
static FILE* _s_debugfp = NULL;
static FILE *_s_debugfp = NULL;
extern void logDebug(const char *fmt, ...);
# endif
#endif
@@ -128,7 +128,7 @@ struct window_procs mswin_procs = {
};
/*
init_nhwindows(int* argcp, char** argv)
init_nhwindows(int *argcp, char **argv)
-- Initialize the windows used by NetHack. This can also
create the standard windows listed at the top, but does
not display them.