Artifact f9cb2ee264226ffc1065a78da22fa611930c773d6baa10abc6bbdaff83cd1138:
- 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]
// 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; loop(w, length) loop(i, stride / 2) { uchar *p = (uchar *)memory + w * stride; uchar t = p[i]; p[i] = p[stride - i - 1]; p[stride - i - 1] = t; } }