- Added the sscanf_64 test program.

git-svn-id: file:///Users/olsen/Code/migration-svn-zu-git/logical-line-staging/clib2/trunk@15022 87f5fb63-7c3d-0410-a384-fd976d0f7a62
This commit is contained in:
Olaf Barthel
2005-08-27 12:52:26 +00:00
parent 1d1d340ae1
commit 4cde124d5d
3 changed files with 37 additions and 6 deletions
+7 -3
View File
@@ -1,5 +1,5 @@
# #
# $Id: GNUmakefile.68k,v 1.8 2005-08-26 12:21:51 obarthel Exp $ # $Id: GNUmakefile.68k,v 1.9 2005-08-27 12:52:26 obarthel Exp $
# #
# :ts=8 # :ts=8
# #
@@ -48,12 +48,12 @@ LIBS = -lm -lc -lgcc
all: test fgets_test iotest sscanf_test printf_test sprintf_test \ all: test fgets_test iotest sscanf_test printf_test sprintf_test \
stack_size_test translate_test strtok_test uname simple \ stack_size_test translate_test strtok_test uname simple \
fstat_stdout_test simple_sprintf date_test fstat_stdout_test simple_sprintf date_test sscanf_64
clean: clean:
$(DELETE) #?.o #?.map test fgets_test iotest sscanf_test printf_test \ $(DELETE) #?.o #?.map test fgets_test iotest sscanf_test printf_test \
sprintf_test stack_size_test translate_test strtok_test uname \ sprintf_test stack_size_test translate_test strtok_test uname \
simple fstat_stdout_test simple_sprintf date_test simple fstat_stdout_test simple_sprintf date_test sscanf_64
############################################################################## ##############################################################################
@@ -113,6 +113,10 @@ date_test : date_test.o
@echo "Linking $@" @echo "Linking $@"
$(CC) $(CFLAGS) -o $@ date_test.o $(LIBS) -Wl,--cref,-M,-Map=$@.map $(CC) $(CFLAGS) -o $@ date_test.o $(LIBS) -Wl,--cref,-M,-Map=$@.map
sscanf_64 : sscanf_64.o
@echo "Linking $@"
$(CC) $(CFLAGS) -o $@ sscanf_64.o $(LIBS) -Wl,--cref,-M,-Map=$@.map
############################################################################## ##############################################################################
mkid: mkid:
+8 -3
View File
@@ -1,5 +1,5 @@
# #
# $Id: GNUmakefile.os4,v 1.9 2005-08-26 12:21:51 obarthel Exp $ # $Id: GNUmakefile.os4,v 1.10 2005-08-27 12:52:26 obarthel Exp $
# #
# :ts=8 # :ts=8
# #
@@ -40,12 +40,13 @@ LIBS = -lm -lc -ldebug -lgcc
all: test fgets_test iotest sscanf_test printf_test sprintf_test \ all: test fgets_test iotest sscanf_test printf_test sprintf_test \
stack_size_test translate_test strtok_test uname simple \ stack_size_test translate_test strtok_test uname simple \
fstat_stdout_test simple_sprintf date_test fstat_stdout_test simple_sprintf date_test sscanf_64
clean: clean:
$(DELETE) *.o *.map test fgets_test iotest sscanf_test printf_test \ $(DELETE) *.o *.map test fgets_test iotest sscanf_test printf_test \
sprintf_test stack_size_test translate_test strtok_test \ sprintf_test stack_size_test translate_test strtok_test \
uname simple fstat_stdout_test simple_sprintf date_test uname simple fstat_stdout_test simple_sprintf date_test \
sscanf_64
############################################################################## ##############################################################################
@@ -104,3 +105,7 @@ fstat_stdout_test : fstat_stdout_test.o
simple_sprintf : simple_sprintf.o simple_sprintf : simple_sprintf.o
@echo "Linking $@" @echo "Linking $@"
$(CC) -nostdlib $(CFLAGS) -o $@ simple_sprintf.o -lc -lgcc -Wl,--cref,-M,-Map=$@.map $(CC) -nostdlib $(CFLAGS) -o $@ simple_sprintf.o -lc -lgcc -Wl,--cref,-M,-Map=$@.map
sscanf_64 : sscanf_64.o
@echo "Linking $@"
$(CC) -nostdlib $(CFLAGS) -o $@ sscanf_64.o -lc -lgcc -Wl,--cref,-M,-Map=$@.map
+22
View File
@@ -0,0 +1,22 @@
#include <stdio.h>
/*extern int __debug_level;*/
int
main (int argc, char **argv)
{
long long int l;
char * arg;
/*__debug_level = 2;*/
if(argc > 1)
arg = argv[1];
else
arg = "123456789012";
sscanf (arg, "%lld", &l);
printf ("number = %lld = 0x%llX\n", l, l);
return(0);
}