浏览代码

LibCore: Move puff() from LibDraw to LibCore

Since it's used both by CGzip and PNGLoader, it seems most appropriate
to keep this in LibCore.
Andreas Kling 5 年之前
父节点
当前提交
35c26a06fc

+ 3 - 4
Libraries/LibCore/CGzip.cpp

@@ -1,12 +1,11 @@
 #include "CGzip.h"
-
 #include <AK/ByteBuffer.h>
 #include <AK/Optional.h>
+#include <LibCore/puff.h>
+#include <LibCore/puff.c>
 #include <limits.h>
 #include <stddef.h>
 
-#include <LibDraw/puff.h>
-
 bool CGzip::is_compressed(const ByteBuffer& data)
 {
     return data.size() > 2 && data[0] == 0x1F && data[1] == 0x8b;
@@ -120,4 +119,4 @@ Optional<ByteBuffer> CGzip::decompress(const ByteBuffer& data)
     }
 
     return destination;
-}
+}

+ 0 - 0
Libraries/LibDraw/puff.c → Libraries/LibCore/puff.c


+ 0 - 0
Libraries/LibDraw/puff.h → Libraries/LibCore/puff.h


+ 1 - 1
Libraries/LibDraw/PNGLoader.cpp

@@ -1,8 +1,8 @@
 #include <AK/FileSystemPath.h>
 #include <AK/MappedFile.h>
 #include <AK/NetworkOrdered.h>
+#include <LibCore/puff.h>
 #include <LibDraw/PNGLoader.h>
-#include <LibDraw/puff.c>
 #include <fcntl.h>
 #include <serenity.h>
 #include <stdio.h>

+ 1 - 1
Servers/ProtocolServer/Makefile

@@ -23,7 +23,7 @@ ProtocolClientEndpoint.h: ProtocolClient.ipc
 	@echo "IPC $<"; $(IPCCOMPILER) $< > $@
 
 $(APP): $(OBJS)
-	$(LD) -o $(APP) $(LDFLAGS) $(OBJS) -lc -lcore -lipc -ldraw
+	$(LD) -o $(APP) $(LDFLAGS) $(OBJS) -lc -lcore -lipc
 
 .cpp.o:
 	@echo "CXX $<"; $(CXX) $(CXXFLAGS) -o $@ -c $<

+ 1 - 1
Servers/WindowServer/Makefile

@@ -26,7 +26,7 @@ DEFINES += -DUSERLAND
 all: $(APP)
 
 $(APP): $(OBJS)
-	$(LD) -o $(APP) $(LDFLAGS) $(OBJS) -lc -lcore -ldraw -lthread -lpthread -laudio -lipc
+	$(LD) -o $(APP) $(LDFLAGS) $(OBJS) -lc -ldraw -lcore -lthread -lpthread -laudio -lipc
 
 .cpp.o:
 	@echo "CXX $<"; $(CXX) $(CXXFLAGS) -o $@ -c $<