Pull out inline function to make clang happy
Thanks @Janfel and @dosentmatter for reporting this. Fixes #14.
This commit is contained in:
parent
38db5de767
commit
a21247efe1
1 changed files with 11 additions and 11 deletions
22
lolcat.c
22
lolcat.c
|
|
@ -76,6 +76,17 @@ static void version(void)
|
|||
exit(0);
|
||||
}
|
||||
|
||||
static wint_t helpstr_hack(FILE * _ignored)
|
||||
{
|
||||
(void)_ignored;
|
||||
static size_t idx = 0;
|
||||
char c = helpstr[idx++];
|
||||
if (c)
|
||||
return c;
|
||||
idx = 0;
|
||||
return WEOF;
|
||||
}
|
||||
|
||||
int main(int argc, char** argv)
|
||||
{
|
||||
char* default_argv[] = { "-" };
|
||||
|
|
@ -138,17 +149,6 @@ int main(int argc, char** argv)
|
|||
FILE* f;
|
||||
int escape_state = 0;
|
||||
|
||||
wint_t helpstr_hack(FILE * _ignored)
|
||||
{
|
||||
(void)_ignored;
|
||||
static size_t idx = 0;
|
||||
char c = helpstr[idx++];
|
||||
if (c)
|
||||
return c;
|
||||
idx = 0;
|
||||
return WEOF;
|
||||
}
|
||||
|
||||
if (!strcmp(*filename, "--help")) {
|
||||
this_file_read_wchar = &helpstr_hack;
|
||||
f = 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue