File: 18_prototypes8.patch

package info (click to toggle)
xfig 1%3A3.2.9a-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 32,960 kB
  • sloc: ansic: 76,504; sh: 3,214; makefile: 303; xml: 112; javascript: 22; csh: 5
file content (138 lines) | stat: -rw-r--r-- 5,035 bytes parent folder | download
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
From: Mario Haustein <mario.haustein@hrz.tu-chemnitz.de>
Date: Sun, 2 Feb 2025 22:29:33 +0100
Origin: upstream, https://sourceforge.net/p/mcj/xfig/ci/e0379d7
Forwarded: not-needed
Bug: https://sourceforge.net/p/mcj/tickets/194/
Bug-Debian: https://bugs.debian.org/1098137
Last-Update: 2025-09-05
Subject: Fix miscellaneous prototypes

--- a/src/d_text.c
+++ b/src/d_text.c
@@ -143,7 +143,7 @@ Boolean		xim_active = False;
 
 static int	save_base_x, save_base_y;
 
-static void	xim_set_spot();
+static void     xim_set_spot(int x, int y);
 
 static pid_t	preedit_pid = -1;
 static char	preedit_filename[PATH_MAX] = "";
--- a/src/e_edit.c
+++ b/src/e_edit.c
@@ -107,7 +107,7 @@ static void	new_generic_values(void);
 static void	new_arrow_values(void);
 static void	get_new_line_values(void);
 static void	generic_window(char *object_type, char *sub_type,
-			icon_struct *icon, void (*d_proc)(/* ??? */),
+			icon_struct *icon, void (*d_proc)(void),
 			Boolean generics, Boolean arrows, char *comments);
 static void	spline_point_window(int x, int y);
 static void	font_image_panel(Pixmap pixmap, char *label, Widget *pi_x);
@@ -3331,7 +3331,7 @@ reset_edit_cursor(void)
 
 static void
 generic_window(char *object_type, char *sub_type, icon_struct *icon,
-		void (*d_proc) (/* ??? */), Boolean generics, Boolean arrows,
+		void (*d_proc) (void), Boolean generics, Boolean arrows,
 		char *comments)
 {
 	Dimension	label_height, image_height;
--- a/src/f_picobj.c
+++ b/src/f_picobj.c
@@ -71,7 +71,7 @@ extern	int	read_xpm(F_pic *pic, struct x
 static struct _haeders {
 	char	*type;
 	char	*bytes;
-	int	(*readfunc)();
+	int	(*readfunc)(F_pic *pic, struct xfig_stream *restrict pic_stream);
 } headers[] = {
 	{"GIF",		"GIF",					read_gif},
 	{"PCX",		"\012\005\001",				read_pcx},
--- a/src/w_indpanel.c
+++ b/src/w_indpanel.c
@@ -4517,7 +4517,7 @@ dec_zoom(void)
 
 /* zoom in or out, keeping location x,y fixed */
 void
-zoom_focus(int x, int y, void(* zoom)())
+zoom_focus(int x, int y, void(* zoom)(void))
 {
 	double	stretch;
 
--- a/src/w_library.c
+++ b/src/w_library.c
@@ -187,19 +187,19 @@ static Widget	make_library_menu(Widget p
 
 
 static int
-SPComp(char **s1, char **s2)
+SPComp(const void *s1, const void *s2)
 {
-  return (strcasecmp(*s1, *s2));
+  return (strcasecmp(*(char**)s1, *(char**)s2));
 }
 
 /* comparison function for librec sorting using qsort() */
 
 static int
-LRComp(struct lib_rec **r1, struct lib_rec **r2)
+LRComp(const void *r1, const void *r2)
 {
     struct lib_rec *name1, *name2;
-    name1 = *r1;
-    name2 = *r2;
+    name1 = *(struct lib_rec **)r1;
+    name2 = *(struct lib_rec **)r2;
     return (strcasecmp(name1->name, name2->name));
 }
 
@@ -1345,7 +1345,7 @@ ScanLibraryDirectory(Boolean at_top, str
     closedir(dirp);
     if (recnum > 0) {
 	/* sort them since the order of files in directories is not necessarily alphabetical */
-	qsort(&librec[0], recnum, sizeof(struct lib_rec *), (int (*)())*LRComp);
+	qsort(&librec[0], recnum, sizeof(struct lib_rec *), LRComp);
     }
     /* all OK */
     *nentries = recnum;
@@ -1600,7 +1600,7 @@ MakeLibraryFileList(char *dir_name, char
   num_list_items = numobj;
   /* signals up/down arrows to start at 0 if user doesn't press mouse in list first */
   which_num = -1;
-  qsort(obj_list,numobj,sizeof(char*),(int (*)())*SPComp);
+  qsort(obj_list,numobj,sizeof(char*),SPComp);
   closedir(dirp);
   return True;
 }
--- a/src/w_modepanel.h
+++ b/src/w_modepanel.h
@@ -34,7 +34,7 @@ extern void	init_mode_panel(Widget tool)
 typedef struct mode_switch_struct {
     icon_struct	   *icon;		/* icon (xxx_ic struct) */
     int		    mode;		/* mode (e.g. F_CIRCLE_BY_RAD) */
-    void	    (*setmode_func) ();	/* function called when button is released */
+    void	    (*setmode_func) (void);	/* function called when button is released */
     int		    objmask;		/* mask of objects that may be affected by this */
     unsigned long   indmask;		/* mask to display indicators for this func */
     char	    modemsg[MAX_MODEMSG_LEN];  /* message for function */
--- a/src/w_srchrepl.c
+++ b/src/w_srchrepl.c
@@ -99,7 +99,7 @@ String	search_results_translations =
 
 static void	search_panel_dismiss(Widget widget, XtPointer closure, XtPointer call_data);
 static void	search_and_replace_text(Widget widget, XtPointer closure, XtPointer call_data);
-static Boolean	search_text_in_compound(F_compound *com, char *pattern, void (*proc) (/* ??? */));
+static Boolean	search_text_in_compound(F_compound *com, char *pattern, void (*proc) (F_text *t));
 static Boolean	replace_text_in_compound(F_compound *com, char *pattern, char *dst);
 static void	found_text_panel_dismiss(void);
 static void	do_replace(Widget widget, XtPointer closure, XtPointer call_data);
@@ -376,7 +376,7 @@ search_and_replace_text(Widget widget, X
 }
 
 static Boolean
-search_text_in_compound(F_compound *com, char *pattern, void (*proc) (/* ??? */))
+search_text_in_compound(F_compound *com, char *pattern, void (*proc) (F_text *t))
 {
   F_compound *c;
   F_text *t;