Guest User

Untitled

a guest
Jun 9th, 2026
38
0
Never
2
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 18.38 KB | None | 0 0
  1. //
  2. // PureBasic 6.30 - C Backend (Linux - x64) generated code
  3. //
  4. // (c) 2025 Fantaisie Software
  5. //
  6. // The header must remain intact for Re-Assembly
  7. //
  8. // String
  9. // CipherMD5
  10. // Cipher
  11. // Network
  12. // System
  13. // FileSystem
  14. // Date
  15. // Array
  16. // Memory
  17. // Map
  18. // Object
  19. // SimpleList
  20. // :System
  21. //
  22. #pragma warning(disable: 4024)
  23. //
  24. typedef long long quad;
  25. typedef quad integer;
  26. #define PB_INFINITY (1.0 / 0.0)
  27. #define PB_NEG_INFINITY (-1.0 / 0.0)
  28. typedef struct pb_array { void *a; } pb_array;
  29. typedef struct pb_array2 { void *a; integer b[2]; } pb_array2;
  30. typedef struct pb_array3 { void *a; integer b[3]; } pb_array3;
  31. typedef struct pb_array4 { void *a; integer b[4]; } pb_array4;
  32. typedef struct pb_array5 { void *a; integer b[5]; } pb_array5;
  33. typedef struct pb_array6 { void *a; integer b[6]; } pb_array6;
  34. typedef struct pb_array7 { void *a; integer b[7]; } pb_array7;
  35. typedef struct pb_array8 { void *a; integer b[8]; } pb_array8;
  36. typedef struct pb_array9 { void *a; integer b[9]; } pb_array9;
  37. typedef struct pb_listitem { void *a; void *b; void *c;} pb_listitem;
  38. typedef struct pb_list { void *a; pb_listitem *b; } pb_list;
  39. typedef struct pb_mapitem { void *a; void *b; void *c;} pb_mapitem;
  40. typedef struct pb_pbmap { pb_mapitem *a; } pb_pbmap;
  41. typedef struct pb_map { pb_pbmap *a; } pb_map;
  42. static integer s_s[]={0, -1};
  43. #define M_SYSFUNCTION(a) a
  44. #define M_PBFUNCTION(a) a
  45. #define M_CDECL
  46. typedef void TCHAR;
  47. #include <math.h>
  48. #define SYS_BankerRound(x) llrint(x)
  49. #define SYS_BankerRoundQuad(x) llrint(x)
  50. //
  51. void* PB_DirectoryEntryName(integer,integer);
  52. void* PB_DirectoryEntryName_DEBUG(integer,integer);
  53. quad PB_DirectoryEntrySize(integer);
  54. quad PB_DirectoryEntrySize_DEBUG(integer);
  55. integer PB_DirectoryEntryType(integer);
  56. integer PB_DirectoryEntryType_DEBUG(integer);
  57. integer PB_ExamineDirectory(integer,void*,void*);
  58. integer PB_ExamineDirectory_DEBUG(integer,void*,void*);
  59. integer PB_FinishDirectory(integer);
  60. integer PB_FinishDirectory_DEBUG(integer);
  61. integer PB_FreeFileSystem();
  62. integer PB_FreeMemorys();
  63. integer PB_FreeNetworks();
  64. integer PB_FreeObjects();
  65. integer PB_InitArray();
  66. integer PB_InitMap();
  67. integer PB_InitMemory();
  68. integer PB_InitNetworkInternal();
  69. integer PB_NextDirectoryEntry(integer);
  70. integer PB_NextDirectoryEntry_DEBUG(integer);
  71. void* PB_Right(void*,integer,integer);
  72. void* PB_Str(quad,integer);
  73. static char *tls;
  74. int PB_ExitCode=0;
  75. integer PB_MemoryBase=0;
  76. integer PB_Instance=0;
  77. int PB_ArgC;
  78. char **PB_ArgV;
  79. static unsigned char *pb_datapointer;
  80. //
  81. //
  82. //
  83. void DBG_CheckDataSection();
  84. void DBG_CheckNullPointer(void *pointer);
  85. //
  86. void SYS_Quit();
  87. M_SYSFUNCTION(void) SYS_InitPureBasic();
  88. void exit(int status);
  89. M_SYSFUNCTION(void) SYS_CopyString(const void *String);
  90. int M_CDECL SYS_StringEqual(TCHAR *String1, TCHAR *String2);
  91. M_SYSFUNCTION(void) SYS_AllocateString4(TCHAR **String, integer PreviousPosition);
  92. M_SYSFUNCTION(void) SYS_FastAllocateString4(TCHAR **Address, const TCHAR *String);
  93. M_SYSFUNCTION(integer) SYS_FastAllocateStringFree4(TCHAR **Address, const TCHAR *String);
  94. M_SYSFUNCTION(void) SYS_FreeString(TCHAR *String);
  95. M_SYSFUNCTION(void *) SYS_InitThreadedObject();
  96. extern void *PB_StringBase;
  97. extern integer PB_StringBasePosition;
  98. M_SYSFUNCTION(void) SYS_InitString(void);
  99. M_SYSFUNCTION(void) SYS_FreeStrings(void);
  100. //
  101. M_SYSFUNCTION(void) SYS_PushStringBasePosition(void);
  102. M_SYSFUNCTION(integer) SYS_PopStringBasePosition(void);
  103. M_SYSFUNCTION(integer) SYS_PopStringBasePositionUpdate(void);
  104. M_SYSFUNCTION(void *) SYS_PopStringBasePositionValue(void);
  105. M_SYSFUNCTION(void *) SYS_PopStringBasePositionValueNoUpdate(void);
  106. M_SYSFUNCTION(integer) SYS_GetStringBasePosition(void);
  107. M_SYSFUNCTION(void) SYS_SetStringBasePosition(integer Position);
  108. M_SYSFUNCTION(integer) SYS_StringBasePositionNoPop(void);
  109. M_SYSFUNCTION(char *) SYS_GetStringBase(void);
  110. #define DBG_ZeroDivideError 1
  111. #define DBG_ZeroModuloError 2
  112. #define DBG_NullPointerError 3
  113. #define DBG_ArrayOutOfBoundsError 4
  114. #define DBG_LinkedListNoCurrentElementError 5
  115. #define DBG_StructureArrayOufOfBoundError 6
  116. #define DBG_NegativeArraySizeError 7
  117. #define DBG_LastDimensionRedimOnlyError 8
  118. #define DBG_ReadDataError 9
  119. #define DBG_MapHashSizeError 10
  120. #define DBG_MapNoCurrentElementError 11
  121. #define DBG_MapUninitializedError 12
  122. typedef integer unsigned_integer;
  123. void PB_DEBUGGER_Start(unsigned_integer StackPosition, int Flags);
  124. void PB_DEBUGGER_End();
  125. integer PB_DEBUGGER_Check(int LineNumber, integer *registers);
  126. void PB_DEBUGGER_EnterProcedure(int ProcedureID, char *VariablesOffset);
  127. void PB_DEBUGGER_LeaveProcedure();
  128. integer PB_DEBUGGER_Error(int Control, const char *Description);
  129. integer PB_DEBUGGER_ErrorCode(int Control, int ErrorCode);
  130. void PB_DEBUGGER_PrintString(void *String);
  131. void PB_DEBUGGER_PrintFloat(float Float);
  132. void PB_DEBUGGER_PrintLong(int Long);
  133. void PB_DEBUGGER_PrintQuad(quad Quad);
  134. void PB_DEBUGGER_PrintDouble(double Double);
  135. void PB_DEBUGGER_Break(integer *registers);
  136. void PB_DEBUGGER_SetLine(int LineNumber);
  137. M_SYSFUNCTION(void) SYS_CheckArray(integer *ArrayAddress, integer Index);
  138. M_SYSFUNCTION(integer) SYS_CheckMultiArrayDimension(int DimensionIndex, integer Value, integer *ArrayAddress);
  139. M_SYSFUNCTION(void) SYS_CheckRedimDimension(int DimensionIndex, integer Value, integer *ArrayAddress);
  140. M_SYSFUNCTION(void) SYS_CheckCurrentListElement(pb_list *List);
  141. M_SYSFUNCTION(void) SYS_CheckCurrentMapElement(pb_pbmap *Map);
  142. M_SYSFUNCTION(void) SYS_CheckMapHashSize(integer Value);
  143. M_SYSFUNCTION(void) SYS_CheckStructureArrayIndex(int ArraySize, integer Index);
  144. void PB_PURIFIER_Start(int **GlobalMap);
  145. void PB_PURIFIER_EnterProcedure(int *LocalOffsetMap, char *Stack);
  146. void PB_PURIFIER_Check(int **GlobalMap, int *LocalOffsetMap, const char *Stack);
  147. void DBG_Check(int Line) { PB_DEBUGGER_Check(Line, 0); }
  148. int PB_DEBUGGER_Control=0;
  149. int PB_DEBUGGER_CurrentLine=0;
  150. int PB_DEBUGGER_ErrorDescription=0;
  151. int PB_DEBUGGER_FullScreen=0;
  152. int PB_DEBUGGER_StartDrawing=0;
  153. int PB_DEBUGGER_Unicode=1;
  154. int PB_DEBUGGER_Thread=0;
  155. int PB_DEBUGGER_Purifier=1;
  156. int PB_DEBUGGER_Version=630;
  157. const char PB_DEBUGGER_SourcePath[]="/home/ucedac/Desktop";
  158. const char PB_DEBUGGER_PureBasicPath[]="/opt/purebasic/";
  159. const char PB_DEBUGGER_Language[]="";
  160. volatile int PB_DEBUGGER_LineNumber=0;
  161. volatile int PB_DEBUGGER_NbIncludedFiles=0;
  162. const char PB_DEBUGGER_FileName[]="recurse.pb";
  163. char *PB_DEBUGGER_IncludedFiles[]={
  164. 0};
  165. //
  166. static integer f_listdir(void* v_directoryS);
  167. static unsigned char lmv_0[]={
  168. 8,
  169. 1,
  170. 68,105,114,101,99,116,111,114,121,36,0,
  171. 0,0,0,0,0,0,0,0,
  172. 8,
  173. 1,
  174. 84,121,112,101,36,0,
  175. 0,0,0,0,0,0,0,0,
  176. 8,
  177. 1,
  178. 83,105,122,101,36,0,
  179. 0,0,0,0,0,0,0,0,
  180. 21,
  181. 1,
  182. 104,110,100,0,
  183. 0,0,0,0,0,0,0,0,
  184. -1};
  185. static unsigned char lma_0[]={
  186. -1};
  187. static unsigned char lml_0[]={
  188. -1};
  189. static unsigned char lmm_0[]={
  190. -1};
  191. static unsigned short _S7[]={0};
  192. static unsigned short _S5[]={41,0};
  193. static unsigned short _S8[]={46,0};
  194. static unsigned short _S1[]={47,0};
  195. static unsigned short _S4[]={32,40,83,105,122,101,58,32,0};
  196. static unsigned short _S2[]={42,46,42,0};
  197. static unsigned short _S6[]={91,68,105,114,101,99,116,111,114,121,93,32,0};
  198. static unsigned short _S9[]={46,46,0};
  199. static unsigned short _S3[]={91,70,105,108,101,93,32,0};
  200. unsigned char PB_DEBUGGER_VariableBank[] __attribute__((aligned(4)))={0,0,0,0,
  201. 0};
  202. unsigned char PB_DEBUGGER_ProcedureBank[] __attribute__((aligned(4)))={1,0,0,0,
  203. 1,0,
  204. 1,
  205. 8,
  206. 0,0,0,0,
  207. 21,
  208. 0,
  209. 108,105,115,116,100,105,114,0,
  210. 0,
  211. 0,0,0,0,0,0,0,0,
  212. 0,0,0,0,0,0,0,0,
  213. 0,0,0,0,0,0,0,0,
  214. 0,0,0,0,0,0,0,0,
  215. 0,0,0,0,0,0,0,0,
  216. 0,0,
  217. };
  218. unsigned char PB_DEBUGGER_ArrayBank[] __attribute__((aligned(4)))={0,0,0,0,
  219. };
  220. unsigned char PB_DEBUGGER_LinkedListBank[] __attribute__((aligned(4)))={0,0,0,0,
  221. };
  222. unsigned char PB_DEBUGGER_MapBank[] __attribute__((aligned(4)))={0,0,0,0,
  223. };
  224. unsigned char PB_DEBUGGER_ConstantBank[] __attribute__((aligned(4)))={28,0,0,0,
  225. 2,
  226. 80,66,95,67,111,109,112,105,108,101,114,95,80,114,111,99,101,115,115,111,114,0,
  227. 0,
  228. 3,
  229. 4,0,0,0,
  230. 0,0,0,0,
  231. 2,
  232. 80,66,95,67,111,109,112,105,108,101,114,95,87,97,121,108,97,110,100,0,
  233. 0,
  234. 3,
  235. 0,0,0,0,
  236. 0,0,0,0,
  237. 2,
  238. 80,66,95,67,111,109,112,105,108,101,114,95,76,105,110,101,0,
  239. 0,
  240. 3,
  241. 36,0,0,0,
  242. 0,0,0,0,
  243. 2,
  244. 80,66,95,67,111,109,112,105,108,101,114,95,51,50,66,105,116,0,
  245. 0,
  246. 3,
  247. 0,0,0,0,
  248. 0,0,0,0,
  249. 2,
  250. 80,66,95,67,111,109,112,105,108,101,114,95,80,114,111,99,101,100,117,114,101,0,
  251. 0,
  252. 6,
  253. 0,0,
  254. 2,
  255. 80,66,95,67,111,109,112,105,108,101,114,95,70,105,108,101,80,97,116,104,0,
  256. 0,
  257. 6,
  258. 0x2F,0x0,0x68,0x0,0x6F,0x0,0x6D,0x0,0x65,0x0,0x2F,0x0,0x75,0x0,0x63,0x0,0x65,0x0,0x64,0x0,0x61,0x0,0x63,0x0,0x2F,0x0,0x44,0x0,0x65,0x0,0x73,0x0,0x6B,0x0,0x74,0x0,0x6F,0x0,0x70,0x0,0x2F,0x0,0,0,
  259. 2,
  260. 80,66,95,67,111,109,112,105,108,101,114,95,69,120,101,99,117,116,97,98,108,101,70,111,114,109,97,116,0,
  261. 0,
  262. 3,
  263. 0,0,0,0,
  264. 0,0,0,0,
  265. 2,
  266. 80,66,95,67,111,109,112,105,108,101,114,95,79,112,116,105,109,105,122,101,114,0,
  267. 0,
  268. 3,
  269. 0,0,0,0,
  270. 0,0,0,0,
  271. 2,
  272. 80,66,95,67,111,109,112,105,108,101,114,95,68,101,98,117,103,103,101,114,0,
  273. 0,
  274. 3,
  275. 1,0,0,0,
  276. 0,0,0,0,
  277. 2,
  278. 80,66,95,67,111,109,112,105,108,101,114,95,70,105,108,101,110,97,109,101,0,
  279. 0,
  280. 6,
  281. 0x72,0x0,0x65,0x0,0x63,0x0,0x75,0x0,0x72,0x0,0x73,0x0,0x65,0x0,0x2E,0x0,0x70,0x0,0x62,0x0,0,0,
  282. 2,
  283. 80,66,95,67,111,109,112,105,108,101,114,95,79,83,0,
  284. 0,
  285. 3,
  286. 2,0,0,0,
  287. 0,0,0,0,
  288. 2,
  289. 80,66,95,67,111,109,112,105,108,101,114,95,72,111,109,101,0,
  290. 0,
  291. 6,
  292. 0x2F,0x0,0x6F,0x0,0x70,0x0,0x74,0x0,0x2F,0x0,0x70,0x0,0x75,0x0,0x72,0x0,0x65,0x0,0x62,0x0,0x61,0x0,0x73,0x0,0x69,0x0,0x63,0x0,0x2F,0x0,0,0,
  293. 2,
  294. 80,66,95,67,111,109,112,105,108,101,114,95,69,110,97,98,108,101,69,120,112,108,105,99,105,116,0,
  295. 0,
  296. 3,
  297. 1,0,0,0,
  298. 0,0,0,0,
  299. 2,
  300. 80,66,95,67,111,109,112,105,108,101,114,95,69,110,117,109,101,114,97,116,105,111,110,86,97,108,117,101,0,
  301. 0,
  302. 3,
  303. 0,0,0,0,
  304. 0,0,0,0,
  305. 2,
  306. 80,66,95,67,111,109,112,105,108,101,114,95,66,97,99,107,101,110,100,0,
  307. 0,
  308. 3,
  309. 1,0,0,0,
  310. 0,0,0,0,
  311. 2,
  312. 78,117,108,108,36,0,
  313. 0,
  314. 6,
  315. 0x21,0x0,0x5F,0x0,0x50,0x0,0x42,0x0,0x5F,0x0,0x4E,0x0,0x75,0x0,0x6C,0x0,0x6C,0x0,0x43,0x0,0x6F,0x0,0x6E,0x0,0x73,0x0,0x74,0x0,0x61,0x0,0x6E,0x0,0x74,0x0,0x5F,0x0,0x21,0x0,0,0,
  316. 2,
  317. 80,66,95,67,111,109,112,105,108,101,114,95,84,104,114,101,97,100,0,
  318. 0,
  319. 3,
  320. 0,0,0,0,
  321. 0,0,0,0,
  322. 2,
  323. 80,66,95,67,111,109,112,105,108,101,114,95,76,105,110,101,78,117,109,98,101,114,105,110,103,0,
  324. 0,
  325. 3,
  326. 0,0,0,0,
  327. 0,0,0,0,
  328. 2,
  329. 80,66,95,67,111,109,112,105,108,101,114,95,54,52,66,105,116,0,
  330. 0,
  331. 3,
  332. 1,0,0,0,
  333. 0,0,0,0,
  334. 2,
  335. 80,66,95,67,111,109,112,105,108,101,114,95,86,101,114,115,105,111,110,0,
  336. 0,
  337. 3,
  338. 118,2,0,0,
  339. 0,0,0,0,
  340. 2,
  341. 80,66,95,67,111,109,112,105,108,101,114,95,85,110,105,99,111,100,101,0,
  342. 0,
  343. 3,
  344. 1,0,0,0,
  345. 0,0,0,0,
  346. 2,
  347. 80,66,95,67,111,109,112,105,108,101,114,95,70,105,108,101,0,
  348. 0,
  349. 6,
  350. 0x2F,0x0,0x68,0x0,0x6F,0x0,0x6D,0x0,0x65,0x0,0x2F,0x0,0x75,0x0,0x63,0x0,0x65,0x0,0x64,0x0,0x61,0x0,0x63,0x0,0x2F,0x0,0x44,0x0,0x65,0x0,0x73,0x0,0x6B,0x0,0x74,0x0,0x6F,0x0,0x70,0x0,0x2F,0x0,0x72,0x0,0x65,0x0,0x63,0x0,0x75,0x0,0x72,0x0,0x73,0x0,0x65,0x0,0x2E,0x0,0x70,0x0,0x62,0x0,0,0,
  351. 2,
  352. 80,66,95,67,111,109,112,105,108,101,114,95,73,115,73,110,99,108,117,100,101,70,105,108,101,0,
  353. 0,
  354. 3,
  355. 0,0,0,0,
  356. 0,0,0,0,
  357. 2,
  358. 80,66,95,67,111,109,112,105,108,101,114,95,73,115,77,97,105,110,70,105,108,101,0,
  359. 0,
  360. 3,
  361. 1,0,0,0,
  362. 0,0,0,0,
  363. 2,
  364. 80,66,95,67,111,109,112,105,108,101,114,95,77,111,100,117,108,101,0,
  365. 0,
  366. 6,
  367. 0,0,
  368. 2,
  369. 80,66,95,67,111,109,112,105,108,101,114,95,68,80,73,65,119,97,114,101,0,
  370. 0,
  371. 3,
  372. 0,0,0,0,
  373. 0,0,0,0,
  374. 2,
  375. 80,66,95,67,111,109,112,105,108,101,114,95,68,97,116,101,0,
  376. 0,
  377. 3,
  378. 45,20,40,106,
  379. 0,0,0,0,
  380. 2,
  381. 80,66,95,67,111,109,112,105,108,101,114,95,73,110,108,105,110,101,65,115,115,101,109,98,108,121,0,
  382. 0,
  383. 3,
  384. 0,0,0,0,
  385. 0,0,0,0,
  386. };
  387. unsigned char PB_DEBUGGER_LabelBank[] __attribute__((aligned(4)))={0,0,0,0,
  388. };
  389. unsigned char PB_DEBUGGER_ModuleBank[] __attribute__((aligned(4)))={0,0,0,0,
  390. };
  391.  
  392. static integer ms_s[]={0,-1};
  393. //
  394. //
  395. // Procedure listdir(Directory$)
  396. static integer f_listdir(void* v_directoryS) {
  397. integer r=0;
  398. SYS_FastAllocateString4(&v_directoryS,v_directoryS);
  399. void* v_typeS=0;
  400. void* v_sizeS=0;
  401. integer v_hnd=0;
  402. *(integer *)(&lmv_0[13])=(integer *)&v_directoryS;
  403. *(integer *)(&lmv_0[29])=(integer *)&v_typeS;
  404. *(integer *)(&lmv_0[45])=(integer *)&v_sizeS;
  405. *(integer *)(&lmv_0[59])=(integer *)&v_hnd;
  406. PB_DEBUGGER_EnterProcedure(0,0);
  407. PB_PURIFIER_EnterProcedure(0,0);
  408. DBG_Check(2);
  409. // Protected hnd.i;
  410. // Protected Type$;
  411. // Protected Size$;
  412. //
  413. // If Right(Directory$,1) <> "/"
  414. DBG_Check(7);
  415. SYS_PushStringBasePosition();
  416. SYS_PushStringBasePosition();
  417. integer p0=SYS_PopStringBasePosition();
  418. PB_Right(v_directoryS,1LL,p0);
  419. PB_StringBasePosition+=2;
  420. void* p1=SYS_PopStringBasePositionValue();
  421. void* p2=_S1;
  422. if (!((!SYS_StringEqual(p2,p1)))) { goto no2; }
  423. // Directory$ + "/"
  424. DBG_Check(8);
  425. SYS_PushStringBasePosition();
  426. SYS_CopyString(v_directoryS);
  427. SYS_CopyString(_S1);
  428. SYS_AllocateString4(&v_directoryS,SYS_PopStringBasePosition());
  429. // EndIf
  430. no2:;
  431. DBG_Check(9);
  432. // hnd = ExamineDirectory(#PB_Any, Directory$, "*.*")
  433. DBG_Check(10);
  434. PB_ExamineDirectory_DEBUG(-1LL,v_directoryS,_S2);
  435. integer r0=PB_ExamineDirectory(-1LL,v_directoryS,_S2);
  436. v_hnd=r0;
  437. PB_PURIFIER_Check(0,0,0);
  438. // If Not hnd
  439. DBG_Check(11);
  440. if (!(!(v_hnd))) { goto no4; }
  441. // ProcedureReturn #False
  442. DBG_Check(12);
  443. r=0LL;
  444. goto end;
  445. // EndIf
  446. no4:;
  447. DBG_Check(13);
  448. //
  449. // While NextDirectoryEntry(hnd)
  450. while (1) {
  451. PB_NextDirectoryEntry_DEBUG(v_hnd);
  452. integer r1=PB_NextDirectoryEntry(v_hnd);
  453. DBG_Check(15);
  454. if (!(r1)) { break; }
  455. // If DirectoryEntryType(hnd) = #PB_DirectoryEntry_File
  456. DBG_Check(16);
  457. PB_DirectoryEntryType_DEBUG(v_hnd);
  458. integer r2=PB_DirectoryEntryType(v_hnd);
  459. if (!((r2==1))) { goto no7; }
  460. // Type$ = "[File] "
  461. DBG_Check(17);
  462. SYS_FastAllocateStringFree4(&v_typeS,_S3);
  463. // Size$ = " (Size: " + DirectoryEntrySize(hnd) + ")"
  464. DBG_Check(18);
  465. SYS_PushStringBasePosition();
  466. SYS_CopyString(_S4);
  467. PB_DirectoryEntrySize_DEBUG(v_hnd);
  468. quad r3=PB_DirectoryEntrySize(v_hnd);
  469. SYS_PushStringBasePosition();
  470. PB_Str(r3,SYS_GetStringBasePosition());
  471. SYS_PopStringBasePosition();
  472. SYS_CopyString(_S5);
  473. SYS_AllocateString4(&v_sizeS,SYS_PopStringBasePosition());
  474. PB_PURIFIER_Check(0,0,0);
  475. // Else
  476. DBG_Check(19);
  477. goto endif6;
  478. no7:;
  479. DBG_Check(19);
  480. // Type$ = "[Directory] "
  481. DBG_Check(20);
  482. SYS_FastAllocateStringFree4(&v_typeS,_S6);
  483. // Size$ = ""
  484. DBG_Check(21);
  485. SYS_FastAllocateStringFree4(&v_sizeS,_S7);
  486. // If DirectoryEntryName(hnd) <> "." And DirectoryEntryName(hnd) <> ".."
  487. DBG_Check(22);
  488. SYS_PushStringBasePosition();
  489. SYS_PushStringBasePosition();
  490. integer p3=SYS_PopStringBasePosition();
  491. PB_DirectoryEntryName_DEBUG(v_hnd,p3);
  492. PB_DirectoryEntryName(v_hnd,p3);
  493. PB_StringBasePosition+=2;
  494. void* p4=SYS_PopStringBasePositionValue();
  495. void* p5=_S8;
  496. integer c11=0;
  497. if (!((!SYS_StringEqual(p5,p4)))) { goto no11; }
  498. SYS_PushStringBasePosition();
  499. SYS_PushStringBasePosition();
  500. integer p6=SYS_PopStringBasePosition();
  501. PB_DirectoryEntryName_DEBUG(v_hnd,p6);
  502. PB_DirectoryEntryName(v_hnd,p6);
  503. PB_StringBasePosition+=2;
  504. void* p7=SYS_PopStringBasePositionValue();
  505. void* p8=_S9;
  506. if (!((!SYS_StringEqual(p8,p7)))) { goto no11; }
  507. ok11:
  508. c11=1;
  509. no11:;
  510. if (!(c11)) { goto no10; }
  511. // listdir(Directory$ + DirectoryEntryName(hnd))
  512. DBG_Check(23);
  513. SYS_PushStringBasePosition();
  514. SYS_PushStringBasePosition();
  515. SYS_CopyString(v_directoryS);
  516. SYS_PushStringBasePosition();
  517. SYS_PushStringBasePosition();
  518. integer p9=SYS_PopStringBasePosition();
  519. PB_DirectoryEntryName_DEBUG(v_hnd,p9);
  520. PB_DirectoryEntryName(v_hnd,p9);
  521. SYS_PopStringBasePosition();
  522. void* p10=(void*)SYS_PopStringBasePositionValueNoUpdate();
  523. integer r4=f_listdir(p10);
  524. PB_DEBUGGER_SetLine(23);
  525. SYS_PopStringBasePositionUpdate();
  526. PB_PURIFIER_Check(0,0,0);
  527. // Else
  528. DBG_Check(24);
  529. goto endif9;
  530. no10:;
  531. DBG_Check(24);
  532. // Continue
  533. continue;
  534. // EndIf
  535. endif9:;
  536. DBG_Check(26);
  537. // EndIf
  538. endif6:;
  539. DBG_Check(27);
  540. //
  541. // Debug Type$ + DirectoryEntryName(hnd) + Size$
  542. DBG_Check(29);
  543. SYS_PushStringBasePosition();
  544. SYS_PushStringBasePosition();
  545. SYS_CopyString(v_typeS);
  546. SYS_PushStringBasePosition();
  547. SYS_PushStringBasePosition();
  548. integer p11=SYS_PopStringBasePosition();
  549. PB_DirectoryEntryName_DEBUG(v_hnd,p11);
  550. PB_DirectoryEntryName(v_hnd,p11);
  551. SYS_PopStringBasePosition();
  552. SYS_CopyString(v_sizeS);
  553. PB_DEBUGGER_PrintString(SYS_PopStringBasePositionValue());
  554. SYS_PopStringBasePositionUpdate();
  555. // Wend
  556. DBG_Check(30);
  557. }
  558. il_wend5:;
  559. // FinishDirectory(hnd)
  560. DBG_Check(31);
  561. PB_FinishDirectory_DEBUG(v_hnd);
  562. integer r5=PB_FinishDirectory(v_hnd);
  563. PB_PURIFIER_Check(0,0,0);
  564. // EndProcedure
  565. DBG_Check(32);
  566. r=0;
  567. end:
  568. PB_DEBUGGER_LeaveProcedure();
  569. SYS_FreeString(v_directoryS);
  570. SYS_FreeString(v_typeS);
  571. SYS_FreeString(v_sizeS);
  572. return r;
  573. }
  574. void PB_DEBUGGER_ChangeString(TCHAR** Target, TCHAR *Value) { SYS_FastAllocateStringFree4(Target, Value); }
  575. void DBG_FatalMessage(int ErrorCode) { PB_DEBUGGER_ErrorCode(6, ErrorCode); PB_DEBUGGER_Check(-1, 0); }
  576. #define PB_DATASECTION_SIZE 0
  577. void DBG_CheckNullPointer(void *pointer) {  if (pointer == 0)  {     DBG_FatalMessage(DBG_NullPointerError);  }}
  578. M_SYSFUNCTION(void) SYS_InitThreadObjectCallback(char *tls) {
  579. }
  580. M_SYSFUNCTION(void) SYS_FreeThreadObjectCallback(char *tls) {
  581. }
  582. //
  583. char PB_OpenGLSubsystem=1;
  584. int PB_Compiler_Unicode=1;
  585. int PB_Compiler_Thread=0;
  586. int PB_Compiler_Purifier=1;
  587. int PB_Compiler_Debugger=1;
  588. int PB_Compiler_DPIAware=0;
  589. int PB_Compiler_Wayland=0;
  590. int PB_ExecutableType=0;
  591. integer PB_ThreadedObjectSize=0;
  592. //
  593. void PB_EndFunctions() {
  594. PB_FreeNetworks();
  595. PB_FreeFileSystem();
  596. PB_FreeObjects();
  597. PB_FreeMemorys();
  598. }
  599. //
  600. int main(int argc, char* argv[]) {
  601. PB_ArgC = argc;
  602. PB_ArgV = argv;
  603. SYS_InitPureBasic();
  604. SYS_InitString();
  605. *(integer *)(&PB_DEBUGGER_ProcedureBank[23])=(integer)&f_listdir;
  606. *(integer *)(&PB_DEBUGGER_ProcedureBank[31])=(integer)&lmv_0;
  607. *(integer *)(&PB_DEBUGGER_ProcedureBank[39])=(integer)&lma_0;
  608. *(integer *)(&PB_DEBUGGER_ProcedureBank[47])=(integer)&lml_0;
  609. *(integer *)(&PB_DEBUGGER_ProcedureBank[55])=(integer)&lmm_0;
  610. PB_DEBUGGER_Start(0, 1);
  611. PB_PURIFIER_Start(0);
  612. PB_InitMap();
  613. PB_InitMemory();
  614. PB_InitArray();
  615. PB_InitNetworkInternal();
  616. tls=SYS_InitThreadedObject();
  617. // EnableExplicit
  618. //
  619. //
  620. // listdir("/")
  621. DBG_Check(34);
  622. integer r0=f_listdir(_S1);
  623. PB_DEBUGGER_SetLine(34);
  624. PB_PURIFIER_Check(0,0,0);
  625. DBG_Check(35);
  626. SYS_Quit();
  627. }
  628.  
  629. void SYS_Quit() {
  630. PB_EndFunctions();
  631. PB_DEBUGGER_End();
  632. exit(PB_ExitCode);
  633. }
  634.  
  635. unsigned char PB_DEBUGGER_CodeContextBank[]={2,0,0,0,1,108,105,115,116,100,105,114,0,32,0,0,0,2,108,105,115,116,100,105,114,0,-1};
  636.  
  637. int PB_DEBUGGER_ValidLines[]={2,3,4,5,7,8,9,10,11,12,13,15,16,17,18,19,20,21,22,23,24,25,26,27,29,30,31,32,34,35,-1};
  638.  
Advertisement
Comments
  • User was banned
  • User was banned
Add Comment
Please, Sign In to add comment