mirror of
https://forge.fsky.io/lda/Parsee.git
synced 2026-03-13 19:55:10 +00:00
[FIX] Make codebase *slightly* NetBSD-friendly
I need to make it so that NetBSD targets get their own correctness/build checks in CI. I also had to do some hacks with Cytoplasm, will make a PR for those soon.
This commit is contained in:
parent
44d6df3be8
commit
b0cf0961a3
13 changed files with 35 additions and 25 deletions
|
|
@ -73,7 +73,7 @@ ASBan(const ParseeConfig *conf, char *id, char *banned)
|
|||
Free(path);
|
||||
json = HashMapCreate();
|
||||
HashMapSet(json, "user_id", JsonValueString(banned));
|
||||
HashMapSet(json, "reason", JsonValueString("Parsee felt jealous."));
|
||||
HashMapSet(json, "reason", JsonValueString(NAME " felt jealous."));
|
||||
ASAuthenticateRequest(conf, ctx);
|
||||
ParseeSetRequestJSON(ctx, json);
|
||||
|
||||
|
|
@ -108,7 +108,7 @@ ASKick(const ParseeConfig *conf, char *id, char *banned)
|
|||
Free(path);
|
||||
json = HashMapCreate();
|
||||
HashMapSet(json, "user_id", JsonValueString(banned));
|
||||
HashMapSet(json, "reason", JsonValueString("Parsee felt jealous."));
|
||||
HashMapSet(json, "reason", JsonValueString(NAME " felt jealous."));
|
||||
ASAuthenticateRequest(conf, ctx);
|
||||
ParseeSetRequestJSON(ctx, json);
|
||||
|
||||
|
|
|
|||
|
|
@ -53,7 +53,7 @@ CommandParse(char *cmd)
|
|||
switch (state)
|
||||
{
|
||||
case STATE_WHITE:
|
||||
if (!isblank(c))
|
||||
if (!isblank((int) c))
|
||||
{
|
||||
state = STATE_NAME;
|
||||
namestart = cur;
|
||||
|
|
@ -84,7 +84,7 @@ CommandParse(char *cmd)
|
|||
{
|
||||
char c = *cur;
|
||||
char cb[2] = { c, '\0' };
|
||||
if ((type && c == char_type) || (!type && isblank(c)))
|
||||
if ((type && c == char_type) || (!type && isblank((int) c)))
|
||||
{
|
||||
break;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -80,7 +80,7 @@ Main(Array *args, HashMap *env)
|
|||
);
|
||||
ParseePrintASCII();
|
||||
Log(LOG_INFO, "=======================");
|
||||
Log(LOG_INFO, "(C)opyright 2024 LDA");
|
||||
Log(LOG_INFO, "(C)opyright 2024 LDA and other contributors");
|
||||
Log(LOG_INFO, "(This program is free software, see LICENSE.)");
|
||||
|
||||
#ifdef PLATFORM_IPHONE
|
||||
|
|
|
|||
|
|
@ -12,8 +12,6 @@
|
|||
#include <Matrix.h>
|
||||
#include <AS.h>
|
||||
|
||||
#include <ctype.h>
|
||||
|
||||
static const char *
|
||||
GetXMPPInformation(ParseeData *data, HashMap *event, char **from, char **to);
|
||||
|
||||
|
|
|
|||
|
|
@ -165,7 +165,7 @@ ParseeEncodeJID(const ParseeConfig *c, char *jid, bool trim)
|
|||
/* RID: Break everything and die. */
|
||||
break;
|
||||
}
|
||||
if (islower(*cs) || isalnum(*cs) || *cs == '_' ||
|
||||
if (islower((int) *cs) || isalnum((int) *cs) || *cs == '_' ||
|
||||
*cs == '=' || *cs == '-' || *cs == '/' ||
|
||||
*cs == '+' || *cs == '.')
|
||||
{
|
||||
|
|
|
|||
|
|
@ -7,7 +7,6 @@
|
|||
#include <stdbool.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <ctype.h>
|
||||
|
||||
char **
|
||||
StrSplitLines(char *text)
|
||||
|
|
|
|||
|
|
@ -87,7 +87,7 @@ DecodeQuote(StringRect rect, size_t *skip)
|
|||
* > four but that's for Nerds
|
||||
* > seasons See, Touhou reference!
|
||||
* concealing!) */
|
||||
while ((ch = StrGet(&rect, lines - 1, shift_by)) && isspace(ch))
|
||||
while ((ch = StrGet(&rect, lines - 1, shift_by)) && isspace((int) ch))
|
||||
{
|
||||
shift_by++;
|
||||
}
|
||||
|
|
@ -132,7 +132,7 @@ DecodeSpan(StringRect rect, char del, size_t *skip)
|
|||
{
|
||||
return StrFullRect(NULL);
|
||||
}
|
||||
if (!ret.source_lines && isspace(c))
|
||||
if (!ret.source_lines && isspace((int) c))
|
||||
{
|
||||
return StrFullRect(NULL);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -337,8 +337,8 @@ seekback:
|
|||
return ret;
|
||||
}
|
||||
|
||||
#define IsNamestart(c) ((c == ':') || isalpha(c) || (c == '_'))
|
||||
#define IsNamepart(c) (IsNamestart(c) || (c == '-') || isdigit(c))
|
||||
#define IsNamestart(c) ((c == ':') || isalpha((int) c) || (c == '_'))
|
||||
#define IsNamepart(c) (IsNamestart(c) || (c == '-') || isdigit((int) c))
|
||||
static char *
|
||||
XMLParseName(XMLexer *lexer)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@
|
|||
#include <pthread.h>
|
||||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <ctype.h>
|
||||
#include <errno.h>
|
||||
#include <time.h>
|
||||
|
||||
|
|
|
|||
|
|
@ -32,7 +32,7 @@ TrimBase64(char *b64)
|
|||
while (*b64)
|
||||
{
|
||||
char ch[2] = { *b64, 0 };
|
||||
if (isspace(*b64))
|
||||
if (isspace((int) *b64))
|
||||
{
|
||||
b64++;
|
||||
continue;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue