/* Generated by Nim Compiler v2.2.10 */ #define NIM_INTBITS 64 #define NIM_EmulateOverflowChecks #include "nimbase.h" #undef LANGUAGE_C #undef MIPSEB #undef MIPSEL #undef PPC #undef R3000 #undef R4000 #undef i386 #undef linux #undef mips #undef near #undef far #undef powerpc #undef unix typedef struct NimStrPayload NimStrPayload; typedef struct NimStringV2 NimStringV2; typedef struct tyTuple__UV3llMMYFckfui8YMBuUZA tyTuple__UV3llMMYFckfui8YMBuUZA; struct NimStrPayload { NI cap; NIM_CHAR data[SEQ_DECL_SIZE]; }; struct NimStringV2 { NI len; NimStrPayload* p; }; struct tyTuple__UV3llMMYFckfui8YMBuUZA { NimStringV2 Field0; NimStringV2 Field1; }; N_LIB_PRIVATE N_NIMCALL(int, symlink__posixZposix_u1543)(NCSTRING a1_p0, NCSTRING a2_p1); static N_INLINE(NCSTRING, nimToCStringConv)(NimStringV2 s_p0); N_LIB_PRIVATE N_NOINLINE(void, raiseOSError__stdZoserrors_u119)(NI32 errorCode_p0, NimStringV2 additionalInfo_p1); N_LIB_PRIVATE N_NIMCALL(NI32, osLastError__stdZoserrors_u122)(void); N_LIB_PRIVATE N_NIMCALL(NimStringV2, dollar___stdZprivateZoscommon_u94)(tyTuple__UV3llMMYFckfui8YMBuUZA* x_p0); N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___system_u2691)(NimStringV2 dest_p0); static N_INLINE(NIM_BOOL*, nimErrorFlag)(void); N_LIB_PRIVATE N_NIMCALL(void, eqcopy___system_u2694)(NimStringV2* dest_p0, NimStringV2 src_p1); extern NIM_BOOL nimInErrorMode__system_u4138; static N_INLINE(NCSTRING, nimToCStringConv)(NimStringV2 s_p0) { NCSTRING result; { if (!(s_p0.len == ((NI)0))) goto LA3_; result = ""; } goto LA1_; LA3_: ; { result = ((NCSTRING) ((*s_p0.p).data)); } LA1_: ; return result; } static N_INLINE(NIM_BOOL*, nimErrorFlag)(void) { NIM_BOOL* result; result = (&nimInErrorMode__system_u4138); return result; } N_LIB_PRIVATE N_NIMCALL(void, createSymlink__stdZprivateZossymlinks_u13)(NimStringV2 src_p0, NimStringV2 dest_p1) { NIM_BOOL* nimErr_; {nimErr_ = nimErrorFlag(); { int T3_; NimStringV2 colontmpD_; NI32 T7_; tyTuple__UV3llMMYFckfui8YMBuUZA T8_; T3_ = (int)0; T3_ = symlink__posixZposix_u1543(nimToCStringConv(src_p0), nimToCStringConv(dest_p1)); if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_; if (!!((T3_ == ((NI32)0)))) goto LA4_; colontmpD_.len = 0; colontmpD_.p = NIM_NIL; T7_ = (NI32)0; T7_ = osLastError__stdZoserrors_u122(); if (NIM_UNLIKELY(*nimErr_)) goto LA6_; T8_.Field0 = src_p0; T8_.Field1 = dest_p1; colontmpD_ = dollar___stdZprivateZoscommon_u94((&T8_)); if (NIM_UNLIKELY(*nimErr_)) goto LA6_; raiseOSError__stdZoserrors_u119(T7_, colontmpD_); if (NIM_UNLIKELY(*nimErr_)) goto LA6_; { LA6_:; } { eqdestroy___system_u2691(colontmpD_); } if (NIM_UNLIKELY(*nimErr_)) goto BeforeRet_; } LA4_: ; }BeforeRet_: ; } N_LIB_PRIVATE N_NIMCALL(NimStringV2, expandSymlink__stdZprivateZossymlinks_u19)(NimStringV2 symlinkPath_p0) { NimStringV2 result; result.len = 0; result.p = NIM_NIL; eqcopy___system_u2694((&result), symlinkPath_p0); return result; }