mirror of
https://github.com/profanity-im/profanity.git
synced 2024-06-09 21:30:42 +00:00
Compare commits
3 Commits
0c3dbbd9cd
...
df24ed474e
Author | SHA1 | Date | |
---|---|---|---|
|
df24ed474e | ||
|
6b9d0e8647 | ||
|
bccfad3de2 |
|
@ -361,8 +361,19 @@ find_closest_col(int h, int s, int l)
|
||||||
static int
|
static int
|
||||||
find_col(const char* col_name, int n)
|
find_col(const char* col_name, int n)
|
||||||
{
|
{
|
||||||
|
char* endptr;
|
||||||
|
unsigned long col_value = strtoul(col_name, &endptr, 0);
|
||||||
char name[32] = { 0 };
|
char name[32] = { 0 };
|
||||||
|
|
||||||
|
/*
|
||||||
|
* When the col_name is a uint8, then we don’t need to look up by
|
||||||
|
* color name (which is problematic given the duplicate names)
|
||||||
|
*/
|
||||||
|
|
||||||
|
if ((*endptr == '\0' || *endptr == '\n') && col_value <= UINT8_MAX) {
|
||||||
|
return (int)col_value;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* make a null terminated version of col_name. we don't want to
|
* make a null terminated version of col_name. we don't want to
|
||||||
* use strNcasecmp because we could end up matching blue3 with
|
* use strNcasecmp because we could end up matching blue3 with
|
||||||
|
|
|
@ -16,7 +16,7 @@ accounts_close(void)
|
||||||
}
|
}
|
||||||
|
|
||||||
char*
|
char*
|
||||||
accounts_find_all(char* prefix)
|
accounts_find_all(const char* const prefix, gboolean previous, void* context)
|
||||||
{
|
{
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user