1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100
|
/* Generated by Nim Compiler v2.2.0 */
#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_u1544)(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_u100)(tyTuple__UV3llMMYFckfui8YMBuUZA* x_p0);
N_LIB_PRIVATE N_NIMCALL(void, eqdestroy___system_u2597)(NimStringV2 dest_p0);
static N_INLINE(NIM_BOOL*, nimErrorFlag)(void);
N_LIB_PRIVATE N_NIMCALL(void, eqcopy___system_u2600)(NimStringV2* dest_p0, NimStringV2 src_p1);
extern NIM_BOOL nimInErrorMode__system_u4269;
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_u4269);
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_u1544(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_u100((&T8_));
if (NIM_UNLIKELY(*nimErr_)) goto LA6_;
raiseOSError__stdZoserrors_u119(T7_, colontmpD_);
if (NIM_UNLIKELY(*nimErr_)) goto LA6_;
{
LA6_:;
}
{
eqdestroy___system_u2597(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_u2600((&result), symlinkPath_p0);
return result;
}
|