clean up trailing whitespace

This commit is contained in:
dzaima 2025-07-13 17:48:21 +03:00
parent 11d0157207
commit c1b8c06bb4
11 changed files with 22 additions and 22 deletions

View File

@ -185,7 +185,7 @@ NOINLINE B toKCells(B x, ur k) {
B r;
if (cam==0) {
r = empty_frame(xsh, k);
r = empty_frame(xsh, k);
} else {
S_KSLICES(x, xsh, k, cam, 1)
M_HARR(r, cam)

View File

@ -219,7 +219,7 @@ B fold_c1(Md1D* d, B x) { B f = d->f;
u64* xp = bitany_ptr(x);
f64 r;
switch (rtid) { default: goto base;
case n_mul:
case n_mul:
case n_and:case n_floor: r = bit_has (xp, ia, 0) ^ 1; break;
case n_or: case n_ceil: r = bit_has (xp, ia, 1); break;
case n_add: r = bit_sum (xp, ia); break;

View File

@ -1219,12 +1219,12 @@ static i32 sh_core(bool raw, B x, usz xia, B inObj, u64 iLen, B* s_outp, B* s_er
if (iLen>0) { if (raw) free_chars(iBufRaw); else TFREE(iBuf); } // FREE_INPUT
TSFREE(arg);
if (dwResult != ERROR_SUCCESS) {
thrF("•SH: Failed to run command: %S", winErrorEx(dwResult));
thrF("•SH: Failed to run command: %S", winErrorEx(dwResult));
}
// prepare output
u8* op; *s_outp = m_c8arrv(&op, oLen);
u8* ep; *s_errp = m_c8arrv(&ep, eLen);
u8* op; *s_outp = m_c8arrv(&op, oLen);
u8* ep; *s_errp = m_c8arrv(&ep, eLen);
if (oBuf!=NULL) { memcpy(op, oBuf, oLen*sizeof(char)); free(oBuf); }
if (eBuf!=NULL) { memcpy(ep, eBuf, eLen*sizeof(char)); free(eBuf); }
return (i32)code;

View File

@ -102,7 +102,7 @@ Arr* join_cells(B w, B x, ur k) { // consumes w,x; join k-cells, 𝕨 ∾○⥊
u8 xe = TI(x,elType);
u8 re = we==xe? we : el_or(we, xe);
if (0) { goto to_equal_types; to_equal_types:;
if (0) { goto to_equal_types; to_equal_types:;
// delay doing this until it's known that there will be code that can utilize it
if (re!=we) w = toEltypeArr(w, re).obj;
if (re!=xe) x = toEltypeArr(x, re).obj;

View File

@ -725,7 +725,7 @@ static void genObj_writePtr(void* res, B c, B expEl, B* sourceObjs) {
if (!ty_equal(ptrh_type(h), expEl)) thrF("FFI: Pointer object type isn't compatible with argument type");
#endif
*(void**)res = ptrh_ptr(h);
if (sourceObjs!=NULL) *sourceObjs = vec_addN(*sourceObjs, incG(c));
if (sourceObjs!=NULL) *sourceObjs = vec_addN(*sourceObjs, incG(c));
}
void genObj(B o, B c, void* ptr, B* sourceObjs) { // doesn't consume
if (isC32(o)) { // scalar

View File

@ -188,7 +188,7 @@ def extract_column_modperm{x0, r0, nv, l, el, vl} = {
if (p2 == 0) {
loop{{r, i, write} => write{swap_ms{r}}}
} else {
# Store results
# Store results
def add_res = {
ra := V**0 # Accumulator
i := make{V, iota{vl}%16}
@ -276,7 +276,7 @@ def fold_rows_bit_lt64{
def ss = 1<<iota{5}
def ms = tail{64} / (1 + 1<<ss)
fold{step, ., each{tup, ms, ss}}
}
}
run_loop2{{op} => loop_T{u32, {x} => extract{op{x, x>>1}}}}
} else if (l == 4) {
m:u64 = 64w2b0001; t := m<<3

View File

@ -775,6 +775,6 @@ fn scan_stride_bool_assoc{op}(x:*u64, r:*u64, nl:usz, l:usz) : void = {
}
}
export_tab{
'si_scan_bool_stride',
'si_scan_bool_stride',
each{scan_stride_bool_assoc, tup{|, &, ^}}
}

View File

@ -20,7 +20,7 @@
#define toOsStr toCStr
#define freeOsStr freeCStr
#define OsStrDecode0 utf8Decode0
#else
#else
typedef WCHAR* OsStr;
#define OS_C(C) L##C
#define toOsStr toWStr
@ -373,7 +373,7 @@ B mmap_file(B path) {
WCHAR* p = toWStr(path);
dec(path);
HANDLE hFile = CreateFileW(
p, GENERIC_READ, FILE_SHARE_READ|FILE_SHARE_WRITE|FILE_SHARE_DELETE, NULL,
p, GENERIC_READ, FILE_SHARE_READ|FILE_SHARE_WRITE|FILE_SHARE_DELETE, NULL,
OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
freeWStr(p);
if (hFile==INVALID_HANDLE_VALUE) thrF("Failed to open file: %S", winError());
@ -388,7 +388,7 @@ B mmap_file(B path) {
if (hMapFile==INVALID_HANDLE_VALUE) {
CloseHandle(hFile);
thrF("Failed to create file mapping: %S", winError());
}
}
u8* arr_data = MapViewOfFile(hMapFile, FILE_MAP_READ, 0, 0, 0);
// TODO should ensure ALLOC_PADDING padding around allocated memory
if (arr_data==NULL) {

View File

@ -405,7 +405,7 @@ DEF_G(void, copy, B, (void* a, usz ms, B x, usz xs, usz l), ms, x, x
#define COPY0_TO(WHERE, RE, MS, X, XE, LEN) copyFns[el_##RE](WHERE, MS, X, 0, LEN)
void basic_copy_bit_bit(void* rp, void* xp, u64 len) { bit_cpyN(rp, 0, xp, 0, len); }
#define BASIC_COPY_BIT_NUM(XE)
#define BASIC_COPY_BIT_NUM(XE)
#define BASIC_COPY_NUM(RE, XE) void basic_copy_##XE##_##RE(void* rp, void* xp, u64 len) { vfor (ux i = 0; i < len; i++) ((RE*)rp)[i] = ((XE*)xp)[i]; }
#define BASIC_COPY_NUM_ROW(RE) BASIC_COPY_NUM(RE, i8) BASIC_COPY_NUM(RE, i16) BASIC_COPY_NUM(RE, i32) BASIC_COPY_NUM(RE, f64)
@ -585,7 +585,7 @@ ApdFn* const apd_tot_fns[]; ApdFn* const apd_sh0_fns[]; ApdFn* const apd_sh1_f
#define APD_POS(EB) JOIN0(APD_POS_,EB)()
#define APD_WIDEN(TY, A) do { apd_widen(m, A, apd_##TY##_fns); return; } while(0)
#define APD_INC_POS(EB)
#define APD_INC_POS(EB)
#define APD_MK0(E, FEB, EB, TY, TARR, CIA, T0, CS) \
NOINLINE void apd_##TY##_##E(ApdMut* m, B x) { T0 \
usz cia=CIA; CS; MAYBE_UNUSED u8 xe=TI(x,elType); \

View File

@ -58,10 +58,10 @@ static unsigned int __stdcall winThreadRead(void* arg0) {
return dwResult;
}
static DWORD winCmd(WCHAR* arg,
u64 iLen, char* iBuf,
DWORD* code,
u64* oLen, char** oBuf,
static DWORD winCmd(WCHAR* arg,
u64 iLen, char* iBuf,
DWORD* code,
u64* oLen, char** oBuf,
u64* eLen, char** eBuf) {
DWORD dwResult = ERROR_SUCCESS;
@ -69,7 +69,7 @@ static DWORD winCmd(WCHAR* arg,
HANDLE hOutR, hOutW;
HANDLE hErrR, hErrW;
// Create pipes
// Create pipes
SECURITY_ATTRIBUTES sa;
sa.nLength = sizeof(sa);
sa.lpSecurityDescriptor = NULL;
@ -83,7 +83,7 @@ static DWORD winCmd(WCHAR* arg,
SetHandleInformation(hOutR, HANDLE_FLAG_INHERIT, 0);
SetHandleInformation(hErrR, HANDLE_FLAG_INHERIT, 0);
// Set up
// Set up
STARTUPINFOW si;
ZeroMemory(&si, sizeof(si));
si.cb = sizeof(si);

View File

@ -50,7 +50,7 @@ static B utf16Decode(const WCHAR* s, i64 len) {
u64 p = 0;
for (i64 i = 0; i < len; ++i) {
if (UTF16_IS_HI(s[i]) && i+1<len && UTF16_IS_LO(s[i+1])) {
rp[p++] = UTF16_SURROGATE(s[i], s[i+1]);
rp[p++] = UTF16_SURROGATE(s[i], s[i+1]);
++i;
} else {
rp[p++] = s[i];