Files
csources-nimble/nimble-linux/@mnimblepkg@spaths.nim.c

172 lines
5.7 KiB
C

/* Generated by Nim Compiler v1.6.11 */
#define NIM_INTBITS 64
#include "nimbase.h"
#include <string.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
# define nimfr_(proc, file) \
TFrame FR_; \
FR_.procname = proc; FR_.filename = file; FR_.line = 0; FR_.len = 0; nimFrame(&FR_);
# define nimfrs_(proc, file, slots, length) \
struct {TFrame* prev;NCSTRING procname;NI line;NCSTRING filename; NI len; VarSlot s[slots];} FR_; \
FR_.procname = proc; FR_.filename = file; FR_.line = 0; FR_.len = length; nimFrame((TFrame*)&FR_);
# define nimln_(n, file) \
FR_.line = n; FR_.filename = file;
typedef struct NimStringDesc NimStringDesc;
typedef struct TGenericSeq TGenericSeq;
struct TGenericSeq {
NI len;
NI reserved;
};
struct NimStringDesc {
TGenericSeq Sup;
NIM_CHAR data[SEQ_DECL_SIZE];
};
N_LIB_PRIVATE N_NIMCALL(NimStringDesc*, copyString)(NimStringDesc* src);
static N_INLINE(void, nimFrame)(TFrame* s);
N_LIB_PRIVATE N_NOINLINE(void, callDepthLimitReached__system_2997)(void);
static N_INLINE(void, popFrame)(void);
N_LIB_PRIVATE N_NIMCALL(NI, hash__pureZhashes_279)(NimStringDesc* x);
N_LIB_PRIVATE N_NIMCALL(NimStringDesc*, absolutePath__pureZos_735)(NimStringDesc* path, NimStringDesc* root);
N_LIB_PRIVATE N_NIMCALL(NimStringDesc*, nosgetCurrentDir)(void);
static N_INLINE(NIM_BOOL, eqStrings)(NimStringDesc* a, NimStringDesc* b);
static N_INLINE(NIM_BOOL, equalMem__system_1735)(void* a, void* b, NI size);
static N_INLINE(int, nimCmpMem)(void* a, void* b, NI size);
extern TFrame* framePtr__system_2564;
extern TFrame* framePtr__system_2564;
extern TFrame* framePtr__system_2564;
extern TFrame* framePtr__system_2564;
extern TFrame* framePtr__system_2564;
extern TFrame* framePtr__system_2564;
static N_INLINE(void, nimFrame)(TFrame* s) {
{
if (!(framePtr__system_2564 == ((TFrame*) NIM_NIL))) goto LA3_;
(*s).calldepth = ((NI16) 0);
}
goto LA1_;
LA3_: ;
{
(*s).calldepth = (NI16)((*framePtr__system_2564).calldepth + ((NI16) 1));
}
LA1_: ;
(*s).prev = framePtr__system_2564;
framePtr__system_2564 = s;
{
if (!((*s).calldepth == ((NI16) 2000))) goto LA8_;
callDepthLimitReached__system_2997();
}
LA8_: ;
}
static N_INLINE(void, popFrame)(void) {
framePtr__system_2564 = (*framePtr__system_2564).prev;
}
N_LIB_PRIVATE N_NIMCALL(NimStringDesc*, toPath__nimblepkgZpaths_5)(NimStringDesc* path) {
NimStringDesc* result;
nimfr_("toPath", "/home/yyoncho/Sources/nim/nimble/src/nimblepkg/paths.nim");
result = NIM_NIL;
nimln_(11, "/home/yyoncho/Sources/nim/nimble/src/nimblepkg/paths.nim");
result = copyString(path);
popFrame();
return result;
}
N_LIB_PRIVATE N_NIMCALL(NI, hash__nimblepkgZpaths_54)(NimStringDesc* path) {
NI result;
NimStringDesc* T1_;
NimStringDesc* T2_;
nimfr_("hash", "/home/yyoncho/Sources/nim/nimble/src/nimblepkg/paths.nim");
result = (NI)0;
nimln_(30, "/home/yyoncho/Sources/nim/nimble/src/nimblepkg/paths.nim");
nimln_(1441, "/home/yyoncho/.choosenim/toolchains/nim-#version-1-6/lib/pure/os.nim");
T1_ = NIM_NIL;
T1_ = nosgetCurrentDir();
nimln_(30, "/home/yyoncho/Sources/nim/nimble/src/nimblepkg/paths.nim");
T2_ = NIM_NIL;
T2_ = absolutePath__pureZos_735(path, T1_);
result = hash__pureZhashes_279(T2_);
popFrame();
return result;
}
static N_INLINE(int, nimCmpMem)(void* a, void* b, NI size) {
int result;
result = (int)0;
result = memcmp(a, b, ((size_t) (size)));
return result;
}
static N_INLINE(NIM_BOOL, equalMem__system_1735)(void* a, void* b, NI size) {
NIM_BOOL result;
int T1_;
result = (NIM_BOOL)0;
T1_ = (int)0;
T1_ = nimCmpMem(a, b, size);
result = (T1_ == ((NI32) 0));
return result;
}
static N_INLINE(NIM_BOOL, eqStrings)(NimStringDesc* a, NimStringDesc* b) {
NIM_BOOL result;
NI alen;
NI blen;
nimfr_("eqStrings", "/home/yyoncho/.choosenim/toolchains/nim-#version-1-6/lib/system/strmantle.nim");
{ result = (NIM_BOOL)0;
nimln_(27, "/home/yyoncho/.choosenim/toolchains/nim-#version-1-6/lib/system/strmantle.nim");
alen = (a ? a->Sup.len : 0);
nimln_(28, "/home/yyoncho/.choosenim/toolchains/nim-#version-1-6/lib/system/strmantle.nim");
blen = (b ? b->Sup.len : 0);
nimln_(29, "/home/yyoncho/.choosenim/toolchains/nim-#version-1-6/lib/system/strmantle.nim");
{
if (!(alen == blen)) goto LA3_;
nimln_(30, "/home/yyoncho/.choosenim/toolchains/nim-#version-1-6/lib/system/strmantle.nim");
{
if (!(alen == ((NI) 0))) goto LA7_;
result = NIM_TRUE;
goto BeforeRet_;
}
LA7_: ;
nimln_(31, "/home/yyoncho/.choosenim/toolchains/nim-#version-1-6/lib/system/strmantle.nim");
result = equalMem__system_1735(((void*) ((&a->data[((NI) 0)]))), ((void*) ((&b->data[((NI) 0)]))), ((NI) (alen)));
goto BeforeRet_;
}
LA3_: ;
}BeforeRet_: ;
popFrame();
return result;
}
N_LIB_PRIVATE N_NIMCALL(NIM_BOOL, eqeq___nimblepkgZpaths_57)(NimStringDesc* lhs, NimStringDesc* rhs) {
NIM_BOOL result;
NimStringDesc* T1_;
NimStringDesc* T2_;
NimStringDesc* T3_;
NimStringDesc* T4_;
nimfr_("==", "/home/yyoncho/Sources/nim/nimble/src/nimblepkg/paths.nim");
result = (NIM_BOOL)0;
nimln_(33, "/home/yyoncho/Sources/nim/nimble/src/nimblepkg/paths.nim");
nimln_(1441, "/home/yyoncho/.choosenim/toolchains/nim-#version-1-6/lib/pure/os.nim");
T1_ = NIM_NIL;
T1_ = nosgetCurrentDir();
nimln_(33, "/home/yyoncho/Sources/nim/nimble/src/nimblepkg/paths.nim");
T2_ = NIM_NIL;
T2_ = absolutePath__pureZos_735(lhs, T1_);
nimln_(1441, "/home/yyoncho/.choosenim/toolchains/nim-#version-1-6/lib/pure/os.nim");
T3_ = NIM_NIL;
T3_ = nosgetCurrentDir();
nimln_(33, "/home/yyoncho/Sources/nim/nimble/src/nimblepkg/paths.nim");
T4_ = NIM_NIL;
T4_ = absolutePath__pureZos_735(rhs, T3_);
result = eqStrings(T2_, T4_);
popFrame();
return result;
}