Skip to main content
41 events
when toggle format what by license comment
Mar 2, 2023 at 13:26 vote accept mortytheshorty
Feb 27, 2023 at 7:57 history edited Madagascar CC BY-SA 4.0
added 272 characters in body
Feb 26, 2023 at 17:43 history edited Madagascar CC BY-SA 4.0
added 1 character in body
Feb 25, 2023 at 19:22 history edited Madagascar CC BY-SA 4.0
added 353 characters in body
Feb 25, 2023 at 17:20 history edited Madagascar CC BY-SA 4.0
added 267 characters in body
Feb 25, 2023 at 17:05 history edited Madagascar CC BY-SA 4.0
added 791 characters in body
Feb 25, 2023 at 17:00 history edited Madagascar CC BY-SA 4.0
added 791 characters in body
Feb 25, 2023 at 15:55 comment added mortytheshorty The return value of strncpy_s is discarded also true. I did not use it correctly but I remove it anyway. I splitted the code into multiple functions and the host parser function is writing to a destination pointer while parsing it.
Feb 25, 2023 at 15:52 comment added mortytheshorty Implementation doesn't match documentation: yep you're right. I want to support unix sockets etc but did not use them so I added a note now that these other three will be implementet soon if I know how to use them properly.
Feb 25, 2023 at 10:36 history edited Madagascar CC BY-SA 4.0
added 325 characters in body
Feb 25, 2023 at 10:28 history edited Madagascar CC BY-SA 4.0
added 14 characters in body
Feb 25, 2023 at 10:20 history edited Madagascar CC BY-SA 4.0
deleted 1 character in body
Feb 25, 2023 at 10:13 history edited Madagascar CC BY-SA 4.0
deleted 1 character in body
Feb 25, 2023 at 10:05 history edited Madagascar CC BY-SA 4.0
added 33 characters in body
Feb 25, 2023 at 9:58 history edited Madagascar CC BY-SA 4.0
added 4 characters in body
Feb 25, 2023 at 9:52 history edited Madagascar CC BY-SA 4.0
added 163 characters in body
Feb 25, 2023 at 6:39 history edited Madagascar CC BY-SA 4.0
added 211 characters in body
Feb 25, 2023 at 6:07 history edited Madagascar CC BY-SA 4.0
added 211 characters in body
Feb 25, 2023 at 6:01 history edited Madagascar CC BY-SA 4.0
added 1020 characters in body
Feb 25, 2023 at 5:50 history edited Madagascar CC BY-SA 4.0
added 426 characters in body
Feb 25, 2023 at 5:44 history edited Madagascar CC BY-SA 4.0
added 426 characters in body
Feb 25, 2023 at 5:38 history edited Madagascar CC BY-SA 4.0
added 390 characters in body
Feb 25, 2023 at 4:03 comment added Madagascar 1) It means that *addr->addr is parsed as *(addr->addr), and not as (*addr)->addr. But I believe that's intentional, I didn't check. 2) You can post a follow-up question in some time.
Feb 25, 2023 at 2:21 comment added mortytheshorty @TobySpeight what do you mean by -> binds more tightly than *. ? And should I upload the things I changed? If so then, exchange the current source code with the new one? Or just upload the changed parts?
Feb 24, 2023 at 17:12 history edited Madagascar CC BY-SA 4.0
added 426 characters in body
Feb 24, 2023 at 16:58 history edited Madagascar CC BY-SA 4.0
added 395 characters in body
Feb 24, 2023 at 16:47 history edited Madagascar CC BY-SA 4.0
added 431 characters in body
Feb 24, 2023 at 14:52 history edited Toby Speight CC BY-SA 4.0
Clearer that sample is incomplete
Feb 24, 2023 at 14:51 comment added Toby Speight Simpler is to just switch pointers to a handy null char when we see the delimiter: const char end[] = "\0\0"; while (*s1 || *s2) { if (*s1 == delim) s1 = end; if (*s2 == delim) s2 = end; if (*s1++ != *s2++) return false; } return true;
Feb 24, 2023 at 14:17 comment added mortytheshorty but I dont agree to your simplification while(*str1 == delim) because it will only be true if the string is filled only with the delim or am I completly wrong?
Feb 24, 2023 at 14:15 comment added mortytheshorty @TobySpeight I thought I need a logical xor but it must not overflow str1 and str2 so would'nt I need to check for while(*str1 != delim && (*str1 != '\0' && *str2 != '\0') then compare if *str1 != *str2 and break if true and then return true if *str1 == *str2 else false? because thats what the functions is for. i agree to your first shortening if we check str1 AND str2 for NULL otherwise if the delimiter in str1 is behind the length of str2 it will overflow?
Feb 24, 2023 at 13:35 history edited Madagascar CC BY-SA 4.0
added 59 characters in body
Feb 24, 2023 at 13:32 comment added Toby Speight All those !(a != b) simplify to a == b, too.
Feb 24, 2023 at 13:31 history edited Toby Speight CC BY-SA 4.0
No need to alternate `? true : false` or similar
Feb 24, 2023 at 13:26 history edited Madagascar CC BY-SA 4.0
added 3 characters in body
Feb 24, 2023 at 13:20 history edited Madagascar CC BY-SA 4.0
added 2 characters in body
Feb 24, 2023 at 13:14 history edited Madagascar CC BY-SA 4.0
added 37 characters in body
Feb 24, 2023 at 13:12 comment added pacmaninbw It's true that almost all optimizing compilers do produce more optimal code that human coders, but there are times when optimization can't be used. I agree the use of register is generally obsolete, it can help in very rare cases, but this isn't one of them.
Feb 24, 2023 at 13:09 history edited Madagascar CC BY-SA 4.0
added 64 characters in body
Feb 24, 2023 at 13:02 history edited Madagascar CC BY-SA 4.0
added 64 characters in body
Feb 24, 2023 at 12:55 history answered Madagascar CC BY-SA 4.0