CFDECLSPEC -> QSORTCALLBACK

also remove one inappropriate use of CFDECLSPEC
This commit is contained in:
nhmall
2021-01-31 13:58:19 -05:00
parent 322293993f
commit 41fc278cfb
9 changed files with 19 additions and 19 deletions
+2 -2
View File
@@ -568,9 +568,9 @@ enum optset_restrictions {
* in that environment. * in that environment.
*/ */
#if defined(WIN_CE) #if defined(WIN_CE)
#define CFDECLSPEC __cdecl #define QSORTCALLBACK __cdecl
#else #else
#define CFDECLSPEC #define QSORTCALLBACK
#endif #endif
#define DEVTEAM_EMAIL "devteam@nethack.org" #define DEVTEAM_EMAIL "devteam@nethack.org"
+4 -4
View File
@@ -449,8 +449,8 @@ static int compare_blstats(struct istat_s *, struct istat_s *);
static char *anything_to_s(char *, anything *, int); static char *anything_to_s(char *, anything *, int);
static int percentage(struct istat_s *, struct istat_s *); static int percentage(struct istat_s *, struct istat_s *);
static int exp_percentage(void); static int exp_percentage(void);
static int CFDECLSPEC cond_cmp(const genericptr, const genericptr); static int QSORTCALLBACK cond_cmp(const genericptr, const genericptr);
static int CFDECLSPEC menualpha_cmp(const genericptr, const genericptr); static int QSORTCALLBACK menualpha_cmp(const genericptr, const genericptr);
#ifdef STATUS_HILITES #ifdef STATUS_HILITES
static void s_to_anything(anything *, char *, int); static void s_to_anything(anything *, char *, int);
@@ -989,7 +989,7 @@ condopt(int idx, boolean *addr, boolean negated)
} }
/* qsort callback routine for sorting the condition index */ /* qsort callback routine for sorting the condition index */
static int CFDECLSPEC static int QSORTCALLBACK
cond_cmp(const genericptr vptr1, const genericptr vptr2) cond_cmp(const genericptr vptr1, const genericptr vptr2)
{ {
int indx1 = *(int *) vptr1, indx2 = *(int *) vptr2, int indx1 = *(int *) vptr1, indx2 = *(int *) vptr2,
@@ -1002,7 +1002,7 @@ cond_cmp(const genericptr vptr1, const genericptr vptr2)
} }
/* qsort callback routine for alphabetical sorting of index */ /* qsort callback routine for alphabetical sorting of index */
static int CFDECLSPEC static int QSORTCALLBACK
menualpha_cmp(const genericptr vptr1, const genericptr vptr2) menualpha_cmp(const genericptr vptr1, const genericptr vptr2)
{ {
int indx1 = *(int *) vptr1, indx2 = *(int *) vptr2; int indx1 = *(int *) vptr1, indx2 = *(int *) vptr2;
+1 -1
View File
@@ -8,7 +8,7 @@
static char *nextmbuf(void); static char *nextmbuf(void);
static void getpos_help_keyxhelp(winid, const char *, const char *, int); static void getpos_help_keyxhelp(winid, const char *, const char *, int);
static void getpos_help(boolean, const char *); static void getpos_help(boolean, const char *);
static int CFDECLSPEC cmp_coord_distu(const void *, const void *); static int cmp_coord_distu(const void *, const void *);
static int gloc_filter_classify_glyph(int); static int gloc_filter_classify_glyph(int);
static int gloc_filter_floodfill_matcharea(int, int); static int gloc_filter_floodfill_matcharea(int, int);
static void gloc_filter_floodfill(int, int); static void gloc_filter_floodfill(int, int);
+2 -2
View File
@@ -126,7 +126,7 @@ extern char *sounddir; /* defined in sounds.c */
static NHFILE *new_nhfile(void); static NHFILE *new_nhfile(void);
static void free_nhfile(NHFILE *); static void free_nhfile(NHFILE *);
#ifdef SELECTSAVED #ifdef SELECTSAVED
static int CFDECLSPEC strcmp_wrap(const void *, const void *); static int QSORTCALLBACK strcmp_wrap(const void *, const void *);
#endif #endif
static char *set_bonesfile_name(char *, d_level *); static char *set_bonesfile_name(char *, d_level *);
static char *set_bonestemp_name(void); static char *set_bonestemp_name(void);
@@ -613,7 +613,7 @@ clearlocks(void)
#if defined(SELECTSAVED) #if defined(SELECTSAVED)
/* qsort comparison routine */ /* qsort comparison routine */
static int CFDECLSPEC static int QSORTCALLBACK
strcmp_wrap(const void *p, const void *q) strcmp_wrap(const void *p, const void *q)
{ {
#if defined(UNIX) && defined(QT_GRAPHICS) #if defined(UNIX) && defined(QT_GRAPHICS)
+2 -2
View File
@@ -30,7 +30,7 @@ static void status_enlightenment(int, int);
static void weapon_insight(int); static void weapon_insight(int);
static void attributes_enlightenment(int, int); static void attributes_enlightenment(int, int);
static void show_achievements(int); static void show_achievements(int);
static int CFDECLSPEC vanqsort_cmp(const genericptr, const genericptr); static int QSORTCALLBACK vanqsort_cmp(const genericptr, const genericptr);
static int set_vanq_order(void); static int set_vanq_order(void);
static int num_extinct(void); static int num_extinct(void);
@@ -2193,7 +2193,7 @@ static const char *vanqorders[NUM_VANQ_ORDER_MODES] = {
"by count, low to high, by internal index within tied count", "by count, low to high, by internal index within tied count",
}; };
static int CFDECLSPEC static int QSORTCALLBACK
vanqsort_cmp(const genericptr vptr1, const genericptr vptr2) vanqsort_cmp(const genericptr vptr1, const genericptr vptr2)
{ {
int indx1 = *(short *) vptr1, indx2 = *(short *) vptr2, int indx1 = *(short *) vptr1, indx2 = *(short *) vptr2,
+2 -2
View File
@@ -15,7 +15,7 @@
static char *loot_xname(struct obj *); static char *loot_xname(struct obj *);
static int invletter_value(char); static int invletter_value(char);
static int CFDECLSPEC sortloot_cmp(const genericptr, const genericptr); static int QSORTCALLBACK sortloot_cmp(const genericptr, const genericptr);
static void reorder_invent(void); static void reorder_invent(void);
static struct obj *addinv_core0(struct obj *, struct obj *, boolean); static struct obj *addinv_core0(struct obj *, struct obj *, boolean);
static void noarmor(boolean); static void noarmor(boolean);
@@ -303,7 +303,7 @@ invletter_value(char c)
} }
/* qsort comparison routine for sortloot() */ /* qsort comparison routine for sortloot() */
static int CFDECLSPEC static int QSORTCALLBACK
sortloot_cmp(const genericptr vptr1, const genericptr vptr2) sortloot_cmp(const genericptr vptr1, const genericptr vptr2)
{ {
struct sortloot_item *sli1 = (struct sortloot_item *) vptr1, struct sortloot_item *sli1 = (struct sortloot_item *) vptr1,
+2 -2
View File
@@ -27,7 +27,7 @@ static struct mkroom *pos_to_room(xchar, xchar);
static boolean place_niche(struct mkroom *, int *, int *, int *); static boolean place_niche(struct mkroom *, int *, int *, int *);
static void makeniche(int); static void makeniche(int);
static void make_niches(void); static void make_niches(void);
static int CFDECLSPEC do_comp(const genericptr, const genericptr); static int QSORTCALLBACK do_comp(const genericptr, const genericptr);
static void dosdoor(xchar, xchar, struct mkroom *, int); static void dosdoor(xchar, xchar, struct mkroom *, int);
static void join(int, int, boolean); static void join(int, int, boolean);
static void do_room_or_subroom(struct mkroom *, int, int, int, int, boolean, static void do_room_or_subroom(struct mkroom *, int, int, int, int, boolean,
@@ -44,7 +44,7 @@ static void mk_knox_portal(xchar, xchar);
/* Args must be (const genericptr) so that qsort will always be happy. */ /* Args must be (const genericptr) so that qsort will always be happy. */
static int CFDECLSPEC static int QSORTCALLBACK
do_comp(const genericptr vx, const genericptr vy) do_comp(const genericptr vx, const genericptr vy)
{ {
#ifdef LINT #ifdef LINT
+2 -2
View File
@@ -9,7 +9,7 @@ static void setgemprobs(d_level *);
static void shuffle(int, int, boolean); static void shuffle(int, int, boolean);
static void shuffle_all(void); static void shuffle_all(void);
static boolean interesting_to_discover(int); static boolean interesting_to_discover(int);
static int CFDECLSPEC discovered_cmp(const genericptr, const genericptr); static int QSORTCALLBACK discovered_cmp(const genericptr, const genericptr);
static char *oclass_to_name(char, char *); static char *oclass_to_name(char, char *);
#ifdef USE_TILES #ifdef USE_TILES
@@ -455,7 +455,7 @@ static const short uniq_objs[] = {
}; };
/* discoveries qsort comparison function */ /* discoveries qsort comparison function */
static int CFDECLSPEC static int QSORTCALLBACK
discovered_cmp(const genericptr v1, const genericptr v2) discovered_cmp(const genericptr v1, const genericptr v2)
{ {
const char *s1 = *(const char **) v1; const char *s1 = *(const char **) v1;
+2 -2
View File
@@ -32,7 +32,7 @@ static void deadbook(struct obj *);
static int learn(void); static int learn(void);
static boolean rejectcasting(void); static boolean rejectcasting(void);
static boolean getspell(int *); static boolean getspell(int *);
static int CFDECLSPEC spell_cmp(const genericptr, const genericptr); static int QSORTCALLBACK spell_cmp(const genericptr, const genericptr);
static void sortspells(void); static void sortspells(void);
static boolean spellsortmenu(void); static boolean spellsortmenu(void);
static boolean dospellmenu(const char *, int, int *); static boolean dospellmenu(const char *, int, int *);
@@ -1443,7 +1443,7 @@ static const char *spl_sortchoices[NUM_SPELL_SORTBY] = {
}; };
/* qsort callback routine */ /* qsort callback routine */
static int CFDECLSPEC static int QSORTCALLBACK
spell_cmp(const genericptr vptr1, const genericptr vptr2) spell_cmp(const genericptr vptr1, const genericptr vptr2)
{ {
/* /*