Timeline for Portable integer to/from little endian conversion in C
Current License: CC BY-SA 4.0
12 events
| when toggle format | what | by | license | comment | |
|---|---|---|---|---|---|
| Jan 23, 2023 at 21:18 | comment | added | Toby Speight |
Yes, that's why I wrote to/from - either way, those conversions are big-endian, and this is for little-endian. (E.g. on a big-endian platform, the htons family perform no conversion - the opposite of what's wanted here).
|
|
| Sep 29, 2022 at 18:00 | history | tweeted | twitter.com/StackCodeReview/status/1575545968145141802 | ||
| Sep 28, 2022 at 23:40 | comment | added | Reinderien | @TobySpeight I should have been more specific, but when I said family I meant to include inverses of those functions, i.e. ntohs. | |
| Sep 28, 2022 at 22:48 | vote | accept | CPlus | ||
| Sep 28, 2022 at 22:35 | answer | added | chux | timeline score: 4 | |
| Sep 28, 2022 at 10:59 | comment | added | Toby Speight | Or perhaps you were saying that's a good model to follow for the interface here (including the names)? I agree with you there. | |
| Sep 28, 2022 at 8:23 | comment | added | Toby Speight |
@Reinderien, this code is converting to little-endian format, whereas the htons family convert to/from big-endian.
|
|
| Sep 27, 2022 at 23:19 | history | edited | 200_success | CC BY-SA 4.0 |
edited tags
|
| Sep 27, 2022 at 22:25 | comment | added | Reinderien |
Are you aware of htons and friends ?
|
|
| Sep 27, 2022 at 20:57 | history | edited | CPlus | CC BY-SA 4.0 |
Edited code
|
| S Sep 27, 2022 at 20:20 | review | First questions | |||
| Sep 27, 2022 at 22:16 | |||||
| S Sep 27, 2022 at 20:20 | history | asked | CPlus | CC BY-SA 4.0 |