commit f3eb8e5

Devine Lu Linvega  ·  2025-01-22 20:26:03 +0000 UTC
parent f76c558
(file.c) Removed unused macros
2 files changed,  +5, -14
+3, -3
 1@@ -8,12 +8,12 @@
 2 @on-reset ( -> )
 3 	( | stat )
 4 	;file .File/name DEO2
 5-	#0004 .File/length DEO2
 6+	#0008 .File/length DEO2
 7 	;stat-mem DUP2 .File/stat DEO2
 8 	<pstr> #0a18 DEO
 9 	( | stat missing )
10 	;file-missing .File/name DEO2
11-	#0004 .File/length DEO2
12+	#0008 .File/length DEO2
13 	;stat-mem DUP2 .File/stat DEO2
14 	<pstr> #0a18 DEO
15 	( | dir )
16@@ -39,7 +39,7 @@
17 @dir ". $1
18 @dir-nested "src/ $1
19 
20-@stat-mem $5
21+@stat-mem "............ $1
22 
23 @mem $200
24 @mem-nested $200
+2, -11
 1@@ -10,30 +10,21 @@
 2 
 3 #ifdef _WIN32
 4 #include <direct.h>
 5-#include <libiberty/libiberty.h>
 6 #define realpath(s, dummy) lrealpath(s)
 7 #define DIR_SEP_CHAR '\\'
 8 #define DIR_SEP_STR "\\"
 9-#define pathcmp(path1, path2, length) strncasecmp(path1, path2, length) /* strncasecmp provided by libiberty */
10-#define notdriveroot(file_name) (file_name[0] != DIR_SEP_CHAR && ((strlen(file_name) > 2 && file_name[1] != ':') || strlen(file_name) <= 2))
11 #define mkdir(file_name) (_mkdir(file_name) == 0)
12 #else
13 #define DIR_SEP_CHAR '/'
14 #define DIR_SEP_STR "/"
15-#define pathcmp(path1, path2, length) strncmp(path1, path2, length)
16-#define notdriveroot(file_name) (file_name[0] != DIR_SEP_CHAR)
17 #define mkdir(file_name) (mkdir(file_name, 0755) == 0)
18 #endif
19 
20-#ifndef PATH_MAX
21-#define PATH_MAX 4096
22-#endif
23-
24 #include "../uxn.h"
25 #include "file.h"
26 
27 /*
28-Copyright (c) 2021-2023 Devine Lu Linvega, Andrew Alderwick
29+Copyright (c) 2021-2025 Devine Lu Linvega, Andrew Alderwick
30 
31 Permission to use, copy, modify, and distribute this software for any
32 purpose with or without fee is hereby granted, provided that the above
33@@ -46,7 +37,7 @@ WITH REGARD TO THIS SOFTWARE.
34 typedef struct {
35 	FILE *f;
36 	DIR *dir;
37-	char filepath[4096];
38+	char filepath[0x2000];
39 	enum { IDLE,
40 		FILE_READ,
41 		FILE_WRITE,