Differences From Artifact [f9cb2ee264]:
- File src/tools.m — part of check-in [46c5779570] at 2025-03-20 21:52:26 on branch trunk — Convert more files to pure Objective-C (user: js, size: 409) [annotate] [blame] [check-ins using]
To Artifact [9fca1834ea]:
- File
src/tools.m
— part of check-in
[6b85eefc85]
at
2025-03-23 02:47:40
on branch trunk
— Remove loop[ijkl]
They confused clang-format a lot. (user: js, size: 455) [annotate] [blame] [check-ins using]
1 2 3 4 5 6 7 8 9 10 11 12 | // implementation of generic tools #include "tools.h" ///////////////////////// misc tools /////////////////////// void endianswap( void *memory, int stride, int length) // little indians as storage format { if (*((char *)&stride)) return; | < | > > | | | | > | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 | // implementation of generic tools #include "tools.h" ///////////////////////// misc tools /////////////////////// void endianswap( void *memory, int stride, int length) // little indians as storage format { if (*((char *)&stride)) return; for (int w = 0; w < length; w++) { for (int i = 0; i < stride / 2; i++) { uchar *p = (uchar *)memory + w * stride; uchar t = p[i]; p[i] = p[stride - i - 1]; p[stride - i - 1] = t; } } } |