File: 07-fix-obsolete-C-prototypes.patch

package info (click to toggle)
ascd 0.13.2-11
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,596 kB
  • sloc: ansic: 14,363; sh: 182; makefile: 37
file content (106 lines) | stat: -rw-r--r-- 2,317 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
Author: Fredrik Hallenberg <hallon@debian.org>
Last-Update: 2024-11-25
Bug-Debian: https://bugs.debian.org/1074819
Description: Fix obsolete and incorrect C function prototypes

--- a/ascd/ext.h
+++ b/ascd/ext.h
@@ -25,8 +25,8 @@
 #include <WINGs.h>
 #endif
 
-extern open();
-extern time();
+#include <time.h>
+#include <ctype.h>
 
 /* added this for this lib: */
 extern unsigned int info_modified;
--- a/ascd/ascd.c
+++ b/ascd/ascd.c
@@ -63,10 +63,12 @@
 
 /* External functions */
 
-extern time();
-extern open();
-extern cd_control(int);
-extern cd_control_version();
+extern void cd_control(int);
+extern char *cd_control_version();
+extern void load_rc_file(int);
+extern void command_line_parse(int, char **);
+extern void fak_event_handle(int, XEvent);
+extern void cd_event_handle(int, XEvent);
 
 /* the various switches: */
 
--- a/ascd/faktory.c
+++ b/ascd/faktory.c
@@ -36,6 +36,9 @@
  								   
 #include "ext.h"
 
+extern void newtext(char *);
+extern void cd_control(int);
+
 #define MAX_LINE_NAME 16
 
 void tes_sncpy(char *out, char *in, int n)
--- a/ascd/handlers.c
+++ b/ascd/handlers.c
@@ -37,6 +37,12 @@
 #include "ext.h"
 #include "faktory_prot.h"
 
+extern void newtext(char *);
+extern void cd_control(int);
+extern void save_rc_file();
+extern void load_rc_file(int);
+extern void quick_reference(int);
+
 void theme_select_init()
 {
     char txt[256];
@@ -209,7 +215,7 @@
 	break;
     case FAK_LOAD:
 	newtext("Loading");
-	load_rc_file();
+	load_rc_file(FALSE);
 	break;
     case FAK_QREF:
 	quick_reference(thdata[but_current].arg);
--- a/ascd/misc.c
+++ b/ascd/misc.c
@@ -36,9 +36,9 @@
 
 #include "ext.h"
 
-extern tes_xgets();
-extern fak_parse_line();
-extern cd_control_version();
+extern char *tes_xgets(char *, int, FILE *);
+extern int fak_parse_line(char *, char *, char *);
+extern char *cd_control_version();
 
 /* The rc file functions, taken from xfascd*/
 
--- a/libworkman/cddb.c
+++ b/libworkman/cddb.c
@@ -42,6 +42,7 @@
 #include <sys/time.h>
 #include <sys/socket.h>
 #include <netinet/in.h>
+#include <arpa/inet.h>
 #include <netdb.h>
 
 #include "include/wm_config.h"
@@ -210,7 +211,6 @@
 		static struct in_addr defaddr;
 		static char *alist[1];
 		static char namebuf[128];
-		int inet_addr();
 		
 		Trace((stderr, "gethostbyname failed: %s\n", host));