mirror of
https://forge.fsky.io/lda/Parsee.git
synced 2026-03-13 13:45:10 +00:00
[MOD] Try to make Parsee work with TCC
This commit is contained in:
parent
fb511b4df0
commit
54c5331835
3 changed files with 13 additions and 2 deletions
|
|
@ -49,7 +49,7 @@ CommandParse(char *cmd)
|
||||||
char c = *cur;
|
char c = *cur;
|
||||||
char *tmp;
|
char *tmp;
|
||||||
bool type;
|
bool type;
|
||||||
char char_type;
|
char char_type = '\0';
|
||||||
switch (state)
|
switch (state)
|
||||||
{
|
{
|
||||||
case STATE_WHITE:
|
case STATE_WHITE:
|
||||||
|
|
|
||||||
|
|
@ -37,7 +37,9 @@ XMPPifyElement(HashMap *event, XMLElement *elem, XMPPFlags flags)
|
||||||
size_t len = strp ? strlen(strp) : 0; \
|
size_t len = strp ? strlen(strp) : 0; \
|
||||||
for (cidx = 0; cidx < len; cidx++) \
|
for (cidx = 0; cidx < len; cidx++) \
|
||||||
{ \
|
{ \
|
||||||
char cch[2] = { strp[cidx], 0 }; \
|
char cch[2]; \
|
||||||
|
cch[0] = strp[cidx]; \
|
||||||
|
cch[1] = '\0'; \
|
||||||
char nch = *cch ? strp[cidx+1] : '\0'; \
|
char nch = *cch ? strp[cidx+1] : '\0'; \
|
||||||
bool c = *cch == '\n' && nch != '>'; \
|
bool c = *cch == '\n' && nch != '>'; \
|
||||||
if (c && flags.quote) \
|
if (c && flags.quote) \
|
||||||
|
|
|
||||||
|
|
@ -33,6 +33,15 @@ XMPPInitialiseCompStream(char *host, int port)
|
||||||
hints.ai_family = AF_UNSPEC;
|
hints.ai_family = AF_UNSPEC;
|
||||||
hints.ai_socktype = SOCK_STREAM;
|
hints.ai_socktype = SOCK_STREAM;
|
||||||
error = getaddrinfo(host, serv, &hints, &res0);
|
error = getaddrinfo(host, serv, &hints, &res0);
|
||||||
|
if (error)
|
||||||
|
{
|
||||||
|
const char *error_str = gai_strerror(error);
|
||||||
|
Log(LOG_ERR,
|
||||||
|
"%s: cannot connect to '%s': %s", __func__,
|
||||||
|
host, error_str
|
||||||
|
);
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
|
|
||||||
for (res = res0; res; res = res->ai_next)
|
for (res = res0; res; res = res->ai_next)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue