mirror of
https://github.com/Ed94/metadesk.git
synced 2026-08-06 15:48:47 +00:00
use strtoll instead of atoll
This commit is contained in:
+5
-5
@@ -478,7 +478,7 @@ MD_I64FromString(MD_String8 string)
|
|||||||
{
|
{
|
||||||
char str[64];
|
char str[64];
|
||||||
_MD_WriteStringToBuffer(string, sizeof(str), str);
|
_MD_WriteStringToBuffer(string, sizeof(str), str);
|
||||||
return atoll(str);
|
return strtoll(str, 0, 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
MD_FUNCTION_IMPL MD_f64
|
MD_FUNCTION_IMPL MD_f64
|
||||||
@@ -1199,7 +1199,7 @@ MD_Parse_LexNext(MD_ParseCtx *ctx)
|
|||||||
{
|
{
|
||||||
skip_n = chop_n = 1;
|
skip_n = chop_n = 1;
|
||||||
at += 1;
|
at += 1;
|
||||||
|
|
||||||
// NOTE(mal): Minimal escaping. Treats \\ and \" as atoms. Returns the unescaped string.
|
// NOTE(mal): Minimal escaping. Treats \\ and \" as atoms. Returns the unescaped string.
|
||||||
while(at < one_past_last)
|
while(at < one_past_last)
|
||||||
{
|
{
|
||||||
@@ -1207,7 +1207,7 @@ MD_Parse_LexNext(MD_ParseCtx *ctx)
|
|||||||
else if(at[0] == '\\' && at + 1 < one_past_last && (at[1] == '"' || at[1] == '\\')) at += 2;
|
else if(at[0] == '\\' && at + 1 < one_past_last && (at[1] == '"' || at[1] == '\\')) at += 2;
|
||||||
else at += 1;
|
else at += 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (*at == '"') at += 1;
|
if (*at == '"') at += 1;
|
||||||
}
|
}
|
||||||
}break;
|
}break;
|
||||||
@@ -1227,7 +1227,7 @@ MD_Parse_LexNext(MD_ParseCtx *ctx)
|
|||||||
token.kind = MD_TokenKind_CharLiteral;
|
token.kind = MD_TokenKind_CharLiteral;
|
||||||
skip_n = chop_n = 1;
|
skip_n = chop_n = 1;
|
||||||
at += 1;
|
at += 1;
|
||||||
|
|
||||||
// NOTE(mal): Minimal escaping. Treats \\ \' as atoms. Returns the unescaped string.
|
// NOTE(mal): Minimal escaping. Treats \\ \' as atoms. Returns the unescaped string.
|
||||||
while(at < one_past_last)
|
while(at < one_past_last)
|
||||||
{
|
{
|
||||||
@@ -1235,7 +1235,7 @@ MD_Parse_LexNext(MD_ParseCtx *ctx)
|
|||||||
else if(at[0] == '\\' && at + 1 < one_past_last && (at[1] == '\'' || at[1] == '\\')) at += 2;
|
else if(at[0] == '\\' && at + 1 < one_past_last && (at[1] == '\'' || at[1] == '\\')) at += 2;
|
||||||
else at += 1;
|
else at += 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (*at == '\'') at += 1;
|
if (*at == '\'') at += 1;
|
||||||
}
|
}
|
||||||
}break;
|
}break;
|
||||||
|
|||||||
Reference in New Issue
Block a user