aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages/patches/bsd-games-getline.patch
blob: d7c0b4034dbd855792ba08804e6c0d13935117e8 (about) (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
186
187
188
189
190
191
192
193
194
diff -Naur bsd-games-2.17/boggle/boggle/bog.c bsd-games-2.17.1/boggle/boggle/bog.c
--- bsd-games-2.17/boggle/boggle/bog.c	2004-12-07 07:34:21.000000000 -0600
+++ bsd-games-2.17.1/boggle/boggle/bog.c	2010-05-22 10:51:23.000000000 -0500
@@ -336,7 +336,7 @@
	}

	while (1) {
-		if (getline(buf) == NULL) {
+		if (boggle_getline(buf) == NULL) {
			if (feof(stdin))
				clearerr(stdin);
			break;
diff -Naur bsd-games-2.17/boggle/boggle/extern.h bsd-games-2.17.1/boggle/boggle/extern.h
--- bsd-games-2.17/boggle/boggle/extern.h	2004-01-27 14:52:07.000000000 -0600
+++ bsd-games-2.17.1/boggle/boggle/extern.h	2010-05-22 10:51:23.000000000 -0500
@@ -43,7 +43,7 @@
 long	 dictseek(FILE *, long, int);
 void	 findword(void);
 void	 flushin(FILE *);
-char	*getline(char *);
+char	*boggle_getline(char *);
 void	 getword(char *);
 int	 help(void);
 int	 inputch(void);
diff -Naur bsd-games-2.17/boggle/boggle/mach.c bsd-games-2.17.1/boggle/boggle/mach.c
--- bsd-games-2.17/boggle/boggle/mach.c	2004-12-07 07:34:21.000000000 -0600
+++ bsd-games-2.17.1/boggle/boggle/mach.c	2010-05-22 10:51:23.000000000 -0500
@@ -168,7 +168,7 @@
  * - doesn't accept words longer than MAXWORDLEN or containing caps
  */
 char *
-getline(q)
+boggle_getline(q)
	char *q;
 {
	int ch, done;
diff -Naur bsd-games-2.17/cribbage/cribbage.h bsd-games-2.17.1/cribbage/cribbage.h
--- bsd-games-2.17/cribbage/cribbage.h	2004-02-08 16:29:14.000000000 -0600
+++ bsd-games-2.17.1/cribbage/cribbage.h	2010-05-22 10:51:23.000000000 -0500
@@ -77,7 +77,7 @@
 int	 fifteens(const CARD [], int);
 void	 game(void);
 void	 gamescore(void);
-char	*getline(void);
+char	*cribbage_getline(void);
 int	 getuchar(void);
 int	 incard(CARD *);
 int	 infrom(const CARD [], int, const char *);
diff -Naur bsd-games-2.17/cribbage/crib.c bsd-games-2.17.1/cribbage/crib.c
--- bsd-games-2.17/cribbage/crib.c	2004-01-27 14:52:07.000000000 -0600
+++ bsd-games-2.17.1/cribbage/crib.c	2010-05-22 10:51:23.000000000 -0500
@@ -221,7 +221,7 @@
			if (!rflag) {			/* player cuts deck */
				msg(quiet ? "Cut for crib? " :
			    "Cut to see whose crib it is -- low card wins? ");
-				getline();
+				cribbage_getline();
			}
			i = (rand() >> 4) % CARDS;	/* random cut */
			do {	/* comp cuts deck */
@@ -397,7 +397,7 @@
		if (!rflag) {	/* random cut */
			msg(quiet ? "Cut the deck? " :
		    "How many cards down do you wish to cut the deck? ");
-			getline();
+			cribbage_getline();
		}
		i = (rand() >> 4) % (CARDS - pos);
		turnover = deck[i + pos];
diff -Naur bsd-games-2.17/cribbage/io.c bsd-games-2.17.1/cribbage/io.c
--- bsd-games-2.17/cribbage/io.c	2004-12-07 07:34:21.000000000 -0600
+++ bsd-games-2.17.1/cribbage/io.c	2010-05-22 10:51:23.000000000 -0500
@@ -245,7 +245,7 @@

	retval = FALSE;
	rnk = sut = EMPTY;
-	if (!(line = getline()))
+	if (!(line = cribbage_getline()))
		goto gotit;
	p = p1 = line;
	while (*p1 != ' ' && *p1 != '\0')
@@ -346,7 +346,7 @@

	for (sum = 0;;) {
		msg(prompt);
-		if (!(p = getline()) || *p == '\0') {
+		if (!(p = cribbage_getline()) || *p == '\0') {
			msg(quiet ? "Not a number" :
			    "That doesn't look like a number");
			continue;
@@ -528,12 +528,12 @@
 }

 /*
- * getline:
+ * cribbage_getline:
  *      Reads the next line up to '\n' or EOF.  Multiple spaces are
  *	compressed to one space; a space is inserted before a ','
  */
 char *
-getline()
+cribbage_getline()
 {
	char *sp;
	int c, oy, ox;
diff -Naur bsd-games-2.17/gomoku/bdisp.c bsd-games-2.17.1/gomoku/bdisp.c
--- bsd-games-2.17/gomoku/bdisp.c	2003-12-16 20:47:37.000000000 -0600
+++ bsd-games-2.17.1/gomoku/bdisp.c	2010-05-22 10:51:23.000000000 -0500
@@ -241,7 +241,7 @@
 }

 int
-getline(buf, size)
+gomoku_getline(buf, size)
	char *buf;
	int size;
 {
diff -Naur bsd-games-2.17/gomoku/gomoku.h bsd-games-2.17.1/gomoku/gomoku.h
--- bsd-games-2.17/gomoku/gomoku.h	2004-01-27 14:52:07.000000000 -0600
+++ bsd-games-2.17.1/gomoku/gomoku.h	2010-05-22 10:51:23.000000000 -0500
@@ -263,7 +263,7 @@

 void	bdinit(struct spotstr *);
 void	init_overlap(void);
-int	getline(char *, int);
+int	gomoku_getline(char *, int);
 void	ask(const char *);
 void	dislog(const char *);
 void	bdump(FILE *);
diff -Naur bsd-games-2.17/gomoku/main.c bsd-games-2.17.1/gomoku/main.c
--- bsd-games-2.17/gomoku/main.c	2004-01-27 14:52:07.000000000 -0600
+++ bsd-games-2.17.1/gomoku/main.c	2010-05-22 10:51:23.000000000 -0500
@@ -155,7 +155,7 @@
		if (inputfp == NULL && test == 0) {
			for (;;) {
				ask("black or white? ");
-				getline(buf, sizeof(buf));
+				gomoku_getline(buf, sizeof(buf));
				if (buf[0] == 'b' || buf[0] == 'B') {
					color = BLACK;
					break;
@@ -172,7 +172,7 @@
		}
	} else {
		setbuf(stdout, 0);
-		getline(buf, sizeof(buf));
+		gomoku_getline(buf, sizeof(buf));
		if (strcmp(buf, "black") == 0)
			color = BLACK;
		else if (strcmp(buf, "white") == 0)
@@ -244,7 +244,7 @@
		getinput:
			if (interactive)
				ask("move? ");
-			if (!getline(buf, sizeof(buf))) {
+			if (!gomoku_getline(buf, sizeof(buf))) {
				curmove = RESIGN;
				break;
			}
@@ -256,7 +256,7 @@
					FILE *fp;

					ask("save file name? ");
-					(void)getline(buf, sizeof(buf));
+					(void)gomoku_getline(buf, sizeof(buf));
					if ((fp = fopen(buf, "w")) == NULL) {
						glog("cannot create save file");
						goto getinput;
@@ -309,14 +309,14 @@
		if (i != RESIGN) {
		replay:
			ask("replay? ");
-			if (getline(buf, sizeof(buf)) &&
+			if (gomoku_getline(buf, sizeof(buf)) &&
			    (buf[0] == 'y' || buf[0] == 'Y'))
				goto again;
			if (strcmp(buf, "save") == 0) {
				FILE *fp;

				ask("save file name? ");
-				(void)getline(buf, sizeof(buf));
+				(void)gomoku_getline(buf, sizeof(buf));
				if ((fp = fopen(buf, "w")) == NULL) {
					glog("cannot create save file");
					goto replay;
@@ -367,7 +367,7 @@
		quit();
 top:
	ask("cmd? ");
-	if (!getline(fmtbuf, sizeof(fmtbuf)))
+	if (!gomoku_getline(fmtbuf, sizeof(fmtbuf)))
		quit();
	switch (*fmtbuf) {
	case '\0':
an>gnu: ungoogled-chromium: Update to 84.0.4147.89-0.df199c0....* gnu/packages/patches/ungoogled-chromium-system-jsoncpp.patch, gnu/packages/patches/ungoogled-chromium-system-zlib.patch: Delete files. * gnu/packages/patches/ungoogled-chromium-system-nspr.patch: New file. * gnu/local.mk (dist_patch_DATA): Adjust accordingly. * gnu/packages/chromium.scm (%preserved-third-party-files): Adjust for 84. (%ungoogled-revision): Set to df199c04ff367da59ce52a23a3f3b305dd3b00c3. (%debian-revision): Set to debian/83.0.4103.116-3. (%gentoo-revision): Set to f3f649046d31ebdbc8c4a302b2384504eff78027. (chromium-gcc-patchset, %chromium-gcc-patches): New variables. (%gentoo-patches): Remove GCC patches, which have been moved to the above repo. Add ffmpeg compatibility patch. (%debian-patches): Add zlib and jsoncpp patch; remove nspr patch. (%ungoogled-origin): Update hash. (ungoogled-chromium-snippet): Add the new GCC patches. Remove obsolete local patches, add new. (xcb-proto/python2): New variable. (ungoogled-chromium): Update to 84.0.4147.89-0..df199c0. [arguments]: Add "is_unsafe_developer_build", "max_jobs_per_link", "exclude_unwind_tables", "xcbproto_path", "perfetto_use_system_protobuf" to #:configure-flags. Remove "linux_use_bundled_binutils". Adjust vulkan header substitutions. [native-inputs]: Remove YASM. [inputs]: Change from FFMPEG-4.2 to FFMPEG. Add PROTOBUF and XCB-PROTO/PYTHON2. Marius Bakke 2020-06-26gnu: ungoogled-chromium: Inline %PACKAGE-VERSION....* gnu/packages/chromium.scm (%chromium-version, package-revision, %package-version): Remove. (ungoogled-chromium)[version, source]: Adjust accordingly. Marius Bakke 2020-06-26gnu: ungoogled-chromium: Remove all Blink performance tests....* gnu/packages/chromium.scm (%blacklisted-files): New variable. (ungoogled-chromium-snippet): Adjust accordingly. Marius Bakke 2020-06-26gnu: ungoogled-chromium: Convert computed origin to source snippet....* gnu/packages/chromium.scm (computed-origin-method, %chromium-origin): Remove. (ungoogled-chromium-source): Rename to ... (ungoogled-chromium-snippet): ... this. Adjust for running as snippet. (ungoogled-chromium)[source]: Use URL-FETCH, with custom snippet. Marius Bakke 2020-06-23gnu: ungoogled-chromium: Update to 83.0.4103.116-0.f08ce8b [fixes CVE-2020-65......* gnu/packages/chromium.scm (%chromium-version): Set to 83.0.4103.116. (%ungoogled-origin): Update hash. Marius Bakke 2020-06-22gnu: ungoogled-chromium: Update to 83.0.4103.106-0.f08ce8b [security fixes]....This fixes CVE-2020-6465, CVE-2020-6466, CVE-2020-6467, CVE-2020-6468, CVE-2020-6469, CVE-2020-6470, CVE-2020-6471, CVE-2020-6472, CVE-2020-6473, CVE-2020-6474, CVE-2020-6475, CVE-2020-6476, CVE-2020-6477, CVE-2020-6478, CVE-2020-6479, CVE-2020-6480, CVE-2020-6481, CVE-2020-6482, CVE-2020-6483, CVE-2020-6484, CVE-2020-6485, CVE-2020-6486, CVE-2020-6487, CVE-2020-6488, CVE-2020-6489, CVE-2020-6490, CVE-2020-6491, CVE-2020-6493, CVE-2020-6494, CVE-2020-6495, CVE-2020-6496, CVE-2020-6497, and CVE-2020-6498. * gnu/packages/patches/ungoogled-chromium-system-jsoncpp.patch, gnu/packages/patches/ungoogled-chromium-system-zlib.patch: New files. * gnu/local.mk (dist_patch_DATA): Adjust accordingly. * gnu/packages/chromium.scm (%preserved-third-party-files): Adjust for 83. (%chromium-version): Set to 83.0.4103.106. (%ungoogled-revision): Set to f08ce8b3f1300ef0750b5d6bf967b9cbbfd9a56d. (%gentoo-revision, %gentoo-patches, %debian-patches): New variables. (gentoo-patch, debian-patch): New procedures. (%chromium-origin, %ungoogled-origin): Update hashes. (ungoogled-chromium-source): Don't apply patches from %DEBIAN-ORIGIN, but take %GENTOO-PATCHES, %DEBIAN-PATCHES, and the local patch files. (ungoogled-chromium)[arguments]: Remove "enable_swiftshader=false" from #:configure-flags. Add "icu_use_data_file=false". Set CFLAGS in phase. Remove obsolete substitution. Adjust install phase to install .so files for ANGLE and Swiftshader. [native-inputs]: Change from CLANG-9 to CLANG-10. [inputs]: Replace ICU4C with ICU4C-67. (ungoogled-chromium/wayland): Remove obsolete substitution. Add "ozone_platform_x11=true" in #:configure-flags. Marius Bakke 2020-06-22gnu: ungoogled-chromium: Specify CPE name....* gnu/packages/chromium.scm (ungoogled-chromium)[properties]: Add CPE-NAME. Marius Bakke 2020-06-22gnu: ungoogled-chromium: Remove non-free file....* gnu/packages/chromium.scm (ungoogled-chromium-source): Remove (unused) SVG file that is licensed under a NoDerivatives license. Marius Bakke 2020-06-22gnu: ungoogled-chromium: Build with ffmpeg@4.2....Fixes <https://bugs.gnu.org/41987>. Reported by Jonathan Brielmaier <jonathan.brielmaier@web.de>. * gnu/packages/video.scm (ffmpeg-4.2): New public variable. * gnu/packages/chromium.scm (ungoogled-chromium)[inputs]: Change from FFMPEG to FFMPEG-4.2. Marius Bakke