cosmetic fixes
authornsz <nsz@port70.net>
Sat, 13 Oct 2012 19:29:39 +0000 (21:29 +0200)
committernsz <nsz@port70.net>
Sat, 13 Oct 2012 19:29:39 +0000 (21:29 +0200)
src/misc/basename.c
src/misc/dirname.c
src/process/Makefile
src/stdlib/Makefile
src/string/Makefile

index 071966a..a993587 100644 (file)
@@ -5,7 +5,7 @@
 
 #define T(path, want) \
 { \
-       char tmp[1000]; \
+       char tmp[100]; \
        char *got = basename(strcpy(tmp, path)); \
        if (strcmp(want, got) != 0) \
                error("basename(\"%s\") got \"%s\" want \"%s\"\n", path, got, want); \
@@ -13,7 +13,7 @@
 
 int main()
 {
-       if (strcmp(".", basename(0)) != 0)
+       if (strcmp(basename(0), ".") != 0)
                error("basename(0) returned \"%s\"; expected \".\"\n", basename(0));
        T("", ".");
        T("/usr/lib", "lib");
@@ -22,5 +22,7 @@ int main()
        T("/", "/");
        T("///", "/");
        T("//usr//lib//", "lib");
+       T(".", ".");
+       T("..", "..");
        return test_status;
 }
index ae8b67b..7a15a0a 100644 (file)
@@ -5,7 +5,7 @@
 
 #define T(path, want) \
 { \
-       char tmp[1000]; \
+       char tmp[100]; \
        char *got = dirname(strcpy(tmp, path)); \
        if (strcmp(want, got) != 0) \
                error("dirname(\"%s\") got \"%s\" want \"%s\"\n", path, got, want); \
index 278e884..ee4552b 100644 (file)
@@ -1,2 +1 @@
-TROOT=../..
-include $(TROOT)/Makefile.inc
+include ../../Makefile.inc
index 645640b..e8f62fa 100644 (file)
@@ -1,3 +1,3 @@
 include ../../Makefile.inc
-LDFLAGS+=-lm
+strtod_simple: LDFLAGS+=-lm
 
index 4105e2a..ee4552b 100644 (file)
@@ -1,2 +1 @@
 include ../../Makefile.inc
-