/ nimble-windows / @mnimblepkg@spaths.nim.c
@mnimblepkg@spaths.nim.c
  1  /* Generated by Nim Compiler v1.6.11 */
  2  #define NIM_INTBITS 64
  3  
  4  #include "nimbase.h"
  5  #include <string.h>
  6  #undef LANGUAGE_C
  7  #undef MIPSEB
  8  #undef MIPSEL
  9  #undef PPC
 10  #undef R3000
 11  #undef R4000
 12  #undef i386
 13  #undef linux
 14  #undef mips
 15  #undef near
 16  #undef far
 17  #undef powerpc
 18  #undef unix
 19    #  define nimfr_(proc, file) \
 20        TFrame FR_; \
 21        FR_.procname = proc; FR_.filename = file; FR_.line = 0; FR_.len = 0; nimFrame(&FR_);
 22  
 23    #  define nimfrs_(proc, file, slots, length) \
 24        struct {TFrame* prev;NCSTRING procname;NI line;NCSTRING filename; NI len; VarSlot s[slots];} FR_; \
 25        FR_.procname = proc; FR_.filename = file; FR_.line = 0; FR_.len = length; nimFrame((TFrame*)&FR_);
 26  
 27    #  define nimln_(n, file) \
 28        FR_.line = n; FR_.filename = file;
 29    typedef struct NimStringDesc NimStringDesc;
 30  typedef struct TGenericSeq TGenericSeq;
 31  struct TGenericSeq {
 32  NI len;
 33  NI reserved;
 34  };
 35  struct NimStringDesc {
 36    TGenericSeq Sup;
 37  NIM_CHAR data[SEQ_DECL_SIZE];
 38  };
 39  N_LIB_PRIVATE N_NIMCALL(NimStringDesc*, copyString)(NimStringDesc* src);
 40  static N_INLINE(void, nimFrame)(TFrame* s);
 41  N_LIB_PRIVATE N_NOINLINE(void, callDepthLimitReached__system_2999)(void);
 42  static N_INLINE(void, popFrame)(void);
 43  N_LIB_PRIVATE N_NIMCALL(NI, hash__pureZhashes_279)(NimStringDesc* x);
 44  N_LIB_PRIVATE N_NIMCALL(NimStringDesc*, absolutePath__pureZos_857)(NimStringDesc* path, NimStringDesc* root);
 45  N_LIB_PRIVATE N_NIMCALL(NimStringDesc*, nosgetCurrentDir)(void);
 46  static N_INLINE(NIM_BOOL, eqStrings)(NimStringDesc* a, NimStringDesc* b);
 47  static N_INLINE(NIM_BOOL, equalMem__system_1735)(void* a, void* b, NI size);
 48  static N_INLINE(int, nimCmpMem)(void* a, void* b, NI size);
 49  extern TFrame* framePtr__system_2566;
 50  extern TFrame* framePtr__system_2566;
 51  extern TFrame* framePtr__system_2566;
 52  extern TFrame* framePtr__system_2566;
 53  extern TFrame* framePtr__system_2566;
 54  extern TFrame* framePtr__system_2566;
 55  static N_INLINE(void, nimFrame)(TFrame* s) {
 56  	{
 57  		if (!(framePtr__system_2566 == ((TFrame*) NIM_NIL))) goto LA3_;
 58  		(*s).calldepth = ((NI16) 0);
 59  	}
 60  	goto LA1_;
 61  	LA3_: ;
 62  	{
 63  		(*s).calldepth = (NI16)((*framePtr__system_2566).calldepth + ((NI16) 1));
 64  	}
 65  	LA1_: ;
 66  	(*s).prev = framePtr__system_2566;
 67  	framePtr__system_2566 = s;
 68  	{
 69  		if (!((*s).calldepth == ((NI16) 2000))) goto LA8_;
 70  		callDepthLimitReached__system_2999();
 71  	}
 72  	LA8_: ;
 73  }
 74  static N_INLINE(void, popFrame)(void) {
 75  	framePtr__system_2566 = (*framePtr__system_2566).prev;
 76  }
 77  N_LIB_PRIVATE N_NIMCALL(NimStringDesc*, toPath__nimblepkgZpaths_5)(NimStringDesc* path) {
 78  	NimStringDesc* result;
 79  	nimfr_("toPath", "/home/yyoncho/Sources/nim/nimble/src/nimblepkg/paths.nim");
 80  	result = NIM_NIL;
 81  	nimln_(11, "/home/yyoncho/Sources/nim/nimble/src/nimblepkg/paths.nim");
 82  	result = copyString(path);
 83  	popFrame();
 84  	return result;
 85  }
 86  N_LIB_PRIVATE N_NIMCALL(NI, hash__nimblepkgZpaths_54)(NimStringDesc* path) {
 87  	NI result;
 88  	NimStringDesc* T1_;
 89  	NimStringDesc* T2_;
 90  	nimfr_("hash", "/home/yyoncho/Sources/nim/nimble/src/nimblepkg/paths.nim");
 91  	result = (NI)0;
 92  	nimln_(30, "/home/yyoncho/Sources/nim/nimble/src/nimblepkg/paths.nim");
 93  	nimln_(1441, "/home/yyoncho/.choosenim/toolchains/nim-#version-1-6/lib/pure/os.nim");
 94  	T1_ = NIM_NIL;
 95  	T1_ = nosgetCurrentDir();
 96  	nimln_(30, "/home/yyoncho/Sources/nim/nimble/src/nimblepkg/paths.nim");
 97  	T2_ = NIM_NIL;
 98  	T2_ = absolutePath__pureZos_857(path, T1_);
 99  	result = hash__pureZhashes_279(T2_);
100  	popFrame();
101  	return result;
102  }
103  static N_INLINE(int, nimCmpMem)(void* a, void* b, NI size) {
104  	int result;
105  	result = (int)0;
106  	result = memcmp(a, b, ((size_t) (size)));
107  	return result;
108  }
109  static N_INLINE(NIM_BOOL, equalMem__system_1735)(void* a, void* b, NI size) {
110  	NIM_BOOL result;
111  	int T1_;
112  	result = (NIM_BOOL)0;
113  	T1_ = (int)0;
114  	T1_ = nimCmpMem(a, b, size);
115  	result = (T1_ == ((NI32) 0));
116  	return result;
117  }
118  static N_INLINE(NIM_BOOL, eqStrings)(NimStringDesc* a, NimStringDesc* b) {
119  	NIM_BOOL result;
120  	NI alen;
121  	NI blen;
122  	nimfr_("eqStrings", "/home/yyoncho/.choosenim/toolchains/nim-#version-1-6/lib/system/strmantle.nim");
123  {	result = (NIM_BOOL)0;
124  	nimln_(27, "/home/yyoncho/.choosenim/toolchains/nim-#version-1-6/lib/system/strmantle.nim");
125  	alen = (a ? a->Sup.len : 0);
126  	nimln_(28, "/home/yyoncho/.choosenim/toolchains/nim-#version-1-6/lib/system/strmantle.nim");
127  	blen = (b ? b->Sup.len : 0);
128  	nimln_(29, "/home/yyoncho/.choosenim/toolchains/nim-#version-1-6/lib/system/strmantle.nim");
129  	{
130  		if (!(alen == blen)) goto LA3_;
131  		nimln_(30, "/home/yyoncho/.choosenim/toolchains/nim-#version-1-6/lib/system/strmantle.nim");
132  		{
133  			if (!(alen == ((NI) 0))) goto LA7_;
134  			result = NIM_TRUE;
135  			goto BeforeRet_;
136  		}
137  		LA7_: ;
138  		nimln_(31, "/home/yyoncho/.choosenim/toolchains/nim-#version-1-6/lib/system/strmantle.nim");
139  		result = equalMem__system_1735(((void*) ((&a->data[((NI) 0)]))), ((void*) ((&b->data[((NI) 0)]))), ((NI) (alen)));
140  		goto BeforeRet_;
141  	}
142  	LA3_: ;
143  	}BeforeRet_: ;
144  	popFrame();
145  	return result;
146  }
147  N_LIB_PRIVATE N_NIMCALL(NIM_BOOL, eqeq___nimblepkgZpaths_57)(NimStringDesc* lhs, NimStringDesc* rhs) {
148  	NIM_BOOL result;
149  	NimStringDesc* T1_;
150  	NimStringDesc* T2_;
151  	NimStringDesc* T3_;
152  	NimStringDesc* T4_;
153  	nimfr_("==", "/home/yyoncho/Sources/nim/nimble/src/nimblepkg/paths.nim");
154  	result = (NIM_BOOL)0;
155  	nimln_(33, "/home/yyoncho/Sources/nim/nimble/src/nimblepkg/paths.nim");
156  	nimln_(1441, "/home/yyoncho/.choosenim/toolchains/nim-#version-1-6/lib/pure/os.nim");
157  	T1_ = NIM_NIL;
158  	T1_ = nosgetCurrentDir();
159  	nimln_(33, "/home/yyoncho/Sources/nim/nimble/src/nimblepkg/paths.nim");
160  	T2_ = NIM_NIL;
161  	T2_ = absolutePath__pureZos_857(lhs, T1_);
162  	nimln_(1441, "/home/yyoncho/.choosenim/toolchains/nim-#version-1-6/lib/pure/os.nim");
163  	T3_ = NIM_NIL;
164  	T3_ = nosgetCurrentDir();
165  	nimln_(33, "/home/yyoncho/Sources/nim/nimble/src/nimblepkg/paths.nim");
166  	T4_ = NIM_NIL;
167  	T4_ = absolutePath__pureZos_857(rhs, T3_);
168  	result = eqStrings(T2_, T4_);
169  	popFrame();
170  	return result;
171  }