void-packages/srcpkgs/scummvm/patches/fluidsynth-2.2.0.diff
Đoàn Trần Công Danh 4b97cd2fb4 srcpkgs/s*: convert patches to -Np1
```sh
git grep -l '^patch_args=-Np0' "srcpkgs/$1*/template" |
while read template; do
	for p in ${template%/template}/patches/*; do
		sed -i '
			\,^[+-][+-][+-] /dev/null,b
			/^[*-]\+ [0-9]\+\(,[0-9]\+\)\? [*-]\+$/b
			s,^[*][*][*] ,&a/,
			/^--- /{
				s,\(^--- \)\(./\)*,\1a/,
				s,[.-][Oo][Rr][Ii][Gg]\([	/]\),\1,
				s/[.-][Oo][Rr][Ii][Gg]$//
				s/[.]patched[.]\([^.]\)/.\1/
				h
			}
			/^+++ -/{
				g
				s/^--- a/+++ b/
				b
			}
			s,\(^+++ \)\(./\)*,\1b/,
		' "$p"
	done
	sed -i '/^patch_args=/d' $template
done
```
2021-06-20 13:17:29 +07:00

25 lines
892 B
Diff

--- a/audio/softsynth/fluidsynth.cpp
+++ b/audio/softsynth/fluidsynth.cpp
@@ -144,11 +144,11 @@
return p;
}
-static int SoundFontMemLoader_read(void *buf, int count, void *handle) {
+static int SoundFontMemLoader_read(void *buf, fluid_long_long_t count, void *handle) {
return ((Common::SeekableReadStream *) handle)->read(buf, count) == (uint32)count ? FLUID_OK : FLUID_FAILED;
}
-static int SoundFontMemLoader_seek(void *handle, long offset, int origin) {
+static int SoundFontMemLoader_seek(void *handle, fluid_long_long_t offset, int origin) {
return ((Common::SeekableReadStream *) handle)->seek(offset, origin) ? FLUID_OK : FLUID_FAILED;
}
@@ -157,7 +157,7 @@
return FLUID_OK;
}
-static long SoundFontMemLoader_tell(void *handle) {
+static fluid_long_long_t SoundFontMemLoader_tell(void *handle) {
return ((Common::SeekableReadStream *) handle)->pos();
}
#endif