more pointer style consistency
This commit is contained in:
16
src/shk.c
16
src/shk.c
@@ -1821,9 +1821,9 @@ dopay(void)
|
|||||||
*/
|
*/
|
||||||
static int
|
static int
|
||||||
dopayobj(
|
dopayobj(
|
||||||
struct monst* shkp,
|
struct monst *shkp,
|
||||||
struct bill_x* bp,
|
struct bill_x *bp,
|
||||||
struct obj** obj_p,
|
struct obj **obj_p,
|
||||||
int which /* 0 => used-up item, 1 => other (unpaid or lost) */,
|
int which /* 0 => used-up item, 1 => other (unpaid or lost) */,
|
||||||
boolean itemize)
|
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 */
|
/* calculate the value that the shk will charge for [one of] an object */
|
||||||
static long
|
static long
|
||||||
get_cost(
|
get_cost(
|
||||||
struct obj* obj,
|
struct obj *obj,
|
||||||
struct monst* shkp) /* if angry, impose a surcharge */
|
struct monst *shkp) /* if angry, impose a surcharge */
|
||||||
{
|
{
|
||||||
long tmp = getprice(obj, FALSE),
|
long tmp = getprice(obj, FALSE),
|
||||||
/* used to perform a single calculation even when multiple
|
/* 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] */
|
[if the new price drops for some reason, keep the old one in place] */
|
||||||
void
|
void
|
||||||
alter_cost(
|
alter_cost(
|
||||||
struct obj* obj,
|
struct obj *obj,
|
||||||
long amt) /* if 0, use regular shop pricing, otherwise force amount;
|
long amt) /* if 0, use regular shop pricing, otherwise force amount;
|
||||||
if negative, use abs(amt) even if it's less than old cost */
|
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
|
static void
|
||||||
sub_one_frombill(struct obj* obj, struct monst* shkp)
|
sub_one_frombill(struct obj *obj, struct monst *shkp)
|
||||||
{
|
{
|
||||||
struct bill_x *bp;
|
struct bill_x *bp;
|
||||||
|
|
||||||
@@ -3881,7 +3881,7 @@ static boolean
|
|||||||
repairable_damage(struct damage *dam, struct monst *shkp)
|
repairable_damage(struct damage *dam, struct monst *shkp)
|
||||||
{
|
{
|
||||||
coordxy x, y;
|
coordxy x, y;
|
||||||
struct trap* ttmp;
|
struct trap *ttmp;
|
||||||
struct monst *mtmp;
|
struct monst *mtmp;
|
||||||
|
|
||||||
if (!dam || shk_impaired(shkp))
|
if (!dam || shk_impaired(shkp))
|
||||||
|
|||||||
@@ -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 */
|
/* Hack for Orcus's level: it's a ghost town, get rid of shopkeepers */
|
||||||
if (on_level(&u.uz, &orcus_level)) {
|
if (on_level(&u.uz, &orcus_level)) {
|
||||||
struct monst* mtmp = shop_keeper(rmno);
|
struct monst *mtmp = shop_keeper(rmno);
|
||||||
mongone(mtmp);
|
mongone(mtmp);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -961,7 +961,7 @@ gettty(void)
|
|||||||
|
|
||||||
/* reset terminal to original state */
|
/* reset terminal to original state */
|
||||||
void
|
void
|
||||||
settty(const char* s)
|
settty(const char *s)
|
||||||
{
|
{
|
||||||
cmov(ttyDisplay->curx, ttyDisplay->cury);
|
cmov(ttyDisplay->curx, ttyDisplay->cury);
|
||||||
end_screen();
|
end_screen();
|
||||||
@@ -1227,7 +1227,7 @@ nocmov(int x, int y)
|
|||||||
}
|
}
|
||||||
|
|
||||||
void
|
void
|
||||||
xputs(const char* s)
|
xputs(const char *s)
|
||||||
{
|
{
|
||||||
int k;
|
int k;
|
||||||
int slen = (int) strlen(s);
|
int slen = (int) strlen(s);
|
||||||
@@ -1837,7 +1837,7 @@ toggle_mouse_support(void)
|
|||||||
|
|
||||||
/* handle tty options updates here */
|
/* handle tty options updates here */
|
||||||
void
|
void
|
||||||
consoletty_preference_update(const char* pref)
|
consoletty_preference_update(const char *pref)
|
||||||
{
|
{
|
||||||
if (stricmp(pref, "mouse_support") == 0) {
|
if (stricmp(pref, "mouse_support") == 0) {
|
||||||
#ifndef NO_MOUSE_ALLOWED
|
#ifndef NO_MOUSE_ALLOWED
|
||||||
@@ -1989,7 +1989,7 @@ win32con_toggle_cursor_info(void)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
void
|
void
|
||||||
map_subkeyvalue(char* op)
|
map_subkeyvalue(char *op)
|
||||||
{
|
{
|
||||||
char digits[] = "0123456789";
|
char digits[] = "0123456789";
|
||||||
int length, i, idx, val;
|
int length, i, idx, val;
|
||||||
@@ -2862,8 +2862,8 @@ set_keyhandling_via_option(void)
|
|||||||
int
|
int
|
||||||
default_processkeystroke(
|
default_processkeystroke(
|
||||||
HANDLE hConIn,
|
HANDLE hConIn,
|
||||||
INPUT_RECORD* ir,
|
INPUT_RECORD *ir,
|
||||||
boolean* valid,
|
boolean *valid,
|
||||||
boolean numberpad,
|
boolean numberpad,
|
||||||
int portdebug)
|
int portdebug)
|
||||||
{
|
{
|
||||||
@@ -3030,7 +3030,7 @@ int
|
|||||||
default_checkinput(
|
default_checkinput(
|
||||||
HANDLE hConIn,
|
HANDLE hConIn,
|
||||||
INPUT_RECORD *ir,
|
INPUT_RECORD *ir,
|
||||||
DWORD* count,
|
DWORD *count,
|
||||||
boolean numpad,
|
boolean numpad,
|
||||||
int mode,
|
int mode,
|
||||||
int *mod,
|
int *mod,
|
||||||
|
|||||||
@@ -119,7 +119,7 @@ void copy_symbols_content(void);
|
|||||||
#ifdef PORT_HELP
|
#ifdef PORT_HELP
|
||||||
void port_help(void);
|
void port_help(void);
|
||||||
#endif
|
#endif
|
||||||
void windows_raw_print(const char* str);
|
void windows_raw_print(const char *str);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
@@ -1141,7 +1141,7 @@ windows_exepath(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
char *
|
char *
|
||||||
translate_path_variables(const char* str, char* buf)
|
translate_path_variables(const char *str, char *buf)
|
||||||
{
|
{
|
||||||
const char *src;
|
const char *src;
|
||||||
char evar[BUFSZ], *dest, *envp, *eptr = (char *) 0;
|
char evar[BUFSZ], *dest, *envp, *eptr = (char *) 0;
|
||||||
@@ -1195,7 +1195,7 @@ translate_path_variables(const char* str, char* buf)
|
|||||||
|
|
||||||
/*ARGSUSED*/
|
/*ARGSUSED*/
|
||||||
void
|
void
|
||||||
windows_raw_print(const char* str)
|
windows_raw_print(const char *str)
|
||||||
{
|
{
|
||||||
if (str)
|
if (str)
|
||||||
fprintf(stdout, "%s\n", str);
|
fprintf(stdout, "%s\n", str);
|
||||||
@@ -1205,7 +1205,7 @@ windows_raw_print(const char* str)
|
|||||||
|
|
||||||
/*ARGSUSED*/
|
/*ARGSUSED*/
|
||||||
void
|
void
|
||||||
windows_raw_print_bold(const char* str)
|
windows_raw_print_bold(const char *str)
|
||||||
{
|
{
|
||||||
windows_raw_print(str);
|
windows_raw_print(str);
|
||||||
return;
|
return;
|
||||||
@@ -1233,7 +1233,7 @@ windows_nh_poskey(int *x UNUSED, int *y UNUSED, int *mod UNUSED)
|
|||||||
|
|
||||||
/*ARGSUSED*/
|
/*ARGSUSED*/
|
||||||
char
|
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)
|
char def UNUSED)
|
||||||
{
|
{
|
||||||
return '\033';
|
return '\033';
|
||||||
@@ -1241,7 +1241,7 @@ windows_yn_function(const char* query UNUSED, const char* resp UNUSED,
|
|||||||
|
|
||||||
/*ARGSUSED*/
|
/*ARGSUSED*/
|
||||||
static void
|
static void
|
||||||
windows_getlin(const char* prompt UNUSED, char* outbuf)
|
windows_getlin(const char *prompt UNUSED, char *outbuf)
|
||||||
{
|
{
|
||||||
Strcpy(outbuf, "\033");
|
Strcpy(outbuf, "\033");
|
||||||
}
|
}
|
||||||
@@ -1408,7 +1408,7 @@ gotlock:
|
|||||||
#endif /* PC_LOCKING */
|
#endif /* PC_LOCKING */
|
||||||
|
|
||||||
boolean
|
boolean
|
||||||
file_exists(const char* path)
|
file_exists(const char *path)
|
||||||
{
|
{
|
||||||
struct stat sb;
|
struct stat sb;
|
||||||
|
|
||||||
@@ -1427,7 +1427,7 @@ RESTORE_WARNING_UNREACHABLE_CODE
|
|||||||
does not exist, it returns TRUE.
|
does not exist, it returns TRUE.
|
||||||
*/
|
*/
|
||||||
boolean
|
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 a_sb = { 0 };
|
||||||
struct stat b_sb = { 0 };
|
struct stat b_sb = { 0 };
|
||||||
|
|||||||
@@ -102,7 +102,7 @@ switchar(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
long
|
long
|
||||||
freediskspace(char* path)
|
freediskspace(char *path)
|
||||||
{
|
{
|
||||||
char tmppath[4];
|
char tmppath[4];
|
||||||
DWORD SectorsPerCluster = 0;
|
DWORD SectorsPerCluster = 0;
|
||||||
@@ -123,7 +123,7 @@ freediskspace(char* path)
|
|||||||
* Functions to get filenames using wildcards
|
* Functions to get filenames using wildcards
|
||||||
*/
|
*/
|
||||||
int
|
int
|
||||||
findfirst(char* path)
|
findfirst(char *path)
|
||||||
{
|
{
|
||||||
if (ffhandle) {
|
if (ffhandle) {
|
||||||
FindClose(ffhandle);
|
FindClose(ffhandle);
|
||||||
@@ -146,7 +146,7 @@ foundfile_buffer(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
long
|
long
|
||||||
filesize(char* file)
|
filesize(char *file)
|
||||||
{
|
{
|
||||||
if (findfirst(file)) {
|
if (findfirst(file)) {
|
||||||
return ((long) ffd.nFileSizeLow);
|
return ((long) ffd.nFileSizeLow);
|
||||||
@@ -158,7 +158,7 @@ filesize(char* file)
|
|||||||
* Chdrive() changes the default drive.
|
* Chdrive() changes the default drive.
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
chdrive(char* str)
|
chdrive(char *str)
|
||||||
{
|
{
|
||||||
char *ptr;
|
char *ptr;
|
||||||
char drive;
|
char drive;
|
||||||
|
|||||||
@@ -423,7 +423,7 @@ static char namebuf[1000];
|
|||||||
DISABLE_WARNING_FORMAT_NONLITERAL
|
DISABLE_WARNING_FORMAT_NONLITERAL
|
||||||
|
|
||||||
static char *
|
static char *
|
||||||
name_file(const char* template, const char* tag)
|
name_file(const char *template, const char *tag)
|
||||||
{
|
{
|
||||||
Sprintf(namebuf, template, tag);
|
Sprintf(namebuf, template, tag);
|
||||||
return namebuf;
|
return namebuf;
|
||||||
@@ -442,7 +442,7 @@ delete_file(const char *template, const char *tag)
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
static FILE *
|
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);
|
char *name = name_file(template, tag);
|
||||||
FILE *rv = (FILE *) 0;
|
FILE *rv = (FILE *) 0;
|
||||||
@@ -740,7 +740,7 @@ do_grep_showvars(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static struct grep_var *
|
static struct grep_var *
|
||||||
grepsearch(const char* name)
|
grepsearch(const char *name)
|
||||||
{
|
{
|
||||||
/* XXX make into binary search */
|
/* XXX make into binary search */
|
||||||
int x = 0;
|
int x = 0;
|
||||||
@@ -754,7 +754,7 @@ grepsearch(const char* name)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static int
|
static int
|
||||||
grep_check_id(const char* id)
|
grep_check_id(const char *id)
|
||||||
{
|
{
|
||||||
struct grep_var *rv;
|
struct grep_var *rv;
|
||||||
|
|
||||||
@@ -783,7 +783,7 @@ grep_check_id(const char* id)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static void
|
static void
|
||||||
grep_show_wstack(const char* tag)
|
grep_show_wstack(const char *tag)
|
||||||
{
|
{
|
||||||
int x;
|
int x;
|
||||||
|
|
||||||
@@ -976,7 +976,7 @@ grep0(FILE *inputfp0, FILE* outputfp0, int flg)
|
|||||||
|
|
||||||
/* trivial text encryption routine which can't be broken with `tr' */
|
/* trivial text encryption routine which can't be broken with `tr' */
|
||||||
static char *
|
static char *
|
||||||
xcrypt(const char* str)
|
xcrypt(const char *str)
|
||||||
{ /* duplicated in src/hacklib.c */
|
{ /* duplicated in src/hacklib.c */
|
||||||
static char buf[BUFSZ];
|
static char buf[BUFSZ];
|
||||||
const char *p;
|
const char *p;
|
||||||
@@ -2361,7 +2361,7 @@ do_objs(void)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static char *
|
static char *
|
||||||
tmpdup(const char* str)
|
tmpdup(const char *str)
|
||||||
{
|
{
|
||||||
static char buf[128];
|
static char buf[128];
|
||||||
|
|
||||||
|
|||||||
@@ -139,7 +139,7 @@ xpm_write(FILE *fp)
|
|||||||
}
|
}
|
||||||
|
|
||||||
Fprintf(fp, "/* XPM */\n");
|
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,
|
Fprintf(fp, "\"%lu %lu %lu %d\",\n", header.tile_width * header.per_row,
|
||||||
(header.tile_height * header.ntiles) / header.per_row,
|
(header.tile_height * header.ntiles) / header.per_row,
|
||||||
header.ncolors, 1 /* char per color */);
|
header.ncolors, 1 /* char per color */);
|
||||||
|
|||||||
@@ -157,7 +157,7 @@ color_attr curses_menu_promptstyle = { NO_COLOR, ATR_NONE };
|
|||||||
static int inv_update = 0;
|
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
|
-- Initialize the windows used by NetHack. This can also
|
||||||
create the standard windows listed at the top, but does
|
create the standard windows listed at the top, but does
|
||||||
not display them.
|
not display them.
|
||||||
|
|||||||
@@ -430,7 +430,7 @@ safe_outrip(winid tmpwin UNUSED, int how UNUSED, time_t when UNUSED)
|
|||||||
|
|
||||||
/*ARGSUSED*/
|
/*ARGSUSED*/
|
||||||
void
|
void
|
||||||
safe_preference_update(const char* pref UNUSED)
|
safe_preference_update(const char *pref UNUSED)
|
||||||
{
|
{
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -518,7 +518,7 @@ stdio_wait_synch(void)
|
|||||||
|
|
||||||
/* Add to your code: windowprocs.win_raw_print = stdio_raw_print; */
|
/* Add to your code: windowprocs.win_raw_print = stdio_raw_print; */
|
||||||
void
|
void
|
||||||
stdio_raw_print(const char* str)
|
stdio_raw_print(const char *str)
|
||||||
{
|
{
|
||||||
if (str)
|
if (str)
|
||||||
fprintf(stdout, "%s\n", str);
|
fprintf(stdout, "%s\n", str);
|
||||||
@@ -528,7 +528,7 @@ stdio_raw_print(const char* str)
|
|||||||
/* no newline variation, add to your code:
|
/* no newline variation, add to your code:
|
||||||
windowprocs.win_raw_print = stdio_nonl_raw_print; */
|
windowprocs.win_raw_print = stdio_nonl_raw_print; */
|
||||||
void
|
void
|
||||||
stdio_nonl_raw_print(const char* str)
|
stdio_nonl_raw_print(const char *str)
|
||||||
{
|
{
|
||||||
if (str)
|
if (str)
|
||||||
fprintf(stdout, "%s", 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; */
|
/* Add to your code: windowprocs.win_raw_print_bold = stdio_raw_print_bold; */
|
||||||
void
|
void
|
||||||
stdio_raw_print_bold(const char* str)
|
stdio_raw_print_bold(const char *str)
|
||||||
{
|
{
|
||||||
stdio_raw_print(str);
|
stdio_raw_print(str);
|
||||||
return;
|
return;
|
||||||
|
|||||||
@@ -35,7 +35,7 @@
|
|||||||
|
|
||||||
#ifdef DEBUG
|
#ifdef DEBUG
|
||||||
# ifdef _DEBUG
|
# ifdef _DEBUG
|
||||||
static FILE* _s_debugfp = NULL;
|
static FILE *_s_debugfp = NULL;
|
||||||
extern void logDebug(const char *fmt, ...);
|
extern void logDebug(const char *fmt, ...);
|
||||||
# endif
|
# endif
|
||||||
#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
|
-- Initialize the windows used by NetHack. This can also
|
||||||
create the standard windows listed at the top, but does
|
create the standard windows listed at the top, but does
|
||||||
not display them.
|
not display them.
|
||||||
|
|||||||
Reference in New Issue
Block a user