shithub: libobj

Download patch

ref: b86030fbaa1c1522f1d4f996ad763e2c3880bac9
parent: 8954159bc44bcc91f25fb4395c86461d4d32f8ae
author: rodri <rgl@antares-labs.eu>
date: Sat Nov 11 04:16:04 EST 2023

fix paths in the test program.

diff -u a/test/main.c b/test/main.c
--- a/test/main.c
+++ b/test/main.c
@@ -1,6 +1,6 @@
 #include <u.h>
 #include <libc.h>
-#include "../../obj.h"
+#include "../obj.h"
 
 static char fd0[] = "/fd/0";
 
@@ -26,10 +26,12 @@
 		usage();
 	if(argc == 1)
 		f = argv[0];
+
 	obj = objparse(f);
 	if(obj == nil)
 		sysfatal("objparse: %r");
+
 	print("%O\n", obj);
 	objfree(obj);
-	exits(0);
+	exits(nil);
 }
diff -u a/test/mkfile b/test/mkfile
--- a/test/mkfile
+++ b/test/mkfile
@@ -5,14 +5,14 @@
 OFILES=\
 	main.$O\
 
-HFILES=../../obj.h
+HFILES=../obj.h
 
 LIB=\
-	../../libobj.a$O\
+	../libobj.a$O\
 
 </sys/src/cmd/mkone
 
-../../libobj.a$O:
+../libobj.a$O:
 	cd ..
 	mk install
 
--- a/test/main.c
+++ b/test/main.c
@@ -1,6 +1,6 @@
 #include <u.h>
 #include <libc.h>
-#include "../../obj.h"
+#include "../obj.h"
 
 static char fd0[] = "/fd/0";
 
@@ -26,10 +26,12 @@
 		usage();
 	if(argc == 1)
 		f = argv[0];
+
 	obj = objparse(f);
 	if(obj == nil)
 		sysfatal("objparse: %r");
+
 	print("%O\n", obj);
 	objfree(obj);
-	exits(0);
+	exits(nil);
 }
--- a/test/mkfile
+++ b/test/mkfile
@@ -5,14 +5,14 @@
 OFILES=\
 	main.$O\
 
-HFILES=../../obj.h
+HFILES=../obj.h
 
 LIB=\
-	../../libobj.a$O\
+	../libobj.a$O\
 
 </sys/src/cmd/mkone
 
-../../libobj.a$O:
+../libobj.a$O:
 	cd ..
 	mk install