summaryrefslogtreecommitdiff
blob: 7d3a83e462dbd0dab2e5a9a535bb742ea7b9665c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
Bug: https://bugs.gentoo.org/883271
--- a/alpine/adrbkcmd.c
+++ b/alpine/adrbkcmd.c
@@ -81,7 +81,7 @@ int            ab_export(struct pine *, long, int, int);
 VCARD_INFO_S  *prepare_abe_for_vcard(struct pine *, AdrBk_Entry *, int);
 void           write_single_tab_entry(gf_io_t, VCARD_INFO_S *);
 int            percent_done_copying(void);
-int            cmp_action_list(const qsort_t *, const qsort_t *);
+int            cmp_action_list(const void *, const void *);
 void           set_act_list_member(ACTION_LIST_S *, a_c_arg_t, PerAddrBook *, PerAddrBook *, char *);
 void           convert_pinerc_to_remote(struct pine *, char *);
 
@@ -5187,7 +5187,7 @@ percent_done_copying(void)
 }
 
 int
-cmp_action_list(const qsort_t *a1, const qsort_t *a2)
+cmp_action_list(const void *a1, const void *a2)
 {
     ACTION_LIST_S *x = (ACTION_LIST_S *)a1;
     ACTION_LIST_S *y = (ACTION_LIST_S *)a2;
--- a/pico/browse.c
+++ b/pico/browse.c
@@ -1920,7 +1920,7 @@ getfcells(char *dname, int fb_flags)
     /* 
      * sort files case independently
      */
-    qsort((qsort_t *)filtnames, (size_t)nentries, sizeof(char *), sstrcasecmp);
+    qsort((qsort_t *)filtnames, (size_t)nentries, sizeof(char *), (void *)sstrcasecmp);
 
     /* 
      * this is so we use absolute path names for stats.
--- a/pith/adrbklib.c
+++ b/pith/adrbklib.c
@@ -84,7 +84,7 @@ int            cmp_ae_by_nick_lists_last(const qsort_t *,const qsort_t *);
 int            cmp_cntr_by_nick_lists_last(const qsort_t *, const qsort_t *);
 int            cmp_ae_by_nick(const qsort_t *, const qsort_t *);
 int            cmp_cntr_by_nick(const qsort_t *, const qsort_t *);
-int            cmp_addr(const qsort_t *, const qsort_t *);
+int            cmp_addr(const void *, const void *);
 void           sort_addr_list(char **);
 int            build_abook_datastruct(AdrBk *, char *, size_t);
 AdrBk_Entry   *init_ae(AdrBk *, AdrBk_Entry *, char *);
@@ -4671,7 +4671,7 @@ cmp_cntr_by_nick(const qsort_t *a, const qsort_t *b)
  * For sorting a simple list of pointers to addresses (skip initial quotes)
  */
 int
-cmp_addr(const qsort_t *a1, const qsort_t *a2)
+cmp_addr(const void *a1, const void *a2)
 {
     char *x = *(char **)a1, *y = *(char **)a2;
     char *r, *s;
@@ -4762,14 +4762,14 @@ adrbk_sort(AdrBk *ab, a_c_arg_t current_entry_num, adrbk_cntr_t *new_entry_num,
 	qsort((qsort_t *)sort_array,
 	    (size_t)count,
 	    sizeof(adrbk_cntr_t),
-	    (ab->sort_rule == AB_SORT_RULE_FULL_LISTS) ?
-						cmp_cntr_by_full_lists_last :
-	    (ab->sort_rule == AB_SORT_RULE_FULL) ?
-						cmp_cntr_by_full :
-	    (ab->sort_rule == AB_SORT_RULE_NICK_LISTS) ?
-						cmp_cntr_by_nick_lists_last :
-	    /* (ab->sort_rule == AB_SORT_RULE_NICK) */
-						cmp_cntr_by_nick);
+		(void *)((ab->sort_rule == AB_SORT_RULE_FULL_LISTS) ?
+		 cmp_cntr_by_full_lists_last :
+		 (ab->sort_rule == AB_SORT_RULE_FULL) ?
+		 cmp_cntr_by_full :
+		 (ab->sort_rule == AB_SORT_RULE_NICK_LISTS) ?
+		 cmp_cntr_by_nick_lists_last :
+		 /* (ab->sort_rule == AB_SORT_RULE_NICK) */
+		 cmp_cntr_by_nick));
     }
 
     dprint((9, "- adrbk_sort: done with first sort -\n"));
--- a/pith/folder.c
+++ b/pith/folder.c
@@ -1939,11 +1939,11 @@ resort_folder_list(FLIST *flist)
 {
     if(flist && folder_total(flist) > 1 && flist->folders)
       qsort(flist->folders, folder_total(flist), sizeof(flist->folders[0]),
-	    (ps_global->fld_sort_rule == FLD_SORT_ALPHA_DIR_FIRST)
-		? compare_folders_dir_alpha_qsort
-		: (ps_global->fld_sort_rule == FLD_SORT_ALPHA_DIR_LAST)
-		     ? compare_folders_alpha_dir_qsort
-		     : compare_folders_alpha_qsort);
+			  (void *)((ps_global->fld_sort_rule == FLD_SORT_ALPHA_DIR_FIRST)
+			   ? compare_folders_dir_alpha_qsort
+			   : (ps_global->fld_sort_rule == FLD_SORT_ALPHA_DIR_LAST)
+			   ? compare_folders_alpha_dir_qsort
+			   : compare_folders_alpha_qsort));
 }
 
 
--- a/pith/init.c
+++ b/pith/init.c
@@ -28,7 +28,7 @@
 /*
  * Internal prototypes
  */
-int	 compare_sm_files(const qsort_t *, const qsort_t *);
+int	 compare_sm_files(const void *, const void *);
 
 
 
@@ -327,7 +327,7 @@ init_save_defaults(void)
                   in above format.
  ----*/
 int   
-compare_sm_files(const qsort_t *aa, const qsort_t *bb)
+compare_sm_files(const void *aa, const void *bb)
 {
     struct sm_folder *a = (struct sm_folder *)aa,
                      *b = (struct sm_folder *)bb;
--- a/pith/sort.c
+++ b/pith/sort.c
@@ -41,7 +41,7 @@ void	sort_sort_callback(MAILSTREAM *, unsigned long *, unsigned long);
 int     percent_sorted(void);
 int	pine_compare_long(const qsort_t *, const qsort_t *);
 int	pine_compare_long_rev(const qsort_t *, const qsort_t *);
-int	pine_compare_scores(const qsort_t *, const qsort_t *);
+int	pine_compare_scores(const void *, const void *);
 void	build_score_array(MAILSTREAM *, MSGNO_S *);
 void	free_score_array(void);
 
@@ -162,7 +162,7 @@ sort_folder(MAILSTREAM *stream, MSGNO_S *msgmap, SortOrder new_sort,
 	     */
 	    qsort(msgmap->sort+1, (size_t) mn_get_total(msgmap),
 		  sizeof(long),
-		  new_rev ? pine_compare_long_rev : pine_compare_long);
+		  (void *)(new_rev ? pine_compare_long_rev : pine_compare_long));
 	}
 	else if(mn_get_total(msgmap) > 0L){
 	    if(new_rev){
@@ -672,7 +672,7 @@ free_score_array(void)
   Compare scores
  ----*/
 int
-pine_compare_scores(const qsort_t *a, const qsort_t *b)
+pine_compare_scores(const void *a, const void *b)
 {
     long *mess_a = (long *)a, *mess_b = (long *)b, mdiff;
     long  sdiff;
--- a/pith/takeaddr.c
+++ b/pith/takeaddr.c
@@ -1377,7 +1377,7 @@ process_vcard_atts(MAILSTREAM *stream, long int msgno,
 
 
 int
-cmp_swoop_list(const qsort_t *a1, const qsort_t *a2)
+cmp_swoop_list(const void *a1, const void *a2)
 {
     SWOOP_S *x = (SWOOP_S *)a1;
     SWOOP_S *y = (SWOOP_S *)a2;
--- a/pith/takeaddr.h
+++ b/pith/takeaddr.h
@@ -98,7 +98,7 @@ int            convert_ta_to_lines(TA_S *, LINES_TO_TAKE **);
 LINES_TO_TAKE *new_ltline(LINES_TO_TAKE **);
 int            add_addresses_to_talist(struct pine *, long, char *, TA_S **, ADDRESS *, int);
 int            process_vcard_atts(MAILSTREAM *, long, BODY *, BODY *, char *, TA_S **);
-int            cmp_swoop_list(const qsort_t *, const qsort_t *);
+int            cmp_swoop_list(const void *, const void *);
 int            vcard_to_ta(char *, char *, char *, char *, char *, char *, TA_S **);
 char          *getaltcharset(char *, char **, char **, int *);
 void           switch_to_last_comma_first(char *, char *, size_t);
--- a/pith/thread.c
+++ b/pith/thread.c
@@ -45,7 +45,7 @@ THREADNODE	  *sort_threads_and_collapse(THREADNODE *);
 THREADNODE        *insert_tree_in_place(THREADNODE *, THREADNODE *);
 unsigned long      branch_greatest_num(THREADNODE *, int);
 long		   calculate_visible_threads(MAILSTREAM *);
-int		   pine_compare_size_thread(const qsort_t *, const qsort_t *);
+int		   pine_compare_size_thread(const void *, const void *);
 
 
 PINETHRD_S *
@@ -1892,7 +1892,7 @@ get_length_branch(MAILSTREAM *stream, long rawno)
   return branchp ? (count ? count : 1L) : 0L;
 }
 
-int pine_compare_size_thread(const qsort_t *a, const qsort_t *b)
+int pine_compare_size_thread(const void *a, const void *b)
 {
   SIZETHREAD_T *s = (SIZETHREAD_T *) a, *t = (SIZETHREAD_T *) b;