From 887e7ab6c5a13398e5986c7054235a135e6429f9 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 16 Dec 2000 07:54:18 +0000 Subject: Update. 2000-12-13 Jakub Jelinek * misc/efgcvt.c (FCVT_MAXDIG): Define. (FCVT_BUFPTR): New variable. (fcvt): If fcvt_r returns -1 on the static short buffer, try to malloc a sufficiently large one and retry. (free_mem): New function. * misc/qefgcvt.c (FCVT_MAXDIG): Define. * misc/tst-efgcvt.c (fcvt_tests): Add new test. 2000-12-15 Ulrich Drepper * misc/dirname.c (dirname): Fix search for second to last slash. 2000-12-13 Andreas Jaeger * misc/tst-dirname.c (main): Fix typo in test to really use the examples from Unix98. Reported by Michael Kerrisk . --- misc/tst-dirname.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'misc/tst-dirname.c') diff --git a/misc/tst-dirname.c b/misc/tst-dirname.c index fd24488..e688bd3 100644 --- a/misc/tst-dirname.c +++ b/misc/tst-dirname.c @@ -24,7 +24,7 @@ #include -int +static int test (const char *input, const char *result) { int retval; @@ -45,11 +45,15 @@ main (void) /* These are the examples given in XPG4.2. */ result |= test ("/usr/lib", "/usr"); - result |= test ("/usr", "/"); + result |= test ("/usr/", "/"); result |= test ("usr", "."); result |= test ("/", "/"); result |= test (".", "."); result |= test ("..", "."); + /* Some more tests. */ + result |= test ("/usr/lib/", "/usr"); + result |= test ("/usr", "/"); + return result != 0; } -- cgit v1.1