File: 40-getopt.patch

package info (click to toggle)
flip 1.20-7
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 216 kB
  • sloc: ansic: 1,695; cpp: 172; makefile: 123; sh: 61
file content (29 lines) | stat: -rw-r--r-- 903 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
From: Syed Shahrukh Hussain <syed.shahrukh@ossrevival.org>
Date: Fri, 14 Nov 2025 10:34:06 +0500
Subject: Fix getopt declaration
Forwarded: not-needed

---
diff --git a/flip.c b/flip.c
index 0e1d8c5..75c9c12 100644
--- a/flip.c
+++ b/flip.c
@@ -24,7 +24,7 @@ enum state     { NONE, SAWCR, SAWLF, SAWCRLF, SAWCTRLZ };
 void usage PARMS ((void));
 void give_help PARMS ((void));
 void flip_exit PARMS ((int));
-int getopt PARMS ((int argc, char **argv, char *options));
+int getopt PARMS ((int argc, char * const* argv, const char *options));
 void doarg PARMS ((char *, enum choices));
 int dofile PARMS ((char *, enum choices));
 char *nextfile PARMS ((int, char *, int));
@@ -548,8 +548,7 @@ int sig;
 #define  ERRSIZE     200
 
 /* prints error message via perror */
-void error (msg1, msg2)
-char *msg1, *msg2;
+void error (char *msg1, char *msg2)
 {
    char buf[ERRSIZE];
    strcpy (buf, myname);