mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-19 04:20:27 +01:00
util: Added 'const' attribute to function parameters
This commit is contained in:
committed by
Carlos R. Mafra
parent
d44aa97243
commit
5d03c455fc
@@ -30,7 +30,7 @@ enum {
|
||||
CHARSET_ENCODING
|
||||
};
|
||||
|
||||
static int countChar(char *str, char c)
|
||||
static int countChar(const char *str, char c)
|
||||
{
|
||||
int count = 0;
|
||||
|
||||
@@ -47,17 +47,17 @@ static int countChar(char *str, char c)
|
||||
}
|
||||
|
||||
typedef struct str {
|
||||
char *str;
|
||||
const char *str;
|
||||
int len;
|
||||
} str;
|
||||
|
||||
#define XLFD_TOKENS 14
|
||||
|
||||
static str *getXLFDTokens(char *xlfd)
|
||||
static str *getXLFDTokens(const char *xlfd)
|
||||
{
|
||||
static str tokens[XLFD_TOKENS];
|
||||
int i, len, size;
|
||||
char *ptr;
|
||||
const char *ptr;
|
||||
|
||||
/* XXX: why does this assume there can't ever be XFNextPrefix? */
|
||||
if (!xlfd || *xlfd != '-' || countChar(xlfd, '-') != XLFD_TOKENS)
|
||||
@@ -135,7 +135,7 @@ static char *mapSlantToName(str * slant)
|
||||
}
|
||||
}
|
||||
|
||||
char *xlfdToFc(char *xlfd, char *useFamily, Bool keepXLFD)
|
||||
char *xlfdToFc(const char *xlfd, const char *useFamily, Bool keepXLFD)
|
||||
{
|
||||
str *tokens, *family, *weight, *slant;
|
||||
char *name, buf[64];
|
||||
|
||||
Reference in New Issue
Block a user