From a376716bda54f4dc9b87fc2c2077bff77bca7cc8 Mon Sep 17 00:00:00 2001
From: sezero <[EMAIL REDACTED]>
Date: Thu, 31 Jul 2025 05:56:10 +0300
Subject: [PATCH] readsbk.c: constify a few things.
---
src/timidity/readsbk.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/src/timidity/readsbk.c b/src/timidity/readsbk.c
index 34f0c44f..4310176c 100644
--- a/src/timidity/readsbk.c
+++ b/src/timidity/readsbk.c
@@ -62,7 +62,7 @@ static int READSTR(char *str, SDL_IOStream *io)
#define SKIPW(io) SDL_SeekIO(io, 2, SDL_IO_SEEK_CUR);
#define SKIPDW(io) SDL_SeekIO(io, 4, SDL_IO_SEEK_CUR);
-static int getchunk(char *id);
+static int getchunk(const char *id);
static void process_chunk(int id, int s, SFInfo *sf, SDL_IOStream *io);
static void load_sample_names(int size, SFInfo *sf, SDL_IOStream *io);
static void load_preset_header(int size, SFInfo *sf, SDL_IOStream *io);
@@ -95,19 +95,19 @@ enum {
*----------------------------------------------------------------*/
#if 0
-static void debugid(char *tag, char *p)
+static void debugid(const char *tag, const char *p)
{
char buf[5]; SDL_strlcpy(buf, p, 5);
SDL_Log("[%s:%s]", tag, buf);
}
-static void debugname(char *tag, char *p)
+static void debugname(const char *tag, const char *p)
{
char buf[21]; SDL_strlcpy(buf, p, 21);
SDL_Log("[%s:%s]", tag, buf);
}
-static void debugval(char *tag, int v)
+static void debugval(const char *tag, int v)
{
SDL_Log("[%s:%d]", tag, v);
}
@@ -168,10 +168,10 @@ void free_sbk(SFInfo *sf)
* get id value
*----------------------------------------------------------------*/
-static int getchunk(char *id)
+static int getchunk(const char *id)
{
static struct idstring {
- char *str;
+ const char *str;
int id;
} idlist[] = {
{"LIST", LIST_ID},