diff --git a/test_programs/GNUmakefile.68k b/test_programs/GNUmakefile.68k index f36f4c8..f7e171d 100644 --- a/test_programs/GNUmakefile.68k +++ b/test_programs/GNUmakefile.68k @@ -1,5 +1,5 @@ # -# $Id: GNUmakefile.68k,v 1.14 2006-09-20 19:46:37 obarthel Exp $ +# $Id: GNUmakefile.68k,v 1.15 2006-09-25 18:20:09 obarthel Exp $ # # :ts=8 # @@ -49,13 +49,13 @@ LIBS = -lm -lc -lgcc all: test fgets_test iotest sscanf_test printf_test sprintf_test \ stack_size_test translate_test strtok_test uname simple \ fstat_stdout_test simple_sprintf date_test sscanf_64 factorial \ - execvp_test setlocale rand fstat_test + execvp_test setlocale rand fstat_test base_dir_nametest clean: $(DELETE) #?.o #?.map test fgets_test iotest sscanf_test printf_test \ sprintf_test stack_size_test translate_test strtok_test uname \ simple fstat_stdout_test fstat_test simple_sprintf date_test sscanf_64 \ - factorial execvp_test setlocale rand + factorial execvp_test setlocale rand base_dir_nametest ############################################################################## @@ -135,6 +135,10 @@ execvp_test : execvp_test.o @echo "Linking $@" $(CC) $(CFLAGS) -o $@ execvp_test.o -lunix $(LIBS) -Wl,--cref,-M,-Map=$@.map +base_dir_nametest : base_dir_nametest.o + @echo "Linking $@" + $(CC) $(CFLAGS) -o $@ base_dir_nametest.o -lunix $(LIBS) -Wl,--cref,-M,-Map=$@.map + rand : rand.o @echo "Linking $@" $(CC) $(CFLAGS) -o $@ rand.o $(LIBS) -Wl,--cref,-M,-Map=$@.map diff --git a/test_programs/base_dir_nametest.c b/test_programs/base_dir_nametest.c new file mode 100644 index 0000000..f5a9f00 --- /dev/null +++ b/test_programs/base_dir_nametest.c @@ -0,0 +1,20 @@ +/* + * $Id: base_dir_nametest.c,v 1.1 2006-09-25 18:20:09 obarthel Exp $ + * + * :ts=4 + */ + +#include +#include +#include + +int +main(int argc,char ** argv) +{ + int i; + + for(i = 1 ; i < argc ; i++) + printf("%s\n\tbasename=%s\n\t dirname=%s\n",argv[i],basename(argv[i]),dirname(argv[i])); + + return(0); +}