mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 05:07:35 +00:00
Ports: Update SDLPoP's patches to use git patches
This commit is contained in:
parent
98260975c0
commit
e24b55db8c
7 changed files with 111 additions and 42 deletions
|
@ -0,0 +1,52 @@
|
|||
From 4776a79fcc39601e79b79909f1fa3c69a42d958c Mon Sep 17 00:00:00 2001
|
||||
From: Manuel Palenzuela <manuelpalenzuelamerino@gmail.com>
|
||||
Date: Sat, 3 Apr 2021 17:53:44 +0200
|
||||
Subject: [PATCH 3/4] Remove some unsupported scanf format specifiers
|
||||
|
||||
(Note that scanf has been rewritten since and probably supports these
|
||||
modifiers now, so this patch might not be necessary)
|
||||
---
|
||||
src/options.c | 6 +++---
|
||||
src/seg009.c | 2 +-
|
||||
2 files changed, 4 insertions(+), 4 deletions(-)
|
||||
|
||||
diff --git a/src/options.c b/src/options.c
|
||||
index 1bfe473..2bf173e 100644
|
||||
--- a/src/options.c
|
||||
+++ b/src/options.c
|
||||
@@ -56,8 +56,8 @@ int ini_load(const char *filename,
|
||||
}
|
||||
|
||||
while (!feof(f)) {
|
||||
- if (fscanf(f, "[%127[^];\n]]\n", section) == 1) {
|
||||
- } else if ((cnt = fscanf(f, " %63[^=;\n] = %255[^;\n]", name, value))) {
|
||||
+ if (fscanf(f, "[%[^];\n]]\n", section) == 1) {
|
||||
+ } else if ((cnt = fscanf(f, " %[^=;\n] = %[^;\n]", name, value))) {
|
||||
if (cnt == 1)
|
||||
*value = 0;
|
||||
for (s = name + strlen(name) - 1; s > name && isspace(*s); s--)
|
||||
@@ -66,7 +66,7 @@ int ini_load(const char *filename,
|
||||
*s = 0;
|
||||
report(section, name, value);
|
||||
}
|
||||
- if (fscanf(f, " ;%*[^\n]") != 0 ||
|
||||
+ if (fscanf(f, " ;%[^\n]") != 0 ||
|
||||
fscanf(f, " \n") != 0) {
|
||||
fprintf(stderr, "short read from %s!?\n", filename);
|
||||
fclose(f);
|
||||
diff --git a/src/seg009.c b/src/seg009.c
|
||||
index 139c2d8..e2047fb 100644
|
||||
--- a/src/seg009.c
|
||||
+++ b/src/seg009.c
|
||||
@@ -2077,7 +2077,7 @@ void load_sound_names() {
|
||||
while (!feof(fp)) {
|
||||
int index;
|
||||
char name[POP_MAX_PATH];
|
||||
- if (fscanf(fp, "%d=%255s\n", &index, /*sizeof(name)-1,*/ name) != 2) {
|
||||
+ if (fscanf(fp, "%d=%s\n", &index, /*sizeof(name)-1,*/ name) != 2) {
|
||||
perror(names_path);
|
||||
continue;
|
||||
}
|
||||
--
|
||||
2.36.1
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue