6e3e439
Update russian.txt - gerdoe-jr
94b8b5d
Update brazilian_portuguese.txt - rffontenelle
9b2284d
Update traditional_chinese.txt - By622
93bc9ad
Merge pull request #7805 from gerdoe-jr/patch-3 - def-
93d5ea5
Merge pull request #7806 from rffontenelle/patch-3 - def-
a24d71e
Merge pull request #7807 from By622/patch-7 - def-dbg_dummies
#define CONF_DEBUG
in main.cpp, is dbg_dummies are now enabled ?#define CONF_DEBUG
in main.cpp, is dbg_dummies are now enabled ? #define CONF_DEBUG
in main.cpp, is dbg_dummies are now enabled ? %include 'functions.nasm'
section .data
msg db 'hey :smirk:', 0
section .text
global _start
_start:
pop rcx
nextArg:
cmp rcx, 0
jz noArgs
pop rax ;it uses rax as 1st argument. live with it
call println ;dat's my custom function, it works currectly
dec rcx
jmp nextArg
noArgs:
call quit
anyone have idea why it couldn't work _start:
mov rdi, [rsp] ; number of cli arguments
lea rsi, [rsp + 8] ; first arg (*path)
call main
; main(argc, argv)
; rdi, rsi
main:
call alloc_init
lea rdx, [str_buf]
mov rdi, 169
mov rsi, 16
call int_to_str
lea rdi, [str_buf]
mov rsi, rax
call println
mov rdi, rax
call exit
(edited)%include 'functions.nasm'
section .data
msg db 'hey :smirk:', 0
section .text
global _start
_start:
pop rcx
nextArg:
cmp rcx, 0
jz noArgs
pop rax ;it uses rax as 1st argument. live with it
push rcx
call println ;dat's my custom function, it works currectly
pop rcx
dec rcx
jmp nextArg
noArgs:
call quit
now works xdCMake Error at cmake/FindSSP.cmake:12 (message):
could not find ssp paths
Call Stack (most recent call first):
CMakeLists.txt:544 (find_package)
qemu-system-x86_64 -enable-kvm -drive file=disk.qcow,format=qcow2 -cdrom ubuntu-22.04.3-live-server-amd64.iso -m 8G -vga qxl
/lib/x86_64-linux-gnu/Scrt1.o
extern
by default, dunno why they were marked like that struct CAccount
{
char m_aUsername[NSkyb::MAXIMUM_USERNAME_LENGTH];
char m_aPassword[NSkyb::MAXIMUM_PASSWORD_LENGTH];
}m_Account;
bool ReadMoney(char *Username = m_Account.m_aUsername, char *Password = m_Account.m_aPassword);
warn::Ignore
if you don't like the parameterbuild-essentials
?#[cfg(target_os = "linux")]
{
let (scrt1, crti, crtn) = {
if file_exists("/usr/lib64/Scrt1.o") {
(
"/usr/lib64/Scrt1.o",
"/usr/lib64/crti.o",
"/usr/lib64/crtn.o",
)
} else {
(
"/lib/x86_64-linux-gnu/Scrt1.o",
"/lib/x86_64-linux-gnu/crti.o",
"/lib/x86_64-linux-gnu/crtn.o",
)
}
};
&[
"-pie",
"--hash-style=gnu",
"--eh-frame-hdr",
"--dynamic-linker",
"/lib64/ld-linux-x86-64.so.2",
"-m",
"elf_x86_64",
scrt1,
crti,
"-o",
&output_filename.display().to_string(),
"-L/lib64",
"-L/usr/lib64",
"-L/lib/x86_64-linux-gnu",
"-zrelro",
"--no-as-needed",
"-lc",
crtn,
&input_path.display().to_string(),
]
}
behold my hacky linker callsha256()
function you could use for thatif((bool)pointer == 1)
if((bool)pointer == 1)
if(!!pointer)
or if(pointer)
?warn::Ignore
if you don't like the parameter macro_rules! warn_if {
($cond:expr, $($args: tt)*) => {
if cfg!(feature = "warn_debug_assert") {
debug_assert!($cond, $($args)*);
}
else {
if !$cond {
println!($($args)*); // log::warn!($($args)*);
}
}
}
}
fn main() {
warn_if!("ddnet" == "5991", "{} is {}", "something", "wrong");
}
macro_rules! warn_if {
($cond:expr, $($args: tt)*) => {
if cfg!(feature = "warn_debug_assert") {
debug_assert!($cond, $($args)*);
}
else {
if !$cond {
println!($($args)*); // log::warn!($($args)*);
}
}
}
}
fn main() {
warn_if!("ddnet" == "5991", "{} is {}", "something", "wrong");
}
1dc8496
Use curl-multi - Learath2
d847b0f
Fix double request, fix merge error - Learath2
1f22434
Format and bump fake curl - Learath2
9b3ebf3
Remove debug statement, fix CI - Learath2
32e9683
Fix lots of weirdness in updater - Learath2
6eb5123
Fix some clang-tidy issues and UB - Learath2
bcf86d8
Fix CRegister - Learath2
f591034
Fix CI - Learath2
bb3bd57
Merge pull request #7683 from Learath2/dd_pr_curlmultifinal - heinrich5991 json_value *dPlayerStats = pStatsDest->m_pGetStatsDDNet->ResultJson();
if(!dPlayerStats)
{
dbg_msg("stats", "Invalid JSON received");
return;
}
json_value &dPlayerStat = *dPlayerStats;
const json_value &ddrPlayer = dPlayerStat["player"];
str_copy(pStatsDest->dPlayer, ddrPlayer);
//get rank lead
const json_value &PointCategoryDDR = dPlayerStat["points"];
const json_value &CurrentPRank = PointCategoryDDR["rank"];
pStatsDest->PointCategoryDDR = CurrentPRank.u.integer;//Rank ddnet
pStatsDest->StatsParsed = true;
(edited)ResultJson()
?json_value *CHttpRequest::ResultJson() const
{
unsigned char *pResult;
size_t ResultLength;
Result(&pResult, &ResultLength);
if(!pResult)
{
return nullptr;
}
return json_parse((char *)pResult, ResultLength);
}
Result()
?Result(&pResult, &ResultLength);
void CHttpRequest::Result(unsigned char **ppResult, size_t *pResultLength) const
{
if(m_WriteToFile || State() != HTTP_DONE)
{
*ppResult = nullptr;
*pResultLength = 0;
return;
}
*ppResult = m_pBuffer;
*pResultLength = m_ResponseLength;
}
void CStats::FetchPlayer(CStatsPlayer *pStatsDest, const char *pPlayer)
{
char aUrl_DDStats[256];
char aUrl_DDNet[256];
char aEscapedName[MAX_NAME_LENGTH];
EscapeUrl(aEscapedName, sizeof(aEscapedName), pPlayer);
str_format(aUrl_DDStats, sizeof(aUrl_DDStats), "%s%s", STATS_URL_DDSTATS, aEscapedName);
pStatsDest->m_pGetStatsDDStats = HttpGet(aUrl_DDStats);
str_format(aUrl_DDNet, sizeof(aUrl_DDNet), "%s%s", STATS_URL_DDNET, aEscapedName);
pStatsDest->m_pGetStatsDDNet = HttpGet(aUrl_DDNet);
// 10 seconds connection timeout, lower than 8KB/s for 10 seconds to fail.
pStatsDest->m_pGetStatsDDStats->Timeout(CTimeout{10000, 0, 8000, 10});
Engine()->AddJob(pStatsDest->m_pGetStatsDDStats);
pStatsDest->m_pGetStatsDDNet->Timeout(CTimeout{10000, 0, 8000, 10});
Engine()->AddJob(pStatsDest->m_pGetStatsDDNet);
pStatsDest->StatsParsed = false;
}
static constexpr const char *STATS_URL_DDSTATS = "https://ddstats.qwik.space/player/json?player=";
static constexpr const char *STATS_URL_DDNET = "https://ddnet.org/players/?json2=";
class CStatsPlayer
{
public:
std::shared_ptr<CHttpRequest> m_pGetStatsDDStats; // profile and player stats
std::shared_ptr<CHttpRequest> m_pGetStatsDDNet; // map tracking
char aPlayer[MAX_NAME_LENGTH];
int Points;
bool StatsParsed = false;
int timestamp;
char aMap[11][MOST_PLAYED_LENGTH];
float aTime[11];
int RankPoints;
//DDNet
char dPlayer[MAX_NAME_LENGTH];
int PointCategoryDDR;
};