File: old-style-functions.patch

package info (click to toggle)
ncompress 5.0-4
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 468 kB
  • sloc: ansic: 1,291; sh: 1,030; makefile: 24
file content (84 lines) | stat: -rw-r--r-- 1,877 bytes parent folder | download | duplicates (2)
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
Description: Fix compiler warnings about old-style function definitions.
 This code was written in K&R style, and the latest Debian build process
 complains about that due to -Wold-style-definition.  Since the fix is
 easy, I've decided to patch the code to remove the warnings.
Author: Kenneth J. Pronovici <pronovic@debian.org>
Index: ncompress/compress.c
===================================================================
--- ncompress.orig/compress.c
+++ ncompress/compress.c
@@ -580,9 +580,7 @@ void  	about			ARGS((void));
  *   procedure needs no input table, but tracks the way the table was built.
  */ 
 int
-main(argc, argv)
-	int 	 argc;
-	char	*argv[];
+main(int argc, char *argv[])
 	{
 		char **filelist;
 		char **fileptr;
@@ -794,8 +792,7 @@ Usage: %s [-dfhvcVr] [-b maxbits] [--] [
 	}
 
 void
-comprexx(fileptr)
-	const char	*fileptr;
+comprexx(const char *fileptr)
 	{
 		int				 fdin = -1;
 		int				 fdout = -1;
@@ -1144,8 +1141,7 @@ error:
 
 #ifdef	RECURSIVE
 void
-compdir(dir)
-	char	*dir;
+compdir(char *dir)
 	{
 		struct dirent *dp;
 		DIR *dirp;
@@ -1221,9 +1217,7 @@ compdir(dir)
  * questions about this implementation to ames!jaw.
  */
 void
-compress(fdin, fdout)
-	int		fdin;
-	int		fdout;
+compress(int fdin, int fdout)
 	{
 		long hp;
 		int rpos;
@@ -1460,9 +1454,7 @@ endlop:			if (fcode.e.ent >= FIRST && rp
  */
 
 void
-decompress(fdin, fdout)
-	int		fdin;
-	int		fdout;
+decompress(int fdin, int fdout)
 	{
 		char_type *stackp;
 		code_int code;
@@ -1703,8 +1695,7 @@ write_error()
 	}
 
 void
-abort_compress(sig)
-	int sig;
+abort_compress(int sig)
 	{
 		if (remove_ofname)
 	    	unlink(ofname);
@@ -1713,10 +1704,7 @@ abort_compress(sig)
 	}
 
 void
-prratio(stream, num, den)
-	FILE		*stream;
-	long int	 num;
-	long int	 den;
+prratio(FILE *stream, long int num, long int den)
 	{
 		int q;			/* Doesn't need to be long */