Category : porting

I’m trying to compile an Android project on Linux, abstracting away the hardware parts. Consider the following line: int keyNumRepeat = userInputPrev.substring(6, 8).toInt(); It looks like Arduino uses some non-standard library, which isn’t on my system: hsldz_totp_lock/hsldz_totp_lock.ino:335:38: error: ‘String’ {aka ‘class std::__cxx11::basic_string<char>’} has no member named ‘substring’; did you mean ‘substr’? 335 | int keyNumRepeat ..

Read more

I am porting some Linux code to Windows that uses lockf() static string load_bulletin_from_file(const char* cache_filename) { int fd = open(cache_filename, O_RDWR); // lockf requires O_RDWR if (fd == -1) { etiLog.level(error) << "TAI-UTC bulletin open cache for reading: " << strerror(errno); return ""; } lseek(fd, 0, SEEK_SET); vector<char> buf(1024); vector<char> new_bulletin_data; ssize_t ret = ..

Read more

I am making a tool for my Remarkable Tablet in C# and I have ported this https://github.com/ax3l/lines-are-beautiful/blob/develop/include/rmlab/renderer/lines2svg.cpp to C# https://github.com/furesoft/Slithin/blob/main/Source/Core/Remarkable/LinesAreBeatiful/Exporters/SvgExporter.cs The problem is that the result is nonsense and I can’t figure out where the problem is Source: Windows Que..

Read more

I’m working on a GGPO port and have come across a section of code in the udp_proto class. The code is a function call named: Platform::GetConfigInt("ggpo.network.delay"); Which expands into this function: int Platform::GetConfigInt(const char* name) { char buf[1024]; if (GetEnvironmentVariable(name, buf, ARRAY_SIZE(buf)) == 0) { return 0; } return atoi(buf); } So I’ve got an ..

Read more