From 7272ebfa4fd495b8d52b758c5564f9944a51e3f2 Mon Sep 17 00:00:00 2001 From: zachir Date: Sat, 23 Mar 2024 17:56:01 -0500 Subject: Cleanup lines There were a couple things defined that were never used, this gets rid of them and reorganizes the constants to make things a bit neater. --- src/main.zig | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/main.zig b/src/main.zig index f9c810c..1cf65e3 100644 --- a/src/main.zig +++ b/src/main.zig @@ -13,16 +13,11 @@ const mem = std.mem; const bufferedReader = std.io.bufferedReader; const getcwd = std.os.getcwd; -const MAX_PATH_BYTES = fs.MAX_PATH_BYTES; - const server_addr = "127.0.0.1"; const server_port = 8080; - +const MAX_PATH_BYTES = fs.MAX_PATH_BYTES; const BUFFER_LIMIT = 1 << 21; -const resp = "HTTP/1.0 200 OK\r\nServer: zhttpd\r\nContent-type: text/html\r\n\r\n"; -const def = "Hello, World"; - fn read_files(target: []const u8, buffer: []u8, allocator: mem.Allocator) !usize { var file_path = try allocator.alloc(u8, MAX_PATH_BYTES); defer allocator.free(file_path); -- cgit v1.2.3