From 1965abf2f75845c286c354d0b112306421890f55 Mon Sep 17 00:00:00 2001 From: nudt Date: Sat, 3 Jul 2021 02:58:48 +0100 Subject: [PATCH] tar things --- linux-0.11-lab/0/linux/init/main.c | 0 linux-0.11-lab/b/Makefile | 12 + linux-0.11-lab/b/execve | Bin 0 -> 7399 bytes linux-0.11-lab/b/execve.c | 21 + linux-0.11-lab/b/execve2.c | 25 + linux-0.11-lab/newlibc/Makefile | 62 + linux-0.11-lab/newlibc/README | 73 ++ linux-0.11-lab/newlibc/README.wen | 1 + linux-0.11-lab/newlibc/ansi/Makefile | 46 + linux-0.11-lab/newlibc/ansi/abort.c | 12 + linux-0.11-lab/newlibc/ansi/abs.c | 15 + linux-0.11-lab/newlibc/ansi/atof.c | 44 + linux-0.11-lab/newlibc/ansi/atoi.c | 16 + linux-0.11-lab/newlibc/ansi/bsearch.c | 56 + linux-0.11-lab/newlibc/ansi/ctime.c | 142 +++ linux-0.11-lab/newlibc/ansi/ctype.c | 29 + linux-0.11-lab/newlibc/ansi/div.c | 24 + linux-0.11-lab/newlibc/ansi/errno.c | 5 + linux-0.11-lab/newlibc/ansi/ftime.c | 19 + linux-0.11-lab/newlibc/ansi/getenv.c | 25 + linux-0.11-lab/newlibc/ansi/gettimeofday.c | 17 + linux-0.11-lab/newlibc/ansi/isatty.c | 15 + linux-0.11-lab/newlibc/ansi/qsort.c | 239 ++++ linux-0.11-lab/newlibc/ansi/rand.c | 19 + linux-0.11-lab/newlibc/ansi/strerror.c | 60 + linux-0.11-lab/newlibc/ansi/strftime.c | 312 +++++ linux-0.11-lab/newlibc/ansi/string.c | 13 + linux-0.11-lab/newlibc/ansi/strtol.c | 91 ++ linux-0.11-lab/newlibc/ansi/system.c | 30 + linux-0.11-lab/newlibc/ansi/tzset.c | 47 + linux-0.11-lab/newlibc/copying.dj | 46 + linux-0.11-lab/newlibc/crt/Makefile | 40 + linux-0.11-lab/newlibc/crt/crt0.s | 55 + linux-0.11-lab/newlibc/dirent/Makefile | 46 + linux-0.11-lab/newlibc/dirent/closedir.c | 24 + linux-0.11-lab/newlibc/dirent/opendir.c | 31 + linux-0.11-lab/newlibc/dirent/readdir.c | 46 + linux-0.11-lab/newlibc/dirent/rewinddir.c | 19 + linux-0.11-lab/newlibc/grp/Makefile | 44 + linux-0.11-lab/newlibc/grp/fgetgrent.c | 41 + linux-0.11-lab/newlibc/grp/getgrent.c | 67 + linux-0.11-lab/newlibc/grp/getgrgid.c | 50 + linux-0.11-lab/newlibc/grp/getgrnam.c | 50 + linux-0.11-lab/newlibc/grp/grpopen.c | 28 + linux-0.11-lab/newlibc/grp/grpread.c | 132 ++ linux-0.11-lab/newlibc/grp/initgroups.c | 66 + linux-0.11-lab/newlibc/include/a.out.h | 222 ++++ linux-0.11-lab/newlibc/include/ansidecl.h | 108 ++ linux-0.11-lab/newlibc/include/ar.h | 20 + linux-0.11-lab/newlibc/include/asm/io.h | 24 + linux-0.11-lab/newlibc/include/asm/memory.h | 14 + linux-0.11-lab/newlibc/include/asm/segment.h | 65 + linux-0.11-lab/newlibc/include/asm/system.h | 66 + linux-0.11-lab/newlibc/include/assert.h | 34 + linux-0.11-lab/newlibc/include/blocksize.h | 6 + linux-0.11-lab/newlibc/include/const.h | 16 + linux-0.11-lab/newlibc/include/ctype.h | 34 + linux-0.11-lab/newlibc/include/dirent.h | 33 + linux-0.11-lab/newlibc/include/errno.h | 60 + linux-0.11-lab/newlibc/include/fcntl.h | 56 + linux-0.11-lab/newlibc/include/float.h | 25 + linux-0.11-lab/newlibc/include/getopt.h | 11 + linux-0.11-lab/newlibc/include/gnu-stabs.h | 83 ++ linux-0.11-lab/newlibc/include/grp.h | 101 ++ linux-0.11-lab/newlibc/include/limits.h | 59 + linux-0.11-lab/newlibc/include/linux/config.h | 48 + linux-0.11-lab/newlibc/include/linux/fdreg.h | 71 ++ linux-0.11-lab/newlibc/include/linux/fs.h | 202 +++ linux-0.11-lab/newlibc/include/linux/hdreg.h | 65 + linux-0.11-lab/newlibc/include/linux/head.h | 20 + linux-0.11-lab/newlibc/include/linux/kernel.h | 22 + linux-0.11-lab/newlibc/include/linux/mm.h | 10 + linux-0.11-lab/newlibc/include/linux/sched.h | 233 ++++ linux-0.11-lab/newlibc/include/linux/sys.h | 86 ++ linux-0.11-lab/newlibc/include/linux/tty.h | 77 ++ linux-0.11-lab/newlibc/include/localeinfo.h | 208 +++ linux-0.11-lab/newlibc/include/math.h | 31 + linux-0.11-lab/newlibc/include/pwd.h | 89 ++ linux-0.11-lab/newlibc/include/regex.h | 257 ++++ linux-0.11-lab/newlibc/include/setjmp.h | 16 + linux-0.11-lab/newlibc/include/signal.h | 69 + linux-0.11-lab/newlibc/include/stdarg.h | 28 + linux-0.11-lab/newlibc/include/stddef.h | 19 + linux-0.11-lab/newlibc/include/stdio.h | 256 ++++ linux-0.11-lab/newlibc/include/stdlib.h | 43 + linux-0.11-lab/newlibc/include/string.h | 405 ++++++ linux-0.11-lab/newlibc/include/strings.h | 1 + linux-0.11-lab/newlibc/include/sys/dir.h | 16 + linux-0.11-lab/newlibc/include/sys/dirent.h | 13 + linux-0.11-lab/newlibc/include/sys/file.h | 10 + linux-0.11-lab/newlibc/include/sys/ioctl.h | 4 + linux-0.11-lab/newlibc/include/sys/param.h | 6 + linux-0.11-lab/newlibc/include/sys/stat.h | 58 + .../newlibc/include/sys/sysmacros.h | 8 + linux-0.11-lab/newlibc/include/sys/time.h | 55 + linux-0.11-lab/newlibc/include/sys/timeb.h | 13 + linux-0.11-lab/newlibc/include/sys/times.h | 15 + linux-0.11-lab/newlibc/include/sys/types.h | 46 + linux-0.11-lab/newlibc/include/sys/utsname.h | 16 + linux-0.11-lab/newlibc/include/sys/varargs.h | 19 + linux-0.11-lab/newlibc/include/sys/wait.h | 23 + linux-0.11-lab/newlibc/include/termcap.h | 11 + linux-0.11-lab/newlibc/include/termio.h | 1 + linux-0.11-lab/newlibc/include/termios.h | 225 ++++ linux-0.11-lab/newlibc/include/time.h | 49 + linux-0.11-lab/newlibc/include/unistd.h | 269 ++++ linux-0.11-lab/newlibc/include/utime.h | 13 + linux-0.11-lab/newlibc/include/varargs.h | 19 + linux-0.11-lab/newlibc/malloc/Makefile | 18 + linux-0.11-lab/newlibc/malloc/README | 4 + linux-0.11-lab/newlibc/malloc/ansidecl.h | 93 ++ linux-0.11-lab/newlibc/malloc/free.c | 192 +++ linux-0.11-lab/newlibc/malloc/gmalloc.c | 1130 +++++++++++++++++ linux-0.11-lab/newlibc/malloc/gmalloc.c.old | 1111 ++++++++++++++++ linux-0.11-lab/newlibc/malloc/gmalloc.sed | 15 + linux-0.11-lab/newlibc/malloc/gmalloc.skel | 54 + linux-0.11-lab/newlibc/malloc/limits.h | 43 + linux-0.11-lab/newlibc/malloc/malloc.c.1 | 308 +++++ linux-0.11-lab/newlibc/malloc/malloc.h | 156 +++ linux-0.11-lab/newlibc/malloc/mcheck.c | 113 ++ linux-0.11-lab/newlibc/malloc/mstats.c | 38 + linux-0.11-lab/newlibc/malloc/realloc.c | 137 ++ linux-0.11-lab/newlibc/malloc/stddef.h | 24 + linux-0.11-lab/newlibc/malloc/stdlib.h | 10 + linux-0.11-lab/newlibc/malloc/string.h | 8 + linux-0.11-lab/newlibc/malloc/unix.c | 41 + linux-0.11-lab/newlibc/malloc/valloc.c | 42 + linux-0.11-lab/newlibc/math/Makefile | 44 + linux-0.11-lab/newlibc/math/acos.s | 35 + linux-0.11-lab/newlibc/math/acosh.c | 6 + linux-0.11-lab/newlibc/math/asin.s | 28 + linux-0.11-lab/newlibc/math/asinh.c | 7 + linux-0.11-lab/newlibc/math/atan.s | 21 + linux-0.11-lab/newlibc/math/atan2.s | 21 + linux-0.11-lab/newlibc/math/atanh.c | 6 + linux-0.11-lab/newlibc/math/ceil.s | 37 + linux-0.11-lab/newlibc/math/cos.s | 29 + linux-0.11-lab/newlibc/math/cosh.c | 6 + linux-0.11-lab/newlibc/math/erf.c | 124 ++ linux-0.11-lab/newlibc/math/exp.s | 92 ++ linux-0.11-lab/newlibc/math/fabs.s | 5 + linux-0.11-lab/newlibc/math/floor.s | 37 + linux-0.11-lab/newlibc/math/fmod.s | 43 + linux-0.11-lab/newlibc/math/frexp.c | 17 + linux-0.11-lab/newlibc/math/hypot.c | 6 + linux-0.11-lab/newlibc/math/j0.c | 208 +++ linux-0.11-lab/newlibc/math/j1.c | 214 ++++ linux-0.11-lab/newlibc/math/jn.c | 122 ++ linux-0.11-lab/newlibc/math/lgamma.c | 143 +++ linux-0.11-lab/newlibc/math/log.s | 20 + linux-0.11-lab/newlibc/math/log10.s | 20 + linux-0.11-lab/newlibc/math/sin.s | 29 + linux-0.11-lab/newlibc/math/sinh.c | 7 + linux-0.11-lab/newlibc/math/sqrt.s | 19 + linux-0.11-lab/newlibc/math/tan.s | 30 + linux-0.11-lab/newlibc/math/tanh.c | 7 + linux-0.11-lab/newlibc/misc/Makefile | 52 + linux-0.11-lab/newlibc/misc/README | 7 + linux-0.11-lab/newlibc/misc/atexit.c | 55 + linux-0.11-lab/newlibc/misc/bcopy.s | 105 ++ linux-0.11-lab/newlibc/misc/exit.c | 32 + linux-0.11-lab/newlibc/misc/frexp.c | 26 + linux-0.11-lab/newlibc/misc/ldexp.c | 11 + linux-0.11-lab/newlibc/misc/modf.c | 120 ++ linux-0.11-lab/newlibc/misc/perror.c | 48 + linux-0.11-lab/newlibc/misc/readv.c | 40 + linux-0.11-lab/newlibc/misc/tmpnam.c | 105 ++ linux-0.11-lab/newlibc/misc/values.s | 53 + linux-0.11-lab/newlibc/misc/writev.c | 38 + linux-0.11-lab/newlibc/mlinux/Makefile | 36 + linux-0.11-lab/newlibc/mlinux/README | 8 + linux-0.11-lab/newlibc/mlinux/acos.s | 33 + linux-0.11-lab/newlibc/mlinux/acosh.s | 30 + linux-0.11-lab/newlibc/mlinux/asin.s | 29 + linux-0.11-lab/newlibc/mlinux/asinh.s | 27 + linux-0.11-lab/newlibc/mlinux/atan.s | 21 + linux-0.11-lab/newlibc/mlinux/atan2.s | 22 + linux-0.11-lab/newlibc/mlinux/atanh.s | 35 + linux-0.11-lab/newlibc/mlinux/ceil.s | 38 + linux-0.11-lab/newlibc/mlinux/cos.s | 32 + linux-0.11-lab/newlibc/mlinux/cosh.s | 50 + linux-0.11-lab/newlibc/mlinux/erf.c | 124 ++ linux-0.11-lab/newlibc/mlinux/exp.s | 92 ++ linux-0.11-lab/newlibc/mlinux/fabs.s | 14 + linux-0.11-lab/newlibc/mlinux/floor.s | 38 + linux-0.11-lab/newlibc/mlinux/fmod.s | 36 + linux-0.11-lab/newlibc/mlinux/frexp.c | 17 + linux-0.11-lab/newlibc/mlinux/hypot.s | 23 + linux-0.11-lab/newlibc/mlinux/j0.c | 208 +++ linux-0.11-lab/newlibc/mlinux/j1.c | 214 ++++ linux-0.11-lab/newlibc/mlinux/jn.c | 122 ++ linux-0.11-lab/newlibc/mlinux/lgamma.c | 143 +++ linux-0.11-lab/newlibc/mlinux/log.s | 20 + linux-0.11-lab/newlibc/mlinux/log10.s | 20 + linux-0.11-lab/newlibc/mlinux/math.h | 47 + linux-0.11-lab/newlibc/mlinux/sin.s | 32 + linux-0.11-lab/newlibc/mlinux/sinh.s | 50 + linux-0.11-lab/newlibc/mlinux/sqrt.s | 19 + linux-0.11-lab/newlibc/mlinux/tan.s | 31 + linux-0.11-lab/newlibc/mlinux/tanh.s | 63 + linux-0.11-lab/newlibc/other/Makefile | 47 + linux-0.11-lab/newlibc/other/getcwd.c | 163 +++ linux-0.11-lab/newlibc/other/getopt.c | 431 +++++++ linux-0.11-lab/newlibc/other/mktemp.c | 16 + linux-0.11-lab/newlibc/other/popen.c | 58 + linux-0.11-lab/newlibc/other/setjmp.s | 45 + linux-0.11-lab/newlibc/other/sig_restore.s | 20 + linux-0.11-lab/newlibc/posix/Makefile | 55 + linux-0.11-lab/newlibc/posix/cfsetget.c | 26 + linux-0.11-lab/newlibc/posix/rename.c | 4 + linux-0.11-lab/newlibc/posix/sigmask.c | 76 ++ linux-0.11-lab/newlibc/posix/sleep.c | 66 + linux-0.11-lab/newlibc/posix/sysconf.c | 37 + linux-0.11-lab/newlibc/posix/tcattr.c | 34 + linux-0.11-lab/newlibc/posix/tcflow.c | 7 + linux-0.11-lab/newlibc/posix/tcsetpgrp.c | 19 + linux-0.11-lab/newlibc/posix/ttyname.c | 79 ++ linux-0.11-lab/newlibc/pwd/Makefile | 46 + linux-0.11-lab/newlibc/pwd/fgetpwent.c | 40 + linux-0.11-lab/newlibc/pwd/getpw.c | 48 + linux-0.11-lab/newlibc/pwd/getpwent.c | 67 + linux-0.11-lab/newlibc/pwd/getpwnam.c | 50 + linux-0.11-lab/newlibc/pwd/getpwuid.c | 50 + linux-0.11-lab/newlibc/pwd/putpwent.c | 41 + linux-0.11-lab/newlibc/pwd/pwdopen.c | 28 + linux-0.11-lab/newlibc/pwd/pwdread.c | 115 ++ linux-0.11-lab/newlibc/soft/Makefile | 41 + linux-0.11-lab/newlibc/soft/README | 20 + linux-0.11-lab/newlibc/soft/asin.c | 44 + linux-0.11-lab/newlibc/soft/atan.c | 97 ++ linux-0.11-lab/newlibc/soft/const.c | 41 + linux-0.11-lab/newlibc/soft/erf.c | 124 ++ linux-0.11-lab/newlibc/soft/exp.c | 40 + linux-0.11-lab/newlibc/soft/fabs.c | 8 + linux-0.11-lab/newlibc/soft/floor.c | 26 + linux-0.11-lab/newlibc/soft/frexp.c | 17 + linux-0.11-lab/newlibc/soft/hypot.c | 25 + linux-0.11-lab/newlibc/soft/j0.c | 183 +++ linux-0.11-lab/newlibc/soft/j1.c | 188 +++ linux-0.11-lab/newlibc/soft/jn.c | 101 ++ linux-0.11-lab/newlibc/soft/ldexp.c | 13 + linux-0.11-lab/newlibc/soft/lgamma.c | 146 +++ linux-0.11-lab/newlibc/soft/log.c | 53 + linux-0.11-lab/newlibc/soft/main.c | 16 + linux-0.11-lab/newlibc/soft/modf.c | 54 + linux-0.11-lab/newlibc/soft/pow.c | 33 + linux-0.11-lab/newlibc/soft/sin.c | 67 + linux-0.11-lab/newlibc/soft/sinh.c | 65 + linux-0.11-lab/newlibc/soft/soft.h | 46 + linux-0.11-lab/newlibc/soft/soft.h.old | 62 + linux-0.11-lab/newlibc/soft/sqrt.c | 51 + linux-0.11-lab/newlibc/soft/tan.c | 67 + linux-0.11-lab/newlibc/soft/tanh.c | 25 + linux-0.11-lab/newlibc/stdio/Makefile | 51 + linux-0.11-lab/newlibc/stdio/clrerr.c | 19 + linux-0.11-lab/newlibc/stdio/doprnt.c | 717 +++++++++++ linux-0.11-lab/newlibc/stdio/doscan.c | 301 +++++ linux-0.11-lab/newlibc/stdio/fdopen.c | 93 ++ linux-0.11-lab/newlibc/stdio/fgetc.c | 18 + linux-0.11-lab/newlibc/stdio/fgets.c | 29 + linux-0.11-lab/newlibc/stdio/filbuf.c | 87 ++ linux-0.11-lab/newlibc/stdio/findiop.c | 148 +++ linux-0.11-lab/newlibc/stdio/flsbuf.c | 170 +++ linux-0.11-lab/newlibc/stdio/fopen.c | 92 ++ linux-0.11-lab/newlibc/stdio/fprintf.c | 59 + linux-0.11-lab/newlibc/stdio/fputc.c | 17 + linux-0.11-lab/newlibc/stdio/fputs.c | 50 + linux-0.11-lab/newlibc/stdio/fread.c | 56 + linux-0.11-lab/newlibc/stdio/freopen.c | 89 ++ linux-0.11-lab/newlibc/stdio/fseek.c | 70 + linux-0.11-lab/newlibc/stdio/ftell.c | 62 + linux-0.11-lab/newlibc/stdio/fwrite.c | 60 + linux-0.11-lab/newlibc/stdio/getchar.c | 22 + linux-0.11-lab/newlibc/stdio/gets.c | 27 + linux-0.11-lab/newlibc/stdio/getw.c | 27 + linux-0.11-lab/newlibc/stdio/printf.c | 43 + linux-0.11-lab/newlibc/stdio/putchar.c | 23 + linux-0.11-lab/newlibc/stdio/puts.c | 22 + linux-0.11-lab/newlibc/stdio/putw.c | 23 + linux-0.11-lab/newlibc/stdio/rew.c | 47 + linux-0.11-lab/newlibc/stdio/scanf.c | 56 + linux-0.11-lab/newlibc/stdio/setbuf.c | 42 + linux-0.11-lab/newlibc/stdio/setbuffe.c | 62 + linux-0.11-lab/newlibc/stdio/setvbuf.c | 54 + linux-0.11-lab/newlibc/stdio/sprintf.c | 48 + linux-0.11-lab/newlibc/stdio/ungetc.c | 30 + linux-0.11-lab/newlibc/stdio/vfprintf.c | 55 + linux-0.11-lab/newlibc/stdio/vprintf.c | 43 + linux-0.11-lab/newlibc/stdio/vsprintf.c | 48 + linux-0.11-lab/newlibc/termcap/COPYING | 339 +++++ linux-0.11-lab/newlibc/termcap/COPYING.LIB | 481 +++++++ linux-0.11-lab/newlibc/termcap/ChangeLog | 26 + linux-0.11-lab/newlibc/termcap/Makefile.in | 80 ++ linux-0.11-lab/newlibc/termcap/README | 42 + linux-0.11-lab/newlibc/termcap/bsearch.c | 61 + linux-0.11-lab/newlibc/termcap/configure | 129 ++ linux-0.11-lab/newlibc/termcap/conversions.c | 337 +++++ linux-0.11-lab/newlibc/termcap/getopt.c | 596 +++++++++ linux-0.11-lab/newlibc/termcap/getopt.h | 102 ++ linux-0.11-lab/newlibc/termcap/getopt1.c | 160 +++ linux-0.11-lab/newlibc/termcap/makefile | 45 + linux-0.11-lab/newlibc/termcap/termcap.c | 681 ++++++++++ linux-0.11-lab/newlibc/termcap/termcap.h | 42 + linux-0.11-lab/newlibc/termcap/tparam.c | 283 +++++ linux-0.11-lab/newlibc/termcap/tput.c | 341 +++++ linux-0.11-lab/newlibc/termcap/tput.h | 35 + linux-0.11-lab/newlibc/termcap/tput.texinfo | 651 ++++++++++ linux-0.11-lab/newlibc/unistd/Makefile | 53 + linux-0.11-lab/newlibc/unistd/_exit.c | 12 + linux-0.11-lab/newlibc/unistd/access.c | 4 + linux-0.11-lab/newlibc/unistd/acct.c | 4 + linux-0.11-lab/newlibc/unistd/alarm.c | 4 + linux-0.11-lab/newlibc/unistd/brk.c | 48 + linux-0.11-lab/newlibc/unistd/chdir.c | 4 + linux-0.11-lab/newlibc/unistd/chmod.c | 4 + linux-0.11-lab/newlibc/unistd/chown.c | 4 + linux-0.11-lab/newlibc/unistd/chroot.c | 4 + linux-0.11-lab/newlibc/unistd/close.c | 4 + linux-0.11-lab/newlibc/unistd/creat.c | 4 + linux-0.11-lab/newlibc/unistd/dup.c | 4 + linux-0.11-lab/newlibc/unistd/dup2.c | 4 + linux-0.11-lab/newlibc/unistd/exec.c | 30 + linux-0.11-lab/newlibc/unistd/execp.c | 60 + linux-0.11-lab/newlibc/unistd/execve.c | 4 + linux-0.11-lab/newlibc/unistd/fcntl.c | 27 + linux-0.11-lab/newlibc/unistd/fork.c | 4 + linux-0.11-lab/newlibc/unistd/fstat.c | 4 + linux-0.11-lab/newlibc/unistd/getegid.c | 4 + linux-0.11-lab/newlibc/unistd/geteuid.c | 4 + linux-0.11-lab/newlibc/unistd/getgid.c | 4 + linux-0.11-lab/newlibc/unistd/getgroups.c | 4 + linux-0.11-lab/newlibc/unistd/gethostnam.c | 16 + linux-0.11-lab/newlibc/unistd/getpgrp.c | 4 + linux-0.11-lab/newlibc/unistd/getpid.c | 4 + linux-0.11-lab/newlibc/unistd/getppid.c | 4 + linux-0.11-lab/newlibc/unistd/getrlimit.c | 4 + linux-0.11-lab/newlibc/unistd/getrusage.c | 5 + linux-0.11-lab/newlibc/unistd/gettime.c | 5 + linux-0.11-lab/newlibc/unistd/getuid.c | 4 + linux-0.11-lab/newlibc/unistd/ioctl.c | 27 + linux-0.11-lab/newlibc/unistd/kill.c | 4 + linux-0.11-lab/newlibc/unistd/link.c | 4 + linux-0.11-lab/newlibc/unistd/lseek.c | 4 + linux-0.11-lab/newlibc/unistd/lstat.c | 4 + linux-0.11-lab/newlibc/unistd/mkdir.c | 4 + linux-0.11-lab/newlibc/unistd/mknod.c | 4 + linux-0.11-lab/newlibc/unistd/mount.c | 4 + linux-0.11-lab/newlibc/unistd/nice.c | 4 + linux-0.11-lab/newlibc/unistd/open.c | 27 + linux-0.11-lab/newlibc/unistd/pause.c | 4 + linux-0.11-lab/newlibc/unistd/pipe.c | 4 + linux-0.11-lab/newlibc/unistd/read.c | 4 + linux-0.11-lab/newlibc/unistd/readlink.c | 4 + linux-0.11-lab/newlibc/unistd/rmdir.c | 4 + linux-0.11-lab/newlibc/unistd/select.c | 24 + linux-0.11-lab/newlibc/unistd/setgid.c | 4 + linux-0.11-lab/newlibc/unistd/setgroups.c | 4 + linux-0.11-lab/newlibc/unistd/sethostnam.c | 5 + linux-0.11-lab/newlibc/unistd/setpgrp.c | 9 + linux-0.11-lab/newlibc/unistd/setregid.c | 4 + linux-0.11-lab/newlibc/unistd/setreuid.c | 4 + linux-0.11-lab/newlibc/unistd/setrlimit.c | 4 + linux-0.11-lab/newlibc/unistd/setsid.c | 4 + linux-0.11-lab/newlibc/unistd/settime.c | 4 + linux-0.11-lab/newlibc/unistd/setuid.c | 4 + linux-0.11-lab/newlibc/unistd/signal.c | 64 + linux-0.11-lab/newlibc/unistd/sigpend.c | 5 + linux-0.11-lab/newlibc/unistd/sigsusp.c | 24 + linux-0.11-lab/newlibc/unistd/stat.c | 4 + linux-0.11-lab/newlibc/unistd/stime.c | 4 + linux-0.11-lab/newlibc/unistd/symlink.c | 4 + linux-0.11-lab/newlibc/unistd/sync.c | 4 + linux-0.11-lab/newlibc/unistd/time.c | 4 + linux-0.11-lab/newlibc/unistd/times.c | 4 + linux-0.11-lab/newlibc/unistd/ulimit.c | 4 + linux-0.11-lab/newlibc/unistd/umask.c | 4 + linux-0.11-lab/newlibc/unistd/umount.c | 4 + linux-0.11-lab/newlibc/unistd/uname.c | 4 + linux-0.11-lab/newlibc/unistd/unlink.c | 4 + linux-0.11-lab/newlibc/unistd/uselib.c | 4 + linux-0.11-lab/newlibc/unistd/ustat.c | 4 + linux-0.11-lab/newlibc/unistd/utime.c | 4 + linux-0.11-lab/newlibc/unistd/wait.c | 10 + linux-0.11-lab/newlibc/unistd/write.c | 4 + newlibc.tgz | Bin 0 -> 188224 bytes test-v1.tgz | Bin 0 -> 605 bytes 386 files changed, 25022 insertions(+) mode change 100644 => 100755 linux-0.11-lab/0/linux/init/main.c create mode 100755 linux-0.11-lab/b/Makefile create mode 100755 linux-0.11-lab/b/execve create mode 100755 linux-0.11-lab/b/execve.c create mode 100755 linux-0.11-lab/b/execve2.c create mode 100644 linux-0.11-lab/newlibc/Makefile create mode 100644 linux-0.11-lab/newlibc/README create mode 100644 linux-0.11-lab/newlibc/README.wen create mode 100644 linux-0.11-lab/newlibc/ansi/Makefile create mode 100644 linux-0.11-lab/newlibc/ansi/abort.c create mode 100644 linux-0.11-lab/newlibc/ansi/abs.c create mode 100644 linux-0.11-lab/newlibc/ansi/atof.c create mode 100644 linux-0.11-lab/newlibc/ansi/atoi.c create mode 100644 linux-0.11-lab/newlibc/ansi/bsearch.c create mode 100644 linux-0.11-lab/newlibc/ansi/ctime.c create mode 100644 linux-0.11-lab/newlibc/ansi/ctype.c create mode 100644 linux-0.11-lab/newlibc/ansi/div.c create mode 100644 linux-0.11-lab/newlibc/ansi/errno.c create mode 100644 linux-0.11-lab/newlibc/ansi/ftime.c create mode 100644 linux-0.11-lab/newlibc/ansi/getenv.c create mode 100644 linux-0.11-lab/newlibc/ansi/gettimeofday.c create mode 100644 linux-0.11-lab/newlibc/ansi/isatty.c create mode 100644 linux-0.11-lab/newlibc/ansi/qsort.c create mode 100644 linux-0.11-lab/newlibc/ansi/rand.c create mode 100644 linux-0.11-lab/newlibc/ansi/strerror.c create mode 100644 linux-0.11-lab/newlibc/ansi/strftime.c create mode 100644 linux-0.11-lab/newlibc/ansi/string.c create mode 100644 linux-0.11-lab/newlibc/ansi/strtol.c create mode 100644 linux-0.11-lab/newlibc/ansi/system.c create mode 100644 linux-0.11-lab/newlibc/ansi/tzset.c create mode 100644 linux-0.11-lab/newlibc/copying.dj create mode 100644 linux-0.11-lab/newlibc/crt/Makefile create mode 100644 linux-0.11-lab/newlibc/crt/crt0.s create mode 100644 linux-0.11-lab/newlibc/dirent/Makefile create mode 100644 linux-0.11-lab/newlibc/dirent/closedir.c create mode 100644 linux-0.11-lab/newlibc/dirent/opendir.c create mode 100644 linux-0.11-lab/newlibc/dirent/readdir.c create mode 100644 linux-0.11-lab/newlibc/dirent/rewinddir.c create mode 100644 linux-0.11-lab/newlibc/grp/Makefile create mode 100644 linux-0.11-lab/newlibc/grp/fgetgrent.c create mode 100644 linux-0.11-lab/newlibc/grp/getgrent.c create mode 100644 linux-0.11-lab/newlibc/grp/getgrgid.c create mode 100644 linux-0.11-lab/newlibc/grp/getgrnam.c create mode 100644 linux-0.11-lab/newlibc/grp/grpopen.c create mode 100644 linux-0.11-lab/newlibc/grp/grpread.c create mode 100644 linux-0.11-lab/newlibc/grp/initgroups.c create mode 100644 linux-0.11-lab/newlibc/include/a.out.h create mode 100644 linux-0.11-lab/newlibc/include/ansidecl.h create mode 100644 linux-0.11-lab/newlibc/include/ar.h create mode 100644 linux-0.11-lab/newlibc/include/asm/io.h create mode 100644 linux-0.11-lab/newlibc/include/asm/memory.h create mode 100644 linux-0.11-lab/newlibc/include/asm/segment.h create mode 100644 linux-0.11-lab/newlibc/include/asm/system.h create mode 100644 linux-0.11-lab/newlibc/include/assert.h create mode 100644 linux-0.11-lab/newlibc/include/blocksize.h create mode 100644 linux-0.11-lab/newlibc/include/const.h create mode 100644 linux-0.11-lab/newlibc/include/ctype.h create mode 100644 linux-0.11-lab/newlibc/include/dirent.h create mode 100644 linux-0.11-lab/newlibc/include/errno.h create mode 100644 linux-0.11-lab/newlibc/include/fcntl.h create mode 100644 linux-0.11-lab/newlibc/include/float.h create mode 100644 linux-0.11-lab/newlibc/include/getopt.h create mode 100644 linux-0.11-lab/newlibc/include/gnu-stabs.h create mode 100644 linux-0.11-lab/newlibc/include/grp.h create mode 100644 linux-0.11-lab/newlibc/include/limits.h create mode 100644 linux-0.11-lab/newlibc/include/linux/config.h create mode 100644 linux-0.11-lab/newlibc/include/linux/fdreg.h create mode 100644 linux-0.11-lab/newlibc/include/linux/fs.h create mode 100644 linux-0.11-lab/newlibc/include/linux/hdreg.h create mode 100644 linux-0.11-lab/newlibc/include/linux/head.h create mode 100644 linux-0.11-lab/newlibc/include/linux/kernel.h create mode 100644 linux-0.11-lab/newlibc/include/linux/mm.h create mode 100644 linux-0.11-lab/newlibc/include/linux/sched.h create mode 100644 linux-0.11-lab/newlibc/include/linux/sys.h create mode 100644 linux-0.11-lab/newlibc/include/linux/tty.h create mode 100644 linux-0.11-lab/newlibc/include/localeinfo.h create mode 100644 linux-0.11-lab/newlibc/include/math.h create mode 100644 linux-0.11-lab/newlibc/include/pwd.h create mode 100644 linux-0.11-lab/newlibc/include/regex.h create mode 100644 linux-0.11-lab/newlibc/include/setjmp.h create mode 100644 linux-0.11-lab/newlibc/include/signal.h create mode 100644 linux-0.11-lab/newlibc/include/stdarg.h create mode 100644 linux-0.11-lab/newlibc/include/stddef.h create mode 100644 linux-0.11-lab/newlibc/include/stdio.h create mode 100644 linux-0.11-lab/newlibc/include/stdlib.h create mode 100644 linux-0.11-lab/newlibc/include/string.h create mode 100644 linux-0.11-lab/newlibc/include/strings.h create mode 100644 linux-0.11-lab/newlibc/include/sys/dir.h create mode 100644 linux-0.11-lab/newlibc/include/sys/dirent.h create mode 100644 linux-0.11-lab/newlibc/include/sys/file.h create mode 100644 linux-0.11-lab/newlibc/include/sys/ioctl.h create mode 100644 linux-0.11-lab/newlibc/include/sys/param.h create mode 100644 linux-0.11-lab/newlibc/include/sys/stat.h create mode 100644 linux-0.11-lab/newlibc/include/sys/sysmacros.h create mode 100644 linux-0.11-lab/newlibc/include/sys/time.h create mode 100644 linux-0.11-lab/newlibc/include/sys/timeb.h create mode 100644 linux-0.11-lab/newlibc/include/sys/times.h create mode 100644 linux-0.11-lab/newlibc/include/sys/types.h create mode 100644 linux-0.11-lab/newlibc/include/sys/utsname.h create mode 100644 linux-0.11-lab/newlibc/include/sys/varargs.h create mode 100644 linux-0.11-lab/newlibc/include/sys/wait.h create mode 100644 linux-0.11-lab/newlibc/include/termcap.h create mode 100644 linux-0.11-lab/newlibc/include/termio.h create mode 100644 linux-0.11-lab/newlibc/include/termios.h create mode 100644 linux-0.11-lab/newlibc/include/time.h create mode 100644 linux-0.11-lab/newlibc/include/unistd.h create mode 100644 linux-0.11-lab/newlibc/include/utime.h create mode 100644 linux-0.11-lab/newlibc/include/varargs.h create mode 100644 linux-0.11-lab/newlibc/malloc/Makefile create mode 100644 linux-0.11-lab/newlibc/malloc/README create mode 100644 linux-0.11-lab/newlibc/malloc/ansidecl.h create mode 100644 linux-0.11-lab/newlibc/malloc/free.c create mode 100644 linux-0.11-lab/newlibc/malloc/gmalloc.c create mode 100644 linux-0.11-lab/newlibc/malloc/gmalloc.c.old create mode 100644 linux-0.11-lab/newlibc/malloc/gmalloc.sed create mode 100644 linux-0.11-lab/newlibc/malloc/gmalloc.skel create mode 100644 linux-0.11-lab/newlibc/malloc/limits.h create mode 100644 linux-0.11-lab/newlibc/malloc/malloc.c.1 create mode 100644 linux-0.11-lab/newlibc/malloc/malloc.h create mode 100644 linux-0.11-lab/newlibc/malloc/mcheck.c create mode 100644 linux-0.11-lab/newlibc/malloc/mstats.c create mode 100644 linux-0.11-lab/newlibc/malloc/realloc.c create mode 100644 linux-0.11-lab/newlibc/malloc/stddef.h create mode 100644 linux-0.11-lab/newlibc/malloc/stdlib.h create mode 100644 linux-0.11-lab/newlibc/malloc/string.h create mode 100644 linux-0.11-lab/newlibc/malloc/unix.c create mode 100644 linux-0.11-lab/newlibc/malloc/valloc.c create mode 100644 linux-0.11-lab/newlibc/math/Makefile create mode 100644 linux-0.11-lab/newlibc/math/acos.s create mode 100644 linux-0.11-lab/newlibc/math/acosh.c create mode 100644 linux-0.11-lab/newlibc/math/asin.s create mode 100644 linux-0.11-lab/newlibc/math/asinh.c create mode 100644 linux-0.11-lab/newlibc/math/atan.s create mode 100644 linux-0.11-lab/newlibc/math/atan2.s create mode 100644 linux-0.11-lab/newlibc/math/atanh.c create mode 100644 linux-0.11-lab/newlibc/math/ceil.s create mode 100644 linux-0.11-lab/newlibc/math/cos.s create mode 100644 linux-0.11-lab/newlibc/math/cosh.c create mode 100644 linux-0.11-lab/newlibc/math/erf.c create mode 100644 linux-0.11-lab/newlibc/math/exp.s create mode 100644 linux-0.11-lab/newlibc/math/fabs.s create mode 100644 linux-0.11-lab/newlibc/math/floor.s create mode 100644 linux-0.11-lab/newlibc/math/fmod.s create mode 100644 linux-0.11-lab/newlibc/math/frexp.c create mode 100644 linux-0.11-lab/newlibc/math/hypot.c create mode 100644 linux-0.11-lab/newlibc/math/j0.c create mode 100644 linux-0.11-lab/newlibc/math/j1.c create mode 100644 linux-0.11-lab/newlibc/math/jn.c create mode 100644 linux-0.11-lab/newlibc/math/lgamma.c create mode 100644 linux-0.11-lab/newlibc/math/log.s create mode 100644 linux-0.11-lab/newlibc/math/log10.s create mode 100644 linux-0.11-lab/newlibc/math/sin.s create mode 100644 linux-0.11-lab/newlibc/math/sinh.c create mode 100644 linux-0.11-lab/newlibc/math/sqrt.s create mode 100644 linux-0.11-lab/newlibc/math/tan.s create mode 100644 linux-0.11-lab/newlibc/math/tanh.c create mode 100644 linux-0.11-lab/newlibc/misc/Makefile create mode 100644 linux-0.11-lab/newlibc/misc/README create mode 100644 linux-0.11-lab/newlibc/misc/atexit.c create mode 100644 linux-0.11-lab/newlibc/misc/bcopy.s create mode 100644 linux-0.11-lab/newlibc/misc/exit.c create mode 100644 linux-0.11-lab/newlibc/misc/frexp.c create mode 100644 linux-0.11-lab/newlibc/misc/ldexp.c create mode 100644 linux-0.11-lab/newlibc/misc/modf.c create mode 100644 linux-0.11-lab/newlibc/misc/perror.c create mode 100644 linux-0.11-lab/newlibc/misc/readv.c create mode 100644 linux-0.11-lab/newlibc/misc/tmpnam.c create mode 100644 linux-0.11-lab/newlibc/misc/values.s create mode 100644 linux-0.11-lab/newlibc/misc/writev.c create mode 100644 linux-0.11-lab/newlibc/mlinux/Makefile create mode 100644 linux-0.11-lab/newlibc/mlinux/README create mode 100644 linux-0.11-lab/newlibc/mlinux/acos.s create mode 100644 linux-0.11-lab/newlibc/mlinux/acosh.s create mode 100644 linux-0.11-lab/newlibc/mlinux/asin.s create mode 100644 linux-0.11-lab/newlibc/mlinux/asinh.s create mode 100644 linux-0.11-lab/newlibc/mlinux/atan.s create mode 100644 linux-0.11-lab/newlibc/mlinux/atan2.s create mode 100644 linux-0.11-lab/newlibc/mlinux/atanh.s create mode 100644 linux-0.11-lab/newlibc/mlinux/ceil.s create mode 100644 linux-0.11-lab/newlibc/mlinux/cos.s create mode 100644 linux-0.11-lab/newlibc/mlinux/cosh.s create mode 100644 linux-0.11-lab/newlibc/mlinux/erf.c create mode 100644 linux-0.11-lab/newlibc/mlinux/exp.s create mode 100644 linux-0.11-lab/newlibc/mlinux/fabs.s create mode 100644 linux-0.11-lab/newlibc/mlinux/floor.s create mode 100644 linux-0.11-lab/newlibc/mlinux/fmod.s create mode 100644 linux-0.11-lab/newlibc/mlinux/frexp.c create mode 100644 linux-0.11-lab/newlibc/mlinux/hypot.s create mode 100644 linux-0.11-lab/newlibc/mlinux/j0.c create mode 100644 linux-0.11-lab/newlibc/mlinux/j1.c create mode 100644 linux-0.11-lab/newlibc/mlinux/jn.c create mode 100644 linux-0.11-lab/newlibc/mlinux/lgamma.c create mode 100644 linux-0.11-lab/newlibc/mlinux/log.s create mode 100644 linux-0.11-lab/newlibc/mlinux/log10.s create mode 100644 linux-0.11-lab/newlibc/mlinux/math.h create mode 100644 linux-0.11-lab/newlibc/mlinux/sin.s create mode 100644 linux-0.11-lab/newlibc/mlinux/sinh.s create mode 100644 linux-0.11-lab/newlibc/mlinux/sqrt.s create mode 100644 linux-0.11-lab/newlibc/mlinux/tan.s create mode 100644 linux-0.11-lab/newlibc/mlinux/tanh.s create mode 100644 linux-0.11-lab/newlibc/other/Makefile create mode 100644 linux-0.11-lab/newlibc/other/getcwd.c create mode 100644 linux-0.11-lab/newlibc/other/getopt.c create mode 100644 linux-0.11-lab/newlibc/other/mktemp.c create mode 100644 linux-0.11-lab/newlibc/other/popen.c create mode 100644 linux-0.11-lab/newlibc/other/setjmp.s create mode 100644 linux-0.11-lab/newlibc/other/sig_restore.s create mode 100644 linux-0.11-lab/newlibc/posix/Makefile create mode 100644 linux-0.11-lab/newlibc/posix/cfsetget.c create mode 100644 linux-0.11-lab/newlibc/posix/rename.c create mode 100644 linux-0.11-lab/newlibc/posix/sigmask.c create mode 100644 linux-0.11-lab/newlibc/posix/sleep.c create mode 100644 linux-0.11-lab/newlibc/posix/sysconf.c create mode 100644 linux-0.11-lab/newlibc/posix/tcattr.c create mode 100644 linux-0.11-lab/newlibc/posix/tcflow.c create mode 100644 linux-0.11-lab/newlibc/posix/tcsetpgrp.c create mode 100644 linux-0.11-lab/newlibc/posix/ttyname.c create mode 100644 linux-0.11-lab/newlibc/pwd/Makefile create mode 100644 linux-0.11-lab/newlibc/pwd/fgetpwent.c create mode 100644 linux-0.11-lab/newlibc/pwd/getpw.c create mode 100644 linux-0.11-lab/newlibc/pwd/getpwent.c create mode 100644 linux-0.11-lab/newlibc/pwd/getpwnam.c create mode 100644 linux-0.11-lab/newlibc/pwd/getpwuid.c create mode 100644 linux-0.11-lab/newlibc/pwd/putpwent.c create mode 100644 linux-0.11-lab/newlibc/pwd/pwdopen.c create mode 100644 linux-0.11-lab/newlibc/pwd/pwdread.c create mode 100644 linux-0.11-lab/newlibc/soft/Makefile create mode 100644 linux-0.11-lab/newlibc/soft/README create mode 100644 linux-0.11-lab/newlibc/soft/asin.c create mode 100644 linux-0.11-lab/newlibc/soft/atan.c create mode 100644 linux-0.11-lab/newlibc/soft/const.c create mode 100644 linux-0.11-lab/newlibc/soft/erf.c create mode 100644 linux-0.11-lab/newlibc/soft/exp.c create mode 100644 linux-0.11-lab/newlibc/soft/fabs.c create mode 100644 linux-0.11-lab/newlibc/soft/floor.c create mode 100644 linux-0.11-lab/newlibc/soft/frexp.c create mode 100644 linux-0.11-lab/newlibc/soft/hypot.c create mode 100644 linux-0.11-lab/newlibc/soft/j0.c create mode 100644 linux-0.11-lab/newlibc/soft/j1.c create mode 100644 linux-0.11-lab/newlibc/soft/jn.c create mode 100644 linux-0.11-lab/newlibc/soft/ldexp.c create mode 100644 linux-0.11-lab/newlibc/soft/lgamma.c create mode 100644 linux-0.11-lab/newlibc/soft/log.c create mode 100644 linux-0.11-lab/newlibc/soft/main.c create mode 100644 linux-0.11-lab/newlibc/soft/modf.c create mode 100644 linux-0.11-lab/newlibc/soft/pow.c create mode 100644 linux-0.11-lab/newlibc/soft/sin.c create mode 100644 linux-0.11-lab/newlibc/soft/sinh.c create mode 100644 linux-0.11-lab/newlibc/soft/soft.h create mode 100644 linux-0.11-lab/newlibc/soft/soft.h.old create mode 100644 linux-0.11-lab/newlibc/soft/sqrt.c create mode 100644 linux-0.11-lab/newlibc/soft/tan.c create mode 100644 linux-0.11-lab/newlibc/soft/tanh.c create mode 100644 linux-0.11-lab/newlibc/stdio/Makefile create mode 100644 linux-0.11-lab/newlibc/stdio/clrerr.c create mode 100644 linux-0.11-lab/newlibc/stdio/doprnt.c create mode 100644 linux-0.11-lab/newlibc/stdio/doscan.c create mode 100644 linux-0.11-lab/newlibc/stdio/fdopen.c create mode 100644 linux-0.11-lab/newlibc/stdio/fgetc.c create mode 100644 linux-0.11-lab/newlibc/stdio/fgets.c create mode 100644 linux-0.11-lab/newlibc/stdio/filbuf.c create mode 100644 linux-0.11-lab/newlibc/stdio/findiop.c create mode 100644 linux-0.11-lab/newlibc/stdio/flsbuf.c create mode 100644 linux-0.11-lab/newlibc/stdio/fopen.c create mode 100644 linux-0.11-lab/newlibc/stdio/fprintf.c create mode 100644 linux-0.11-lab/newlibc/stdio/fputc.c create mode 100644 linux-0.11-lab/newlibc/stdio/fputs.c create mode 100644 linux-0.11-lab/newlibc/stdio/fread.c create mode 100644 linux-0.11-lab/newlibc/stdio/freopen.c create mode 100644 linux-0.11-lab/newlibc/stdio/fseek.c create mode 100644 linux-0.11-lab/newlibc/stdio/ftell.c create mode 100644 linux-0.11-lab/newlibc/stdio/fwrite.c create mode 100644 linux-0.11-lab/newlibc/stdio/getchar.c create mode 100644 linux-0.11-lab/newlibc/stdio/gets.c create mode 100644 linux-0.11-lab/newlibc/stdio/getw.c create mode 100644 linux-0.11-lab/newlibc/stdio/printf.c create mode 100644 linux-0.11-lab/newlibc/stdio/putchar.c create mode 100644 linux-0.11-lab/newlibc/stdio/puts.c create mode 100644 linux-0.11-lab/newlibc/stdio/putw.c create mode 100644 linux-0.11-lab/newlibc/stdio/rew.c create mode 100644 linux-0.11-lab/newlibc/stdio/scanf.c create mode 100644 linux-0.11-lab/newlibc/stdio/setbuf.c create mode 100644 linux-0.11-lab/newlibc/stdio/setbuffe.c create mode 100644 linux-0.11-lab/newlibc/stdio/setvbuf.c create mode 100644 linux-0.11-lab/newlibc/stdio/sprintf.c create mode 100644 linux-0.11-lab/newlibc/stdio/ungetc.c create mode 100644 linux-0.11-lab/newlibc/stdio/vfprintf.c create mode 100644 linux-0.11-lab/newlibc/stdio/vprintf.c create mode 100644 linux-0.11-lab/newlibc/stdio/vsprintf.c create mode 100644 linux-0.11-lab/newlibc/termcap/COPYING create mode 100644 linux-0.11-lab/newlibc/termcap/COPYING.LIB create mode 100644 linux-0.11-lab/newlibc/termcap/ChangeLog create mode 100644 linux-0.11-lab/newlibc/termcap/Makefile.in create mode 100644 linux-0.11-lab/newlibc/termcap/README create mode 100644 linux-0.11-lab/newlibc/termcap/bsearch.c create mode 100755 linux-0.11-lab/newlibc/termcap/configure create mode 100644 linux-0.11-lab/newlibc/termcap/conversions.c create mode 100644 linux-0.11-lab/newlibc/termcap/getopt.c create mode 100644 linux-0.11-lab/newlibc/termcap/getopt.h create mode 100644 linux-0.11-lab/newlibc/termcap/getopt1.c create mode 100644 linux-0.11-lab/newlibc/termcap/makefile create mode 100644 linux-0.11-lab/newlibc/termcap/termcap.c create mode 100644 linux-0.11-lab/newlibc/termcap/termcap.h create mode 100644 linux-0.11-lab/newlibc/termcap/tparam.c create mode 100644 linux-0.11-lab/newlibc/termcap/tput.c create mode 100644 linux-0.11-lab/newlibc/termcap/tput.h create mode 100644 linux-0.11-lab/newlibc/termcap/tput.texinfo create mode 100644 linux-0.11-lab/newlibc/unistd/Makefile create mode 100644 linux-0.11-lab/newlibc/unistd/_exit.c create mode 100644 linux-0.11-lab/newlibc/unistd/access.c create mode 100644 linux-0.11-lab/newlibc/unistd/acct.c create mode 100644 linux-0.11-lab/newlibc/unistd/alarm.c create mode 100644 linux-0.11-lab/newlibc/unistd/brk.c create mode 100644 linux-0.11-lab/newlibc/unistd/chdir.c create mode 100644 linux-0.11-lab/newlibc/unistd/chmod.c create mode 100644 linux-0.11-lab/newlibc/unistd/chown.c create mode 100644 linux-0.11-lab/newlibc/unistd/chroot.c create mode 100644 linux-0.11-lab/newlibc/unistd/close.c create mode 100644 linux-0.11-lab/newlibc/unistd/creat.c create mode 100644 linux-0.11-lab/newlibc/unistd/dup.c create mode 100644 linux-0.11-lab/newlibc/unistd/dup2.c create mode 100644 linux-0.11-lab/newlibc/unistd/exec.c create mode 100644 linux-0.11-lab/newlibc/unistd/execp.c create mode 100644 linux-0.11-lab/newlibc/unistd/execve.c create mode 100644 linux-0.11-lab/newlibc/unistd/fcntl.c create mode 100644 linux-0.11-lab/newlibc/unistd/fork.c create mode 100644 linux-0.11-lab/newlibc/unistd/fstat.c create mode 100644 linux-0.11-lab/newlibc/unistd/getegid.c create mode 100644 linux-0.11-lab/newlibc/unistd/geteuid.c create mode 100644 linux-0.11-lab/newlibc/unistd/getgid.c create mode 100644 linux-0.11-lab/newlibc/unistd/getgroups.c create mode 100644 linux-0.11-lab/newlibc/unistd/gethostnam.c create mode 100644 linux-0.11-lab/newlibc/unistd/getpgrp.c create mode 100644 linux-0.11-lab/newlibc/unistd/getpid.c create mode 100644 linux-0.11-lab/newlibc/unistd/getppid.c create mode 100644 linux-0.11-lab/newlibc/unistd/getrlimit.c create mode 100644 linux-0.11-lab/newlibc/unistd/getrusage.c create mode 100644 linux-0.11-lab/newlibc/unistd/gettime.c create mode 100644 linux-0.11-lab/newlibc/unistd/getuid.c create mode 100644 linux-0.11-lab/newlibc/unistd/ioctl.c create mode 100644 linux-0.11-lab/newlibc/unistd/kill.c create mode 100644 linux-0.11-lab/newlibc/unistd/link.c create mode 100644 linux-0.11-lab/newlibc/unistd/lseek.c create mode 100644 linux-0.11-lab/newlibc/unistd/lstat.c create mode 100644 linux-0.11-lab/newlibc/unistd/mkdir.c create mode 100644 linux-0.11-lab/newlibc/unistd/mknod.c create mode 100644 linux-0.11-lab/newlibc/unistd/mount.c create mode 100644 linux-0.11-lab/newlibc/unistd/nice.c create mode 100644 linux-0.11-lab/newlibc/unistd/open.c create mode 100644 linux-0.11-lab/newlibc/unistd/pause.c create mode 100644 linux-0.11-lab/newlibc/unistd/pipe.c create mode 100644 linux-0.11-lab/newlibc/unistd/read.c create mode 100644 linux-0.11-lab/newlibc/unistd/readlink.c create mode 100644 linux-0.11-lab/newlibc/unistd/rmdir.c create mode 100644 linux-0.11-lab/newlibc/unistd/select.c create mode 100644 linux-0.11-lab/newlibc/unistd/setgid.c create mode 100644 linux-0.11-lab/newlibc/unistd/setgroups.c create mode 100644 linux-0.11-lab/newlibc/unistd/sethostnam.c create mode 100644 linux-0.11-lab/newlibc/unistd/setpgrp.c create mode 100644 linux-0.11-lab/newlibc/unistd/setregid.c create mode 100644 linux-0.11-lab/newlibc/unistd/setreuid.c create mode 100644 linux-0.11-lab/newlibc/unistd/setrlimit.c create mode 100644 linux-0.11-lab/newlibc/unistd/setsid.c create mode 100644 linux-0.11-lab/newlibc/unistd/settime.c create mode 100644 linux-0.11-lab/newlibc/unistd/setuid.c create mode 100644 linux-0.11-lab/newlibc/unistd/signal.c create mode 100644 linux-0.11-lab/newlibc/unistd/sigpend.c create mode 100644 linux-0.11-lab/newlibc/unistd/sigsusp.c create mode 100644 linux-0.11-lab/newlibc/unistd/stat.c create mode 100644 linux-0.11-lab/newlibc/unistd/stime.c create mode 100644 linux-0.11-lab/newlibc/unistd/symlink.c create mode 100644 linux-0.11-lab/newlibc/unistd/sync.c create mode 100644 linux-0.11-lab/newlibc/unistd/time.c create mode 100644 linux-0.11-lab/newlibc/unistd/times.c create mode 100644 linux-0.11-lab/newlibc/unistd/ulimit.c create mode 100644 linux-0.11-lab/newlibc/unistd/umask.c create mode 100644 linux-0.11-lab/newlibc/unistd/umount.c create mode 100644 linux-0.11-lab/newlibc/unistd/uname.c create mode 100644 linux-0.11-lab/newlibc/unistd/unlink.c create mode 100644 linux-0.11-lab/newlibc/unistd/uselib.c create mode 100644 linux-0.11-lab/newlibc/unistd/ustat.c create mode 100644 linux-0.11-lab/newlibc/unistd/utime.c create mode 100644 linux-0.11-lab/newlibc/unistd/wait.c create mode 100644 linux-0.11-lab/newlibc/unistd/write.c create mode 100755 newlibc.tgz create mode 100755 test-v1.tgz diff --git a/linux-0.11-lab/0/linux/init/main.c b/linux-0.11-lab/0/linux/init/main.c old mode 100644 new mode 100755 diff --git a/linux-0.11-lab/b/Makefile b/linux-0.11-lab/b/Makefile new file mode 100755 index 0000000..8282c12 --- /dev/null +++ b/linux-0.11-lab/b/Makefile @@ -0,0 +1,12 @@ +.PHONY: all, execve +all: execve + +execve: + gcc $@.c -o $@ + gcc $@2.c -o $@2 + $@ + $@2 + +clean: + -rm execve execve2 + -rm *.o diff --git a/linux-0.11-lab/b/execve b/linux-0.11-lab/b/execve new file mode 100755 index 0000000000000000000000000000000000000000..06fdc8a7171f5cf4afe65b02117c8cb22f7fd22a GIT binary patch literal 7399 zcmeHMZ)_CD6`wmF5#YVFgDZ5niz6P}2~V!#)!e+ki1dRT`G_-P(8M{@#?C90qbwNVSbfJ+s%ghrLBs{d4?o?BO?O+xuVxc+`K zJFo_#s^9v-@AU4?Z{C|XGjHGQ&dz=*+TH2%`Gh9Fs1ZavN`YW2YFb z|L9)yLGK;kRn(E`pYvOnP7SO}Cz{f!Y;nXac+IUUAN6gRr``TLmYP%38&Ooe;xCry%SRJAS|xmPIpY zV|mBQ#8O$*3}tdzx5g4%ySuiuTP@~#cE>sS@#CC)@~2`W=aCzmYgg9EdR;^Z#oOb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I z{fIT{#8};T6jnX+{-Utzf%g%GRRnmyP#8%C;(bA3UQxCF73LjFt#gH?nOx5bbLFaM zrow#Us`aTb?@%E3nN}lLG~#gs^9iq>@su?(lhyiB7|8K_M`r-G0^v>t@y`h@^qD8?b>9tx87 z-+<&^2?F|hA&>6}Kpc-ZuZYi}-g!>jFA%>3_KuhBG|`^xUiUBHe;QcF(}#F|2(0_3 zKFAK;`1ugeWxzb2Wv141{+RtEG~@U_u&uq%>h9XrZ&@N?=k1|X0UJTf$yo7pE^8OW9jYuV zk+X)PN;tWE!HN|}1ol_MY1^?A=7xthHpBBBj4bZ-)V|HaUMxQ<)J`u^%w$H< z#Dgqu5NDXGlUzCI&b~-b)Qa|YVAN^~x;&#*LRcN2>y7kuwZqDzksnBewY7WumPog? zy|Z&ywBPEFZ0U~Do&1IpFBIiq@wuhH$GRDr{+@Qmr9U>1=J%G7whiWx?O4Nc%Sjfq z`^|w7!9Az?;vy_tZa`g6mPf7Tgj&|5A2ZLD)rfD+X1W3&4u=KtWZEASQh54W6q%H%$N}pb@=Xn Ij*|WT2en+iS^xk5 literal 0 HcmV?d00001 diff --git a/linux-0.11-lab/b/execve.c b/linux-0.11-lab/b/execve.c new file mode 100755 index 0000000..dd94ff4 --- /dev/null +++ b/linux-0.11-lab/b/execve.c @@ -0,0 +1,21 @@ +#include "stdio.h" +#include "stdlib.h" +#include "unistd.h" + +/* + * 测试成功则输出: + * " I am test_echo." + * 测试失败则输出: + * " execve error." + */ +void test_execve(void){ + char *argv[] = {"/bin/sh", "-c", "echo \" I am test_echo.\"", NULL}; + char *env[] = {NULL}; + execve("/bin/sh", argv, env); + printf(" execve error.\n"); +} + +int main(void){ + test_execve(); + return 0; +} diff --git a/linux-0.11-lab/b/execve2.c b/linux-0.11-lab/b/execve2.c new file mode 100755 index 0000000..8c0222f --- /dev/null +++ b/linux-0.11-lab/b/execve2.c @@ -0,0 +1,25 @@ +#include "stdio.h" +#include "stdlib.h" + +#define __LIBRARY__ +#include "unistd.h" + +_syscall3(int,execve2,const char *,file,char **,argv,char **,envp) + +/* + * 测试成功则输出: + * " I am test_echo." + * 测试失败则输出: + * " execve2 error." + */ +void test_execve(void){ + char *argv[] = {"/bin/sh", "-c", "echo \" I am test_echo.\"", NULL}; + char *env[] = {NULL}; + execve2("/bin/sh", argv, env); + printf(" execve2 error.\n"); +} + +int main(void){ + test_execve(); + return 0; +} diff --git a/linux-0.11-lab/newlibc/Makefile b/linux-0.11-lab/newlibc/Makefile new file mode 100644 index 0000000..5cbf2f6 --- /dev/null +++ b/linux-0.11-lab/newlibc/Makefile @@ -0,0 +1,62 @@ +# +# Makefile for the Linux library +# + +# define this for now. it used in modf.c. it will be dropped when 0.13 +# kernel is released. +XCFLAGS = -DSOFT_387 + +LIBS = Libc.a Libm.a Libtermcap.a +#AR =/usr2/linux/cross/lib/gar +AR =/usr/local/bin/ar +#AS =/usr2/linux/cross/lib/gcc-as +AS =/usr/local/bin/as +#LD =/usr2/linux/cross/bin/gld +LD =/usr/local/bin/ld +#RANLIB =/usr2/linux/cross/bin/ranlib +RANLIB =/usr/local/bin/ranlib +LDFLAGS =-s -x +CC =/usr/local/bin/gcc -B/usr/local/bin/ +#CC =/local/bin/gcc-i386-sysv -DPRE_GCC_2 +INC =-nostdinc -I. -I../soft -I../include +#INC =-nostdinc -I. -I../soft \ +# -I/usr2/linux/src/lib.new/2.0 \ +# -I/usr2/linux/usr/include +CFLAGS =-Wall -O -fstrength-reduce -fomit-frame-pointer \ + -fcombine-regs -finline-functions -mstring-insns $(INC) +CPP =$(CC) -E $(INC) +RM =/usr/bin/rm + +#DIRS =ansi crt dirent grp malloc math misc other posix pwd \ +# stdio termcap unistd +#DIRS =ansi crt dirent grp malloc mlinux misc other posix pwd \ +# termcap unistd +DIRS =ansi crt dirent malloc other posix unistd + +MFLAGS =CC="$(CC)" AR="$(AR)" LD="$(LD)" CPP="$(CPP)" AS="$(AS)" \ + RANLIB="$(RANLIB)" INC="$(INC)" RM="$(RM)" \ + XCFLAGS="$(XCFLAGS)" + +# To record the "newlibc" directory, by yjwen. +# Maybe a bug exists in the "make" of Linux 0.11. +SRCDIR =/usr/root/newlibc + +all: + for i in $(DIRS); \ + do \ + (cd $(SRCDIR)/$$i; make $(MFLAGS)); \ + done + $(RANLIB) $(LIBS) + +dep: + for i in $(DIRS); \ + do \ + (cd $(SRCDIR)/$$i; make dep $(MFLAGS)); \ + done + +clean: + rm -f $(LIBS) + for i in $(DIRS); \ + do \ + (cd $(SRCDIR)/$$i; make clean $(MFLAGS)); \ + done diff --git a/linux-0.11-lab/newlibc/README b/linux-0.11-lab/newlibc/README new file mode 100644 index 0000000..d154195 --- /dev/null +++ b/linux-0.11-lab/newlibc/README @@ -0,0 +1,73 @@ +[ Note: This package was submitted to tsx-11.mit.edu by hlu@wsu.edu, on + Feb 20, 1992. -TYT ] + +Release Note +------------------------------------------------------------------- +This is the package of gcc 1.40 with 387 support and the libraries, +which include two math libraries, libm.a for with a 387 and libsoft.a +for without a 387, and a separate libtermcap.a taken from GNU's +tput 1.10. + +This gcc supports 387. There are enough 387 emulations in 0.12 +kernel to let gcc run without a 387. But libm.a definitely needs a +387 for now. If you don't have a 387, use -lsoft instead of -lm. + +GNU's binary utilities 1.9 are also included. They should be also used +instead of the old ones. + +The buggy estdio is replaced by BSD stdio (non ANSI). The stdio used in +this package is from BSD 4.3, I think it's the one before networking +release. Make sure not to define USG stdio. + +Some header files must be replaced by the ones included in this package. + +The -mstring-insns option is no longer needed, which is added to the +old gcc for Linux and is not among the options for the standard gcc. + +The -O option may fail when the INLINE functions (string.h) are passed +as parameters. There is nothing wrong with compiler(?). They will be +fixed in gcc 2.0. You can change the source to avoid that. + +They are some PRE_GCC_2. Please DOT NOT defines them. They are for +testing gcc 2.0 only. + +Since there is no ptrace() in the 0.12 kernel. The -g option is +permanently disabled. It will be there in gcc 2.0. If you really need it, +please drop me a note. I just add a new cc1, called cc1.g, which +supports gdb. But it has not been tested. + +I hope somebody will recompile all the binaries with this new gcc and +make them available for ftp. The new binaries should be smaller and +have less bugs. + +The directory, crt, is used to make a crt0.o you like, although I +think the current one is quite reasonable. + +When you use perror (), you may want to declare it first somewhere. The +current stdio.h doesn't declare it. It will find its place in some +header file when gcc 2.0 is released. + +There is a new 387 math library which is better but has not been +tested. You can test it by replacing "math" with "mlinux" of DIRS in +Makefile. The hyperbolic functions may be not very accurate when x is +very small, like 1e-6. You will see what I mean. I don't think it will +cause much trouble. +--------------------------------------------------------------------- +--------------------------------------------------------------------- + +INSTALL +--------------------------------------------------------------------- + +You only need to modify the top level Makefile to suit your system. +Make sure compiler and binary utilities are OK as well as header files. + +You should have ../soft in your search path for header files. + +You should only issue make at the top directory. Otherwise, some +variables may not be defined. + +You can modify crt0.s to get the crt0.o you like. + +H.J. +hlu@eecs.wsu.edu +02/18/92 diff --git a/linux-0.11-lab/newlibc/README.wen b/linux-0.11-lab/newlibc/README.wen new file mode 100644 index 0000000..235b746 --- /dev/null +++ b/linux-0.11-lab/newlibc/README.wen @@ -0,0 +1 @@ +To compile the lib, you should set the variable SRCDIR (in Makefile) to correct path. diff --git a/linux-0.11-lab/newlibc/ansi/Makefile b/linux-0.11-lab/newlibc/ansi/Makefile new file mode 100644 index 0000000..be668cc --- /dev/null +++ b/linux-0.11-lab/newlibc/ansi/Makefile @@ -0,0 +1,46 @@ +# +# Makefile for some ansi-library functions +# + +LIB =../Libc.a +AR =gar +AS =gas +LD =gld +LDFLAGS =-s -x +CC =/usr/local/bin/gcc -B/usr/local/bin/ +#CC =/local/bin/gcc-i386-sysv +INC =-nostdinc -I../include +CFLAGS =-Wall -O -fstrength-reduce -fomit-frame-pointer \ + -finline-functions $(INC) +CPP =$(CC) -E $(INC) + +.c.s: + $(CC) $(CFLAGS) -S -v -o $*.s $< +.s.o: + $(CC) -c -o $*.o $< +.c.o: + $(CC) $(CFLAGS) -c -o $*.o $< + +OBJS = abs.o errno.o ctype.o string.o abort.o bsearch.o \ + strtol.o atoi.o rand.o div.o isatty.o strerror.o \ + getenv.o atof.o ctime.o qsort.o system.o strftime.o \ + tzset.o ftime.o +# gettimeofday.o # why is it not here? unfinished? + +all: library + +library: $(OBJS) + $(AR) uvc $(LIB) $(OBJS) + sync + +clean: + $(RM) -f core *.o *.a tmp_make + for i in *.c;do $(RM) -f `basename $$i .c`.s;done + +dep: + sed '/\#\#\# Dependencies/q' < Makefile > tmp_make + (for i in *.c;do echo -n `echo $$i | sed 's,\.c,\.s,'`" "; \ + $(CPP) -M $$i;done) >> tmp_make + cp tmp_make Makefile + +### Dependencies: diff --git a/linux-0.11-lab/newlibc/ansi/abort.c b/linux-0.11-lab/newlibc/ansi/abort.c new file mode 100644 index 0000000..ccb63b9 --- /dev/null +++ b/linux-0.11-lab/newlibc/ansi/abort.c @@ -0,0 +1,12 @@ +#include +#include + +/* + * More of these kind of library routines, please. Linus + */ + +void abort(void) +{ + kill(getpid(), SIGABRT); + _exit(-1); +} diff --git a/linux-0.11-lab/newlibc/ansi/abs.c b/linux-0.11-lab/newlibc/ansi/abs.c new file mode 100644 index 0000000..3f9395e --- /dev/null +++ b/linux-0.11-lab/newlibc/ansi/abs.c @@ -0,0 +1,15 @@ +#include + +/* + * These I liked writing. More library routines like these. Linus + */ + +int abs(int n) +{ + return (n<0)?-n:n; +} + +long labs(long n) +{ + return (n<0)?-n:n; +} diff --git a/linux-0.11-lab/newlibc/ansi/atof.c b/linux-0.11-lab/newlibc/ansi/atof.c new file mode 100644 index 0000000..af0506f --- /dev/null +++ b/linux-0.11-lab/newlibc/ansi/atof.c @@ -0,0 +1,44 @@ +#include + +/* + * braindead atof. + * Seems to work now. Linus + */ + +double atof(char * s) +{ + double f = 0.0; + int frac = 0, sign, esign, exp = 0; + + f = 0.0; + while (isspace(*s)) + s++; + if ((sign=(*s == '-')) || (*s == '+')) + s++; + while (isdigit(*s)) + f = f*10.0 + (*s++ - '0'); + if (*s == '.') { + s++; + while (isdigit(*s)) { + f = f*10.0 + (*s++ - '0'); + frac++; + } + } + if (toupper(*s) == 'E') { + if ((esign=(*++s == '-')) || (*s == '+')) + s++; + while (isdigit(*s)) + exp = exp*10 + (*s++ - '0'); + if (esign) + exp = -exp; + } + exp -= frac; + if (exp>0) + while (exp--) + f *= 10.0; + else + while (exp++) + f /= 10.0; + return sign ? -f : f; +} + diff --git a/linux-0.11-lab/newlibc/ansi/atoi.c b/linux-0.11-lab/newlibc/ansi/atoi.c new file mode 100644 index 0000000..e91b93b --- /dev/null +++ b/linux-0.11-lab/newlibc/ansi/atoi.c @@ -0,0 +1,16 @@ +#include + +/* + * see strtol.c for these. Linus + */ + +int atoi(const char *s) +{ + return (int) strtol(s, (char **) NULL, 10); +} + +long atol(const char *s) +{ + return strtol(s, (char **) NULL, 10); +} + diff --git a/linux-0.11-lab/newlibc/ansi/bsearch.c b/linux-0.11-lab/newlibc/ansi/bsearch.c new file mode 100644 index 0000000..02eb4ed --- /dev/null +++ b/linux-0.11-lab/newlibc/ansi/bsearch.c @@ -0,0 +1,56 @@ +/* Copyright (C) 1991 Free Software Foundation, Inc. +This file is part of the GNU C Library. + +The GNU C Library is free software; you can redistribute it and/or +modify it under the terms of the GNU Library General Public License as +published by the Free Software Foundation; either version 2 of the +License, or (at your option) any later version. + +The GNU C Library is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include +#include + + +/* Perform a binary search for KEY in BASE which has NMEMB elements + of SIZE bytes each. The comparisons are done by (*COMPAR)(). */ +PTR +DEFUN(bsearch, (key, base, nmemb, size, compar), + register CONST PTR key AND register CONST PTR base AND + size_t nmemb AND register size_t size AND + register int EXFUN((*compar), (CONST PTR, CONST PTR))) +{ + register size_t l, u, idx; + register CONST PTR p; + register int comparison; + + l = 0; + u = nmemb - 1; + while (l <= u) + { + idx = (l + u) / 2; + p = (PTR) (((CONST char *) base) + (idx * size)); + comparison = (*compar)(key, p); + /* Don't make U negative because it will wrap around. */ + if (comparison < 0) + { + if (idx == 0) + break; + u = idx - 1; + } + else if (comparison > 0) + l = idx + 1; + else + return (PTR) p; + } + + return NULL; +} diff --git a/linux-0.11-lab/newlibc/ansi/ctime.c b/linux-0.11-lab/newlibc/ansi/ctime.c new file mode 100644 index 0000000..a09737e --- /dev/null +++ b/linux-0.11-lab/newlibc/ansi/ctime.c @@ -0,0 +1,142 @@ +/* mktime, localtime, gmtime */ +/* written by ERS and placed in the public domain */ + +#include +#include +#include +#include +#include + +#define SECS_PER_MIN (60L) +#define SECS_PER_HOUR (60*SECS_PER_MIN) +#define SECS_PER_DAY (24*SECS_PER_HOUR) +#define SECS_PER_YEAR (365*SECS_PER_DAY) +#define SECS_PER_LEAPYEAR (SECS_PER_DAY + SECS_PER_YEAR) + +static int days_per_mth[12] = + {31, 28, 31, 30, + 31, 30, 31, 31, + 30, 31, 30, 31 }; + +time_t timezone = -1; /* holds # seconds west of GMT */ +static int dst = -1; /* whether dst holds in current timezone */ + +/* + * FIXME: none of these routines is very efficient. Also, none of them + * handle dates before Jan 1, 1970. + * + */ + +/* + * mktime: take a time structure representing the local time (such as is + * returned by localtime() and convert it into the standard representation + * (as seconds since midnight Jan. 1 1970, GMT). + * + */ + +time_t mktime(struct tm * t) +{ + time_t s; + int y; + + y = t->tm_year - 70; + if (y < 0) /* year before 1970 */ + return (time_t) -1; + s = (SECS_PER_YEAR * y) + ( ((y+1)/4) * SECS_PER_DAY); + /* extra days for leap years */ + if ( (y+2)%4 ) + days_per_mth[1] = 28; + else + days_per_mth[1] = 29; + + for (y = 0; y < t->tm_mon; y++) + s += SECS_PER_DAY * days_per_mth[y]; + + s += (t->tm_mday - 1) * SECS_PER_DAY; + s += t->tm_hour * SECS_PER_HOUR; + s += t->tm_min * SECS_PER_MIN; + s += t->tm_sec; + return s; +} + +static struct tm the_time; + +struct tm *gmtime(const time_t *t) +{ + struct tm *stm = &the_time; + time_t time = *t; + int year, mday, i; + + if (time < 0) /* negative times are bad */ + return 0; + stm->tm_wday = ((time/SECS_PER_DAY) + 4) % 7; + + year = 70; + for (;;) { + if (time < SECS_PER_YEAR) break; + if ((year % 4) == 0) { + if (time < SECS_PER_LEAPYEAR) + break; + else + time -= SECS_PER_LEAPYEAR; + } + else + time -= SECS_PER_YEAR; + year++; + } + stm->tm_year = year; + mday = stm->tm_yday = time/SECS_PER_DAY; + days_per_mth[1] = (year % 4) ? 28 : 29; + for (i = 0; mday >= days_per_mth[i]; i++) + mday -= days_per_mth[i]; + stm->tm_mon = i; + stm->tm_mday = mday + 1; + time = time % SECS_PER_DAY; + stm->tm_hour = time/SECS_PER_HOUR; + time = time % SECS_PER_HOUR; + stm->tm_min = time/SECS_PER_MIN; + stm->tm_sec = time % SECS_PER_MIN; + stm->tm_isdst = 0; + return stm; +} + +/* given a standard time, convert it to a local time */ + +struct tm *localtime(const time_t * t) +{ + struct tm *stm; + time_t offset; /* seconds between local time and GMT */ + + if (timezone == -1) tzset(); + offset = *t - timezone; + stm = gmtime(&offset); + if (stm == (struct tm *)NULL) return stm; /* check for illegal time */ + stm->tm_isdst = (dst == -1) ? -1 : 0; + return stm; +} + +static const char *day[] = +{"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"}; + +static const char *month[] = + {"Jan", "Feb", "Mar", "Apr", + "May", "Jun", "Jul", "Aug", + "Sep", "Oct", "Nov", "Dec"}; + +char * asctime(const struct tm * time) +{ + static char buf[40]; + + if (time == (struct tm *)NULL) + strcpy(buf, "??? ??? ?? ??:??:?? ????\n"); + else + sprintf(buf, "%.3s %.3s %2d %02d:%02d:%02d %04d\n", + day[time->tm_wday], month[time->tm_mon], time->tm_mday, + time->tm_hour, time->tm_min, time->tm_sec, 1900+time->tm_year); + return(buf); +} + +char *ctime(const time_t *tp) +{ + return(asctime(localtime(tp))); +} diff --git a/linux-0.11-lab/newlibc/ansi/ctype.c b/linux-0.11-lab/newlibc/ansi/ctype.c new file mode 100644 index 0000000..bf58aac --- /dev/null +++ b/linux-0.11-lab/newlibc/ansi/ctype.c @@ -0,0 +1,29 @@ +#include + +char _ctmp; +unsigned char _ctype[] = {0x00, /* EOF */ +_C,_C,_C,_C,_C,_C,_C,_C, /* 0-7 */ +_C,_C|_S,_C|_S,_C|_S,_C|_S,_C|_S,_C,_C, /* 8-15 */ +_C,_C,_C,_C,_C,_C,_C,_C, /* 16-23 */ +_C,_C,_C,_C,_C,_C,_C,_C, /* 24-31 */ +_S|_SP,_P,_P,_P,_P,_P,_P,_P, /* 32-39 */ +_P,_P,_P,_P,_P,_P,_P,_P, /* 40-47 */ +_D,_D,_D,_D,_D,_D,_D,_D, /* 48-55 */ +_D,_D,_P,_P,_P,_P,_P,_P, /* 56-63 */ +_P,_U|_X,_U|_X,_U|_X,_U|_X,_U|_X,_U|_X,_U, /* 64-71 */ +_U,_U,_U,_U,_U,_U,_U,_U, /* 72-79 */ +_U,_U,_U,_U,_U,_U,_U,_U, /* 80-87 */ +_U,_U,_U,_P,_P,_P,_P,_P, /* 88-95 */ +_P,_L|_X,_L|_X,_L|_X,_L|_X,_L|_X,_L|_X,_L, /* 96-103 */ +_L,_L,_L,_L,_L,_L,_L,_L, /* 104-111 */ +_L,_L,_L,_L,_L,_L,_L,_L, /* 112-119 */ +_L,_L,_L,_P,_P,_P,_P,_C, /* 120-127 */ +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 128-143 */ +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 144-159 */ +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 160-175 */ +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 176-191 */ +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 192-207 */ +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 208-223 */ +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* 224-239 */ +0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0}; /* 240-255 */ + diff --git a/linux-0.11-lab/newlibc/ansi/div.c b/linux-0.11-lab/newlibc/ansi/div.c new file mode 100644 index 0000000..ff0e2f1 --- /dev/null +++ b/linux-0.11-lab/newlibc/ansi/div.c @@ -0,0 +1,24 @@ +#include + +/* + * Ok, there are probably buggy: sign etc. Linus + */ + +div_t div(int num, int denom) +{ + div_t res; + + __asm__("idivl %3":"=a" (res.quot),"=d" (res.rem) + :"0" (num),"g" (denom)); + return res; +} + +ldiv_t ldiv(long num, long denom) +{ + ldiv_t res; + + __asm__("idivl %3":"=a" (res.quot),"=d" (res.rem) + :"0" (num),"g" (denom)); + return res; +} + diff --git a/linux-0.11-lab/newlibc/ansi/errno.c b/linux-0.11-lab/newlibc/ansi/errno.c new file mode 100644 index 0000000..bf43aa4 --- /dev/null +++ b/linux-0.11-lab/newlibc/ansi/errno.c @@ -0,0 +1,5 @@ +/* + * Great file. Linus + */ + +int errno; diff --git a/linux-0.11-lab/newlibc/ansi/ftime.c b/linux-0.11-lab/newlibc/ansi/ftime.c new file mode 100644 index 0000000..23f277c --- /dev/null +++ b/linux-0.11-lab/newlibc/ansi/ftime.c @@ -0,0 +1,19 @@ +#include +#include + +/* + * I simply don't know what all these time-fns should do. Linus + */ + +int ftime(struct timeb * tp) +{ + time_t t; + + if (time(&t)<0) + return -1; + tp->time = t; + tp->millitm = 0; + tp->timezone = -120; + tp->dstflag = 0; + return 0; +} diff --git a/linux-0.11-lab/newlibc/ansi/getenv.c b/linux-0.11-lab/newlibc/ansi/getenv.c new file mode 100644 index 0000000..76a2a68 --- /dev/null +++ b/linux-0.11-lab/newlibc/ansi/getenv.c @@ -0,0 +1,25 @@ +#include +#include + +/* + * Simple getenv. Linus + */ + +extern char ** environ; + +char * getenv(const char * name) +{ + int len; + char * tmp; + char ** env; + + len = strlen(name); + if (env=environ) + while (tmp=*(env++)) { + if (strncmp(name,tmp,len)) + continue; + if (tmp[len]=='=') + return tmp+len+1; + } + return NULL; +} diff --git a/linux-0.11-lab/newlibc/ansi/gettimeofday.c b/linux-0.11-lab/newlibc/ansi/gettimeofday.c new file mode 100644 index 0000000..1234a19 --- /dev/null +++ b/linux-0.11-lab/newlibc/ansi/gettimeofday.c @@ -0,0 +1,17 @@ +#include +#include +#include + +/* + * Another of these time-functions. I sure wish I knew what I am doing. + * Linus + */ + +int gettimeofday(struct timeval * tp, struct timezone * tz) +{ + tp->tv_sec = time(NULL); + tp->tv_usec = 0; + tz->tz_minuteswest = -120; + tz->tz_dsttime = DST_NONE; + return 0; +} diff --git a/linux-0.11-lab/newlibc/ansi/isatty.c b/linux-0.11-lab/newlibc/ansi/isatty.c new file mode 100644 index 0000000..66f5382 --- /dev/null +++ b/linux-0.11-lab/newlibc/ansi/isatty.c @@ -0,0 +1,15 @@ +#include +#include + +/* + * Simple isatty for Linux. + */ + +int isatty(int fd) +{ + struct termios tmp; + + if (ioctl(fd,TCGETS,&tmp)<0) + return (0); + return 1; +} diff --git a/linux-0.11-lab/newlibc/ansi/qsort.c b/linux-0.11-lab/newlibc/ansi/qsort.c new file mode 100644 index 0000000..0cdacf2 --- /dev/null +++ b/linux-0.11-lab/newlibc/ansi/qsort.c @@ -0,0 +1,239 @@ +/* Copyright (C) 1991 Free Software Foundation, Inc. +This file is part of the GNU C Library. +Written by Douglas C. Schmidt (schmidt@ics.uci.edu). + +The GNU C Library is free software; you can redistribute it and/or +modify it under the terms of the GNU Library General Public License as +published by the Free Software Foundation; either version 2 of the +License, or (at your option) any later version. + +The GNU C Library is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include +#include +#include + +/* Byte-wise swap two items of size SIZE. */ +#define SWAP(a, b, size) \ + do \ + { \ + register size_t __size = (size); \ + register char *__a = (a), *__b = (b); \ + do \ + { \ + char __tmp = *__a; \ + *__a++ = *__b; \ + *__b++ = __tmp; \ + } while (--__size > 0); \ + } while (0) + +/* Discontinue quicksort algorithm when partition gets below this size. + This particular magic number was chosen to work best on a Sun 4/260. */ +#define MAX_THRESH 4 + +/* Stack node declarations used to store unfulfilled partition obligations. */ +typedef struct + { + char *lo; + char *hi; + } stack_node; + +/* The next 4 #defines implement a very fast in-line stack abstraction. */ +#define STACK_SIZE (8 * sizeof(unsigned long int)) +#define PUSH(low, high) ((void) ((top->lo = (low)), (top->hi = (high)), ++top)) +#define POP(low, high) ((void) (--top, (low = top->lo), (high = top->hi))) +#define STACK_NOT_EMPTY (stack < top) + + +/* Order size using quicksort. This implementation incorporates + four optimizations discussed in Sedgewick: + + 1. Non-recursive, using an explicit stack of pointer that store the + next array partition to sort. To save time, this maximum amount + of space required to store an array of MAX_INT is allocated on the + stack. Assuming a 32-bit integer, this needs only 32 * + sizeof(stack_node) == 136 bits. Pretty cheap, actually. + + 2. Chose the pivot element using a median-of-three decision tree. + This reduces the probability of selecting a bad pivot value and + eliminates certain extraneous comparisons. + + 3. Only quicksorts TOTAL_ELEMS / MAX_THRESH partitions, leaving + insertion sort to order the MAX_THRESH items within each partition. + This is a big win, since insertion sort is faster for small, mostly + sorted array segements. + + 4. The larger of the two sub-partitions is always pushed onto the + stack first, with the algorithm then concentrating on the + smaller partition. This *guarantees* no more than log (n) + stack size is needed (actually O(1) in this case)! */ + +void +DEFUN(qsort, (pbase, total_elems, size, cmp), + PTR CONST pbase AND size_t total_elems AND size_t size AND + int EXFUN((*cmp), (CONST PTR, CONST PTR))) +{ + register char *base_ptr = (char *) pbase; + + /* Allocating SIZE bytes for a pivot buffer facilitates a better + algorithm below since we can do comparisons directly on the pivot. */ + char *pivot_buffer = (char *) __alloca (size); + CONST size_t max_thresh = MAX_THRESH * size; + + if (total_elems > MAX_THRESH) + { + char *lo = base_ptr; + char *hi = &lo[size * (total_elems - 1)]; + /* Largest size needed for 32-bit int!!! */ + stack_node stack[STACK_SIZE]; + stack_node *top = stack + 1; + + while (STACK_NOT_EMPTY) + { + char *left_ptr; + char *right_ptr; + + char *pivot = pivot_buffer; + + /* Select median value from among LO, MID, and HI. Rearrange + LO and HI so the three values are sorted. This lowers the + probability of picking a pathological pivot value and + skips a comparison for both the LEFT_PTR and RIGHT_PTR. */ + + char *mid = lo + size * ((hi - lo) / size >> 1); + + if ((*cmp)((PTR) mid, (PTR) lo) < 0) + SWAP(mid, lo, size); + if ((*cmp)((PTR) hi, (PTR) mid) < 0) + SWAP(mid, hi, size); + else + goto jump_over; + if ((*cmp)((PTR) mid, (PTR) lo) < 0) + SWAP(mid, lo, size); + jump_over:; + memcpy(pivot, mid, size); + pivot = pivot_buffer; + + left_ptr = lo + size; + right_ptr = hi - size; + + /* Here's the famous ``collapse the walls'' section of quicksort. + Gotta like those tight inner loops! They are the main reason + that this algorithm runs much faster than others. */ + do + { + while ((*cmp)((PTR) left_ptr, (PTR) pivot) < 0) + left_ptr += size; + + while ((*cmp)((PTR) pivot, (PTR) right_ptr) < 0) + right_ptr -= size; + + if (left_ptr < right_ptr) + { + SWAP(left_ptr, right_ptr, size); + left_ptr += size; + right_ptr -= size; + } + else if (left_ptr == right_ptr) + { + left_ptr += size; + right_ptr -= size; + break; + } + } + while (left_ptr <= right_ptr); + + /* Set up pointers for next iteration. First determine whether + left and right partitions are below the threshold size. If so, + ignore one or both. Otherwise, push the larger partition's + bounds on the stack and continue sorting the smaller one. */ + + if ((size_t) (right_ptr - lo) <= max_thresh) + { + if ((size_t) (hi - left_ptr) <= max_thresh) + /* Ignore both small partitions. */ + POP(lo, hi); + else + /* Ignore small left partition. */ + lo = left_ptr; + } + else if ((size_t) (hi - left_ptr) <= max_thresh) + /* Ignore small right partition. */ + hi = right_ptr; + else if ((right_ptr - lo) > (hi - left_ptr)) + { + /* Push larger left partition indices. */ + PUSH(lo, right_ptr); + lo = left_ptr; + } + else + { + /* Push larger right partition indices. */ + PUSH(left_ptr, hi); + hi = right_ptr; + } + } + } + + /* Once the BASE_PTR array is partially sorted by quicksort the rest + is completely sorted using insertion sort, since this is efficient + for partitions below MAX_THRESH size. BASE_PTR points to the beginning + of the array to sort, and END_PTR points at the very last element in + the array (*not* one beyond it!). */ + +#define min(x, y) ((x) < (y) ? (x) : (y)) + + { + char *CONST end_ptr = &base_ptr[size * (total_elems - 1)]; + char *tmp_ptr = base_ptr; + char *thresh = min(end_ptr, base_ptr + max_thresh); + register char *run_ptr; + + /* Find smallest element in first threshold and place it at the + array's beginning. This is the smallest array element, + and the operation speeds up insertion sort's inner loop. */ + + for (run_ptr = tmp_ptr + size; run_ptr <= thresh; run_ptr += size) + if ((*cmp)((PTR) run_ptr, (PTR) tmp_ptr) < 0) + tmp_ptr = run_ptr; + + if (tmp_ptr != base_ptr) + SWAP(tmp_ptr, base_ptr, size); + + /* Insertion sort, running from left-hand-side up to right-hand-side. */ + + run_ptr = base_ptr + size; + while ((run_ptr += size) <= end_ptr) + { + tmp_ptr = run_ptr - size; + while ((*cmp)((PTR) run_ptr, (PTR) tmp_ptr) < 0) + tmp_ptr -= size; + + tmp_ptr += size; + if (tmp_ptr != run_ptr) + { + char *trav; + + trav = run_ptr + size; + while (--trav >= run_ptr) + { + char c = *trav; + char *hi, *lo; + + for (hi = lo = trav; (lo -= size) >= tmp_ptr; hi = lo) + *hi = *lo; + *hi = c; + } + } + } + } +} + diff --git a/linux-0.11-lab/newlibc/ansi/rand.c b/linux-0.11-lab/newlibc/ansi/rand.c new file mode 100644 index 0000000..7082bcb --- /dev/null +++ b/linux-0.11-lab/newlibc/ansi/rand.c @@ -0,0 +1,19 @@ +#include + +/* we're useing GGUBS - should work, but it isn't the best algorithm */ + +static unsigned long _seed; + +int rand(void) +{ + if (!_seed) + _seed++; + _seed *= 16807; + _seed %= 0x7fffffff; + return _seed-1; +} + +void srand(unsigned int seed) +{ + _seed = seed; +} diff --git a/linux-0.11-lab/newlibc/ansi/strerror.c b/linux-0.11-lab/newlibc/ansi/strerror.c new file mode 100644 index 0000000..55baf32 --- /dev/null +++ b/linux-0.11-lab/newlibc/ansi/strerror.c @@ -0,0 +1,60 @@ +#include + +/* + * Yeah, I obviously put down a lot of thinking in the error messages. + * Linus + */ + +char * sys_errlist[] = { + "Unknown error", + "Not owner", + "No such file or directory", + "No such process", + "Interrupted system call", + "I/O error", + "No such device", + "Arg list too big", + "Unable to exec binary file", + "Bad file nr", + "No children", + "Try again", + "Out of memory", + "EACCES", + "EFAULT", + "ENOTBLK", + "EBUSY", + "EEXIST", + "EXDEV", + "ENODEV", + "ENOTDIR", + "EISDIR", + "EINVAL", + "ENFILE", + "EMFILE", + "ENOTTY", + "ETXTBSY", + "EFBIG", + "ENOSPC", + "ESPIPE", + "EROFS", + "EMLINK", + "EPIPE", + "EDOM", + "ERANGE", + "EDEADLK", + "ENAMETOOLONG", + "ENOLCK", + "ENOSYS", + "ENOTEMPTY"}; + +#define NR_ERRORS ((sizeof (sys_errlist))/(sizeof(char *))-1) + +int sys_nerr = NR_ERRORS; + +char * strerror(int n) +{ + if (n<0 || n>NR_ERRORS) + return ("unknown error"); + return sys_errlist[n]; +} + diff --git a/linux-0.11-lab/newlibc/ansi/strftime.c b/linux-0.11-lab/newlibc/ansi/strftime.c new file mode 100644 index 0000000..87cc995 --- /dev/null +++ b/linux-0.11-lab/newlibc/ansi/strftime.c @@ -0,0 +1,312 @@ +/* + * strftime.c + * + * Public-domain relatively quick-and-dirty implemenation of + * ANSI library routine for System V Unix systems. + * + * If you want stuff in the System V ascftime routine, add the SYSV_EXT define. + * For stuff needed to implement the P1003.2 date command, add POSIX2_DATE. + * + * The code for %c, %x, and %X is my best guess as to what's "appropriate". + * This version ignores LOCALE information. + * It also doesn't worry about multi-byte characters. + * So there. + * + * Arnold Robbins + * January, February, March, 1991 + * + * Fixes from ado@elsie.nci.nih.gov + * February 1991 + */ + +#include +#include +#include +#include +#include + +static int weeknumber(const struct tm *timeptr, int firstweekday); + +static char *tzname[2] = {"",""}; +int daylight = 1; + +#define SYSV_EXT 1 /* stuff in System V ascftime routine */ +#define POSIX2_DATE 1 /* stuff in Posix 1003.2 date command */ +#define VMS_EXT 1 /* include %V for VMS date format */ + +#if defined(POSIX2_DATE) && ! defined(SYSV_EXT) +#define SYSV_EXT 1 +#endif + +/* strftime --- produce formatted time */ + +size_t strftime(char *s, size_t maxsize, const char *format, + const struct tm *timeptr) +{ + char *endp = s + maxsize; + char *start = s; + char tbuf[100]; + int i; + static short first = 1; + + /* various tables, useful in North America */ + static char *days_a[] = { + "Sun", "Mon", "Tue", "Wed", + "Thu", "Fri", "Sat", + }; + static char *days_l[] = { + "Sunday", "Monday", "Tuesday", "Wednesday", + "Thursday", "Friday", "Saturday", + }; + static char *months_a[] = { + "Jan", "Feb", "Mar", "Apr", "May", "Jun", + "Jul", "Aug", "Sep", "Oct", "Nov", "Dec", + }; + static char *months_l[] = { + "January", "February", "March", "April", + "May", "June", "July", "August", "September", + "October", "November", "December", + }; + static char *ampm[] = { "AM", "PM", }; + + if (s == NULL || format == NULL || timeptr == NULL || maxsize == 0) + return 0; + + if (strchr(format, '%') == NULL && strlen(format) + 1 >= maxsize) + return 0; + + if (first) { + tzset(); + first = 0; + } + + for (; *format && s < endp - 1; format++) { + tbuf[0] = '\0'; + if (*format != '%') { + *s++ = *format; + continue; + } + again: + switch (*++format) { + case '\0': + *s++ = '%'; + goto out; + + case '%': + *s++ = '%'; + continue; + + case 'a': /* abbreviated weekday name */ + if (timeptr->tm_wday < 0 || timeptr->tm_wday > 6) + strcpy(tbuf, "?"); + else + strcpy(tbuf, days_a[timeptr->tm_wday]); + break; + + case 'A': /* full weekday name */ + if (timeptr->tm_wday < 0 || timeptr->tm_wday > 6) + strcpy(tbuf, "?"); + else + strcpy(tbuf, days_l[timeptr->tm_wday]); + break; + +#ifdef SYSV_EXT + case 'h': /* abbreviated month name */ +#endif + case 'b': /* abbreviated month name */ + if (timeptr->tm_mon < 0 || timeptr->tm_mon > 11) + strcpy(tbuf, "?"); + else + strcpy(tbuf, months_a[timeptr->tm_mon]); + break; + + case 'B': /* full month name */ + if (timeptr->tm_mon < 0 || timeptr->tm_mon > 11) + strcpy(tbuf, "?"); + else + strcpy(tbuf, months_l[timeptr->tm_mon]); + break; + + case 'c': /* appropriate date and time representation */ + sprintf(tbuf, "%s %s %2d %02d:%02d:%02d %d", + days_a[timeptr->tm_wday], + months_a[timeptr->tm_mon], + timeptr->tm_mday, + timeptr->tm_hour, + timeptr->tm_min, + timeptr->tm_sec, + timeptr->tm_year + 1900); + break; + + case 'd': /* day of the month, 01 - 31 */ + sprintf(tbuf, "%02d", timeptr->tm_mday); + break; + + case 'H': /* hour, 24-hour clock, 00 - 23 */ + sprintf(tbuf, "%02d", timeptr->tm_hour); + break; + + case 'I': /* hour, 12-hour clock, 01 - 12 */ + i = timeptr->tm_hour; + if (i == 0) + i = 12; + else if (i > 12) + i -= 12; + sprintf(tbuf, "%02d", i); + break; + + case 'j': /* day of the year, 001 - 366 */ + sprintf(tbuf, "%03d", timeptr->tm_yday + 1); + break; + + case 'm': /* month, 01 - 12 */ + sprintf(tbuf, "%02d", timeptr->tm_mon + 1); + break; + + case 'M': /* minute, 00 - 59 */ + sprintf(tbuf, "%02d", timeptr->tm_min); + break; + + case 'p': /* am or pm based on 12-hour clock */ + if (timeptr->tm_hour < 12) + strcpy(tbuf, ampm[0]); + else + strcpy(tbuf, ampm[1]); + break; + + case 'S': /* second, 00 - 61 */ + sprintf(tbuf, "%02d", timeptr->tm_sec); + break; + + case 'U': /* week of year, Sunday is first day of week */ + sprintf(tbuf, "%d", weeknumber(timeptr, 0)); + break; + + case 'w': /* weekday, Sunday == 0, 0 - 6 */ + sprintf(tbuf, "%d", timeptr->tm_wday); + break; + + case 'W': /* week of year, Monday is first day of week */ + sprintf(tbuf, "%d", weeknumber(timeptr, 1)); + break; + + case 'x': /* appropriate date representation */ + sprintf(tbuf, "%s %s %2d %d", + days_a[timeptr->tm_wday], + months_a[timeptr->tm_mon], + timeptr->tm_mday, + timeptr->tm_year + 1900); + break; + + case 'X': /* appropriate time representation */ + sprintf(tbuf, "%02d:%02d:%02d", + timeptr->tm_hour, + timeptr->tm_min, + timeptr->tm_sec); + break; + + case 'y': /* year without a century, 00 - 99 */ + i = timeptr->tm_year % 100; + sprintf(tbuf, "%d", i); + break; + + case 'Y': /* year with century */ + sprintf(tbuf, "%d", 1900 + timeptr->tm_year); + break; + + case 'Z': /* time zone name or abbrevation */ + i = 0; + if (daylight && timeptr->tm_isdst) + i = 1; + strcpy(tbuf, tzname[i]); + break; + +#ifdef SYSV_EXT + case 'n': /* same as \n */ + tbuf[0] = '\n'; + tbuf[1] = '\0'; + break; + + case 't': /* same as \t */ + tbuf[0] = '\t'; + tbuf[1] = '\0'; + break; + + case 'D': /* date as %m/%d/%y */ + strftime(tbuf, sizeof tbuf, "%m/%d/%y", timeptr); + break; + + case 'e': /* day of month, blank padded */ + sprintf(tbuf, "%2d", timeptr->tm_mday); + break; + + case 'r': /* time as %I:%M:%S %p */ + strftime(tbuf, sizeof tbuf, "%I:%M:%S %p", timeptr); + break; + + case 'R': /* time as %H:%M */ + strftime(tbuf, sizeof tbuf, "%H:%M", timeptr); + break; + + case 'T': /* time as %H:%M:%S */ + strftime(tbuf, sizeof tbuf, "%H:%M:%S", timeptr); + break; +#endif + + +#ifdef VMS_EXT + case 'V': /* date as dd-bbb-YYYY */ + sprintf(tbuf, "%2d-%3.3s-%4d", + timeptr->tm_mday, + months_a[timeptr->tm_mon], + timeptr->tm_year + 1900); + for (i = 3; i < 6; i++) + if (islower(tbuf[i])) + tbuf[i] = toupper(tbuf[i]); + break; +#endif + + +#ifdef POSIX2_DATE + case 'C': + sprintf(tbuf, "%02d", (timeptr->tm_year + 1900) / 100); + break; + + + case 'E': + case 'O': + /* POSIX locale extensions, ignored for now */ + goto again; +#endif + default: + tbuf[0] = '%'; + tbuf[1] = *format; + tbuf[2] = '\0'; + break; + } + i = strlen(tbuf); + if (i) + if (s + i < endp - 1) { + strcpy(s, tbuf); + s += i; + } else + return 0; + } +out: + if (s < endp && *format == '\0') { + *s = '\0'; + return (s - start); + } else + return 0; +} + +/* weeknumber --- figure how many weeks into the year */ + +static int weeknumber(const struct tm *timeptr, int firstweekday) +{ + if (firstweekday == 0) + return (timeptr->tm_yday + 7 - timeptr->tm_wday) / 7; + else + return (timeptr->tm_yday + 7 - + (timeptr->tm_wday ? (timeptr->tm_wday - 1) : 6)) / 7; +} diff --git a/linux-0.11-lab/newlibc/ansi/string.c b/linux-0.11-lab/newlibc/ansi/string.c new file mode 100644 index 0000000..dd28670 --- /dev/null +++ b/linux-0.11-lab/newlibc/ansi/string.c @@ -0,0 +1,13 @@ +#ifndef __GNUC__ +#error I want gcc! +#endif + +/* + * Quick and dirty way of getting all the string routines into the lib. + * Linus + */ + +#define extern +#define inline +#define __LIBRARY__ +#include diff --git a/linux-0.11-lab/newlibc/ansi/strtol.c b/linux-0.11-lab/newlibc/ansi/strtol.c new file mode 100644 index 0000000..fc3c94e --- /dev/null +++ b/linux-0.11-lab/newlibc/ansi/strtol.c @@ -0,0 +1,91 @@ +#include +#include +#include +#include + +/* + * strtoul etc... Hope it works. Linus + */ + +/* ok, this isn't portable, but it works */ + +#define do_mul(base,result,overflow) \ +__asm__("mull %3":"=a" (result),"=d" (overflow):"0" (result),"g" (base)) + +#define NUM(c) (isdigit(c)?c-'0':islower(c)?c-'a'+10:isupper(c)?c-'A'+10:127) + +static unsigned long _strtoul(const char * s, char **endp, int base) +{ + unsigned long overflow,num,result; + + if (!base) + if (*s=='0') + if (toupper(s[1])=='X') + base=16; + else + base=8; + else + base=10; + if (base == 16 && *s=='0' && toupper(s[1])=='X') + s += 2; + overflow = 1; /* forces error if no while */ + result = 0; + while ((num=NUM(*s))36) + return LONG_MAX; + while (isspace(*s)) + s++; + *endp = (char *) s; + if (sign=(*s=='-')) + s++; + result = _strtoul(s,endp,base); + if (!sign && result > (unsigned) LONG_MAX) { + errno = ERANGE; + return LONG_MAX; + } else if (sign && result > (unsigned) LONG_MAX+1) { + errno = ERANGE; + return LONG_MIN; + } + return sign?-result:result; +} + +unsigned long strtoul(const char * s, char **endp, int base) +{ + char * tmp; + + if (!endp) /* tmp is never really used, this just */ + endp = &tmp; /* is a hack so that we never have to check */ + *endp = (char *) s; + if (base<0 || base==1 || base>36) { + errno = ERANGE; + return ULONG_MAX; + } + while (isspace(*s)) + s++; + *endp = (char *) s; + return _strtoul(s,endp,base); +} + diff --git a/linux-0.11-lab/newlibc/ansi/system.c b/linux-0.11-lab/newlibc/ansi/system.c new file mode 100644 index 0000000..f6dfc2c --- /dev/null +++ b/linux-0.11-lab/newlibc/ansi/system.c @@ -0,0 +1,30 @@ +#include +#include +#include +#include +#include + +/* + * Urgh. If this works I'm surprised. Linus + * + * Should be updated to use sigactions, I think. + */ + +int system(const char * cmd) +{ + int ret, pid, waitstat; + void (*sigint) (), (*sigquit) (); + + if ((pid = fork()) == 0) { + execl("/bin/sh", "sh", "-c", cmd, NULL); + exit(127); + } + if (pid < 0) return(127 << 8); + sigint = signal(SIGINT, SIG_IGN); + sigquit = signal(SIGQUIT, SIG_IGN); + while ((waitstat = wait(&ret)) != pid && waitstat != -1); + if (waitstat == -1) ret = -1; + signal(SIGINT, sigint); + signal(SIGQUIT, sigquit); + return(ret); +} diff --git a/linux-0.11-lab/newlibc/ansi/tzset.c b/linux-0.11-lab/newlibc/ansi/tzset.c new file mode 100644 index 0000000..3ea5473 --- /dev/null +++ b/linux-0.11-lab/newlibc/ansi/tzset.c @@ -0,0 +1,47 @@ +#include +#include +#include + +/* + * More of these damn time-functions. I hope somebody has a complete + * PD library out there. Linus + */ + +static char tz1[1024]; +static char tz2[1024]; + +char *tzname[2] = { + tz1, tz2 +}; +extern int daylight; + +/* I don't know how to implement this - the results are ... */ +static char *timezone(int minutes, int dst) +{ + static char tmp[40]; + + if (dst) + minutes += 60; + strcpy(tmp,"GMT"); + if (!minutes) + return tmp; + if (minutes<0) { + tmp[3] = '-'; + minutes = -minutes; + } else + tmp[3] = '+'; + tmp[4] = '0'+(minutes/60); + tmp[5] = 0; + return tmp; +} + +void tzset(void) +{ + struct timeval tp; + struct timezone tz; + + gettimeofday(&tp, &tz); + strcpy(tz1, timezone(tz.tz_minuteswest, 0)); + strcpy(tz2, timezone(tz.tz_minuteswest, 1)); + daylight = tz.tz_dsttime; +} diff --git a/linux-0.11-lab/newlibc/copying.dj b/linux-0.11-lab/newlibc/copying.dj new file mode 100644 index 0000000..63a39a1 --- /dev/null +++ b/linux-0.11-lab/newlibc/copying.dj @@ -0,0 +1,46 @@ +This is the file "copying.dj". + + Copyright Information for sources and executables that are marked + Copyright (C) DJ Delorie + 24 Kirsten Ave + Rochester NH 03867-2954 + +This document is Copyright (C) DJ Delorie and may be distributed +verbatim, but changing it is not allowed. + +Source code and executables copyright DJ Delorie are referred to as +"djcode" in this document. + +Source code copyright DJ Delorie is distributed under the terms of the +GNU General Public Licence, with the following exceptions: + + 1 If the user of this software develops an application that requires + djcode to run, and that application is distributed under the terms + of the GNU General Public License (GPL), a binary executable of + djcode may be distributed with binary executables of the application, + and source files for djcode must be available with source files for + the application, under the terms of the GNU GPL. + + 2 If the user of this software develops an application that requires + djcode to run, and that application is NOT distributed under the terms + of the GNU General Public License (GPL), a binary executable of + djcode may be distributed with binary executables of the application, + provided a royalty of 5% of the total sale price or $5 (whichever is + more) per copy sold is paid to DJ Delorie (at the address above). + + 3 A person or organization who develops software that requires djcode + but does not distribute that software under the terms of the GNU GPL + relinquishes all rights to obtain or redistribute the source code + for djcode, including any rights granted by the GNU General Public + License, and may only distribute executables of djcode under the + terms of exception 2, above. + + Basically, the GNU GPL only applies to my code if it applies to your code. + +A copy of the file "COPYING" is included with this document. If you did not +receive a copy of "COPYING", you may obtain one from whence this document +was obtained, or by writing: + Free Software Foundation + 675 Mass Ave + Cambridge, MA 02139 + USA diff --git a/linux-0.11-lab/newlibc/crt/Makefile b/linux-0.11-lab/newlibc/crt/Makefile new file mode 100644 index 0000000..4219597 --- /dev/null +++ b/linux-0.11-lab/newlibc/crt/Makefile @@ -0,0 +1,40 @@ +# +# Makefile for crt0.o of Linux +# +#AR =/usr/local/bin/gar +AR =/usr/local/bin/ar +#AS =/usr/local/bin/gcc-as +AS =/usr/local/bin/as +#LD =/usr/local/bin/gld +LD =/usr/local/bin/ld +RANLIB =/usr/local/bin/ranlib +LDFLAGS =-s -x +CC =/usr/local/bin/gcc -B/usr/local/bin/ -v +#CC =/local/bin/gcc-i386-sysv -v +INC =-nostdinc -I. -I../include +CFLAGS =-Wall -O -fstrength-reduce -fomit-frame-pointer \ + $(INC)# -DNEW_CRT0 +CPP =$(CC) -E $(INC) +RM =/usr/bin/rm + +.c.s: + $(CC) $(CFLAGS) -S -o $*.s $< +.s.o: + $(CC) -c -o $*.o $< +.c.o: + $(CC) $(CFLAGS) -c -o $*.o $< + +OBJS = crt0.o + +all: $(OBJS) + +clean: + $(RM) -f core *.o *.a tmp_make + +dep: + sed '/\#\#\# Dependencies/q' < Makefile > tmp_make + (for i in *.c;do echo -n `echo $$i | sed 's,\.c,\.s,'`" "; \ + $(CPP) -M $$i;done) >> tmp_make + cp tmp_make Makefile + +### Dependencies: diff --git a/linux-0.11-lab/newlibc/crt/crt0.s b/linux-0.11-lab/newlibc/crt/crt0.s new file mode 100644 index 0000000..473dc1a --- /dev/null +++ b/linux-0.11-lab/newlibc/crt/crt0.s @@ -0,0 +1,55 @@ + .text + + .globl _environ + +__entry: + fldcw init_cw +# movl $45,%eax +# movl $0,%ebx +# int $0x80 +# movl %eax,____brk_addr + movl 8(%esp),%eax + movl %eax,_environ + call _main + pushl %eax +1: call _exit + jmp 1b + + .data + .align 2 +_environ: + .long 0 +init_cw: + .word 0x0262 + +/* Here is the dirty part. Settup up your 387 through the control word + * (cw) register. + * + * 15-13 12 11-10 9-8 7-6 5 4 3 2 1 0 + * | reserved | IC | RC | PC | reserved | PM | UM | OM | ZM | DM | IM + * + * IM: Invalid operation mask + * DM: Denormalized operand mask + * ZM: Zero-divide mask + * OM: Overflow mask + * UM: Underflow mask + * PM: Precision (inexact result) mask + * + * Mask bit is 1 means no interrupt. + * + * PC: Precision control + * 11 - round to extended precision + * 10 - round to double precision + * 00 - round to single precision + * + * RC: Rounding control + * 00 - rounding to nearest + * 01 - rounding down (toward - infinity) + * 10 - rounding up (toward + infinity) + * 11 - rounding toward zero + * + * IC: Infinity control + * That is for 8087 and 80287 only. + * + * The hardware default is 0x037f. I choose 0x0262. + */ diff --git a/linux-0.11-lab/newlibc/dirent/Makefile b/linux-0.11-lab/newlibc/dirent/Makefile new file mode 100644 index 0000000..827198c --- /dev/null +++ b/linux-0.11-lab/newlibc/dirent/Makefile @@ -0,0 +1,46 @@ +# +# Makefile for the direntry-library functions +# + +LIB =../Libc.a +#AR =gar +#AS =gas +#LD =gld +AR =ar +AS =as +LD =ld +LDFLAGS =-s -x +CC =gcc +INC =-nostdinc -I../include +CFLAGS =-Wall -O -fstrength-reduce -fomit-frame-pointer \ + -finline-functions $(INC) +CPP =$(CC) -E $(INC) + +.c.s: + $(CC) $(CFLAGS) \ + -S -o $*.s $< +.s.o: + $(CC) -c -o $*.o $< +.c.o: + $(CC) $(CFLAGS) \ + -c -o $*.o $< + +OBJS = closedir.o opendir.o readdir.o rewinddir.o + +all: library + +library: $(OBJS) + $(AR) uvc $(LIB) $(OBJS) + sync + +clean: + $(RM) -f core *.o *.a tmp_make + for i in *.c;do $(RM) -f `basename $$i .c`.s;done + +dep: + sed '/\#\#\# Dependencies/q' < Makefile > tmp_make + (for i in *.c;do echo -n `echo $$i | sed 's,\.c,\.s,'`" "; \ + $(CPP) -M $$i;done) >> tmp_make + cp tmp_make Makefile + +### Dependencies: diff --git a/linux-0.11-lab/newlibc/dirent/closedir.c b/linux-0.11-lab/newlibc/dirent/closedir.c new file mode 100644 index 0000000..284ced4 --- /dev/null +++ b/linux-0.11-lab/newlibc/dirent/closedir.c @@ -0,0 +1,24 @@ +/* + * Simple dirent routines for Linux. + * + * (C) 1991 Linus Torvalds + */ + +#include +#include +#include +#include + +int closedir(DIR * dir) +{ + int fd; + + if (!dir) { + errno = EBADF; + return -1; + } + fd = dir->dd_fd; + free(dir->dd_buf); + free(dir); + return close(fd); +} diff --git a/linux-0.11-lab/newlibc/dirent/opendir.c b/linux-0.11-lab/newlibc/dirent/opendir.c new file mode 100644 index 0000000..d20210b --- /dev/null +++ b/linux-0.11-lab/newlibc/dirent/opendir.c @@ -0,0 +1,31 @@ +/* + * Simple dirent routines for Linux. + * + * (C) 1991 Linus Torvalds + */ + +#include +#include +#include +#include +#include +#include + +DIR * opendir(const char * dirname) +{ + int fd; + struct stat stat_buf; + DIR * ptr; + + if ((fd = open(dirname,O_RDONLY))<0) + return NULL; + if (fstat(fd,&stat_buf)<0 || + !S_ISDIR(stat_buf.st_mode) || + !(ptr=malloc(sizeof(*ptr)))) { + close(fd); + return NULL; + } + memset(ptr,0,sizeof(*ptr)); + ptr->dd_fd = fd; + return ptr; +} diff --git a/linux-0.11-lab/newlibc/dirent/readdir.c b/linux-0.11-lab/newlibc/dirent/readdir.c new file mode 100644 index 0000000..07b3778 --- /dev/null +++ b/linux-0.11-lab/newlibc/dirent/readdir.c @@ -0,0 +1,46 @@ +/* + * Simple dirent routines for Linux. + * + * (C) 1991 Linus Torvalds + */ + +#include +#include +#include +#include +#include +#include + +static struct dirent result; + +struct dirent * readdir(DIR * dir) +{ + struct direct * ptr; + + if (!dir) { + errno = EBADF; + return NULL; + } + if (!dir->dd_buf) + if (!(dir->dd_buf = malloc(DIRBUF))) + return NULL; + else + dir->dd_size = dir->dd_loc = 0; + while (1) { + if (dir->dd_size <= dir->dd_loc) { + dir->dd_loc = 0; + dir->dd_size = read(dir->dd_fd,dir->dd_buf,DIRBUF); + } + if (dir->dd_size <= 0) + return NULL; + ptr = (struct direct *) (dir->dd_loc + dir->dd_buf); + dir->dd_loc += sizeof (*ptr); + if (!ptr->d_ino) + continue; + result.d_ino = ptr->d_ino; + strncpy(result.d_name,ptr->d_name,NAME_MAX); + result.d_name[NAME_MAX] = 0; + result.d_reclen = strlen(result.d_name); + return &result; + } +} diff --git a/linux-0.11-lab/newlibc/dirent/rewinddir.c b/linux-0.11-lab/newlibc/dirent/rewinddir.c new file mode 100644 index 0000000..4d0e975 --- /dev/null +++ b/linux-0.11-lab/newlibc/dirent/rewinddir.c @@ -0,0 +1,19 @@ +/* + * Simple dirent routines for Linux. + * + * (C) 1991 Linus Torvalds + */ + +#include +#include +#include + +void rewinddir(DIR * dir) +{ + if (!dir) { + errno = EBADF; + return; + } + dir->dd_size = dir->dd_loc = 0; + lseek(dir->dd_fd,0L,SEEK_SET); +} diff --git a/linux-0.11-lab/newlibc/grp/Makefile b/linux-0.11-lab/newlibc/grp/Makefile new file mode 100644 index 0000000..3f40ef7 --- /dev/null +++ b/linux-0.11-lab/newlibc/grp/Makefile @@ -0,0 +1,44 @@ +# +# Makefile for some ansi-library functions +# + +LIB =../Libc.a +AR =gar +AS =gas +LD =gld +LDFLAGS =-s -x +CC =gcc +#INC =-nostdinc -I/linux/usr/include +CFLAGS =-Wall -O -fstrength-reduce -fomit-frame-pointer \ + -finline-functions $(INC) +CPP =(CC) -E $(INC) + +.c.s: + $(CC) $(CFLAGS) \ + -S -o $*.s $< +.s.o: + $(CC) -c -o $*.o $< +.c.o: + $(CC) $(CFLAGS) \ + -c -o $*.o $< + +OBJS = fgetgrent.o getgrent.o getgrgid.o getgrnam.o grpopen.o \ + grpread.o initgroups.o + +all: library + +library: $(OBJS) + $(AR) uvc $(LIB) $(OBJS) + sync + +clean: + $(RM) -f core *.o *.a tmp_make + for i in *.c;do $(RM) -f `basename $$i .c`.s;done + +dep: + sed '/\#\#\# Dependencies/q' < Makefile > tmp_make + (for i in *.c;do echo -n `echo $$i | sed 's,\.c,\.s,'`" "; \ + $(CPP) -M $$i;done) >> tmp_make + cp tmp_make Makefile + +### Dependencies: diff --git a/linux-0.11-lab/newlibc/grp/fgetgrent.c b/linux-0.11-lab/newlibc/grp/fgetgrent.c new file mode 100644 index 0000000..bef3e3f --- /dev/null +++ b/linux-0.11-lab/newlibc/grp/fgetgrent.c @@ -0,0 +1,41 @@ +/* Copyright (C) 1991 Free Software Foundation, Inc. +This file is part of the GNU C Library. + +The GNU C Library is free software; you can redistribute it and/or +modify it under the terms of the GNU Library General Public License as +published by the Free Software Foundation; either version 2 of the +License, or (at your option) any later version. + +The GNU C Library is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include +#include +#include +#include +#include +#include +#include + + +/* Read a group entry from STREAM. */ +struct group * +DEFUN(fgetgrent, (stream), FILE *stream) +{ + static PTR info = NULL; + if (info == NULL) + { + info = __grpalloc(); + if (info == NULL) + return NULL; + } + + return __grpread(stream, info); +} diff --git a/linux-0.11-lab/newlibc/grp/getgrent.c b/linux-0.11-lab/newlibc/grp/getgrent.c new file mode 100644 index 0000000..105572f --- /dev/null +++ b/linux-0.11-lab/newlibc/grp/getgrent.c @@ -0,0 +1,67 @@ +/* Copyright (C) 1991 Free Software Foundation, Inc. +This file is part of the GNU C Library. + +The GNU C Library is free software; you can redistribute it and/or +modify it under the terms of the GNU Library General Public License as +published by the Free Software Foundation; either version 2 of the +License, or (at your option) any later version. + +The GNU C Library is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include +#include +#include +#include + +static FILE *stream = NULL; + +/* Rewind the stream. */ +void +DEFUN_VOID(setgrent) +{ + if (stream != NULL) + rewind(stream); +} + + +/* Close the stream. */ +void +DEFUN_VOID(endgrent) +{ + if (stream != NULL) + { + (void) fclose(stream); + stream = NULL; + } +} + + +/* Read an entry from the stream. */ +struct group * +DEFUN_VOID(getgrent) +{ + static PTR info = NULL; + if (info == NULL) + { + info = __grpalloc(); + if (info == NULL) + return(NULL); + } + + if (stream == NULL) + { + stream = __grpopen(); + if (stream == NULL) + return(NULL); + } + + return(__grpread(stream, info)); +} diff --git a/linux-0.11-lab/newlibc/grp/getgrgid.c b/linux-0.11-lab/newlibc/grp/getgrgid.c new file mode 100644 index 0000000..1375f5f --- /dev/null +++ b/linux-0.11-lab/newlibc/grp/getgrgid.c @@ -0,0 +1,50 @@ +/* Copyright (C) 1991 Free Software Foundation, Inc. +This file is part of the GNU C Library. + +The GNU C Library is free software; you can redistribute it and/or +modify it under the terms of the GNU Library General Public License as +published by the Free Software Foundation; either version 2 of the +License, or (at your option) any later version. + +The GNU C Library is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include +#include +#include +#include +#include + +/* Search for an entry with a matching group ID. */ +struct group * +DEFUN(getgrgid, (gid), register gid_t gid) +{ + static PTR info = NULL; + register FILE *stream; + register struct group *g; + + if (info == NULL) + { + info = __grpalloc(); + if (info == NULL) + return NULL; + } + + stream = __grpopen(); + if (stream == NULL) + return NULL; + + while ((g = __grpread(stream, info)) != NULL) + if (g->gr_gid == (gid_t) gid) + break; + + (void) fclose(stream); + return g; +} diff --git a/linux-0.11-lab/newlibc/grp/getgrnam.c b/linux-0.11-lab/newlibc/grp/getgrnam.c new file mode 100644 index 0000000..1f88ea3 --- /dev/null +++ b/linux-0.11-lab/newlibc/grp/getgrnam.c @@ -0,0 +1,50 @@ +/* Copyright (C) 1991 Free Software Foundation, Inc. +This file is part of the GNU C Library. + +The GNU C Library is free software; you can redistribute it and/or +modify it under the terms of the GNU Library General Public License as +published by the Free Software Foundation; either version 2 of the +License, or (at your option) any later version. + +The GNU C Library is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include +#include +#include +#include +#include + +/* Search for an entry with a matching name. */ +struct group * +DEFUN(getgrnam, (name), register CONST char *name) +{ + static PTR info = NULL; + register FILE *stream; + register struct group *g; + + if (info == NULL) + { + info = __grpalloc(); + if (info == NULL) + return NULL; + } + + stream = __grpopen(); + if (stream == NULL) + return NULL; + + while ((g = __grpread(stream, info)) != NULL) + if (!strcmp(g->gr_name, name)) + break; + + (void) fclose(stream); + return g; +} diff --git a/linux-0.11-lab/newlibc/grp/grpopen.c b/linux-0.11-lab/newlibc/grp/grpopen.c new file mode 100644 index 0000000..77d1597 --- /dev/null +++ b/linux-0.11-lab/newlibc/grp/grpopen.c @@ -0,0 +1,28 @@ +/* Copyright (C) 1991 Free Software Foundation, Inc. +This file is part of the GNU C Library. + +The GNU C Library is free software; you can redistribute it and/or +modify it under the terms of the GNU Library General Public License as +published by the Free Software Foundation; either version 2 of the +License, or (at your option) any later version. + +The GNU C Library is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include +#include +#include + +/* Return a new stream open on the group file. */ +FILE * +DEFUN_VOID(__grpopen) +{ + return fopen("/etc/group", "r"); +} diff --git a/linux-0.11-lab/newlibc/grp/grpread.c b/linux-0.11-lab/newlibc/grp/grpread.c new file mode 100644 index 0000000..bf288a5 --- /dev/null +++ b/linux-0.11-lab/newlibc/grp/grpread.c @@ -0,0 +1,132 @@ +/* Copyright (C) 1991 Free Software Foundation, Inc. +This file is part of the GNU C Library. + +The GNU C Library is free software; you can redistribute it and/or +modify it under the terms of the GNU Library General Public License as +published by the Free Software Foundation; either version 2 of the +License, or (at your option) any later version. + +The GNU C Library is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include +#include +#include +#include +#include +#include +#include +#include + +/* This is the function that all the others are based on. + The format of the group file is known only here. */ + +/* Structure containing info kept by each __grpread caller. */ +typedef struct + { +#define NAME_SIZE 8 +#define PASSWD_SIZE 20 +#define MEMLIST_SIZE 1000 + char buf[NAME_SIZE + 1 + PASSWD_SIZE + 1 + 20 + 1 + 20 + MEMLIST_SIZE + 1]; + size_t max_members; + char **members; + struct group g; + } grpread_info; + + +/* Return a chunk of memory containing a pre-initialized `grpread_info'. */ +PTR +DEFUN_VOID(__grpalloc) +{ + grpread_info *info = (PTR) malloc(sizeof(grpread_info)); + if (info == NULL) + return NULL; + + info->max_members = 5; + info->members = (char **) malloc(5 * sizeof(char *)); + if (info->members == NULL) + { + free((PTR) info); + return NULL; + } + + return info; +} + +/* Read a group entry from STREAM, filling in G. */ +struct group * +DEFUN(__grpread, (stream, g), FILE *stream AND PTR CONST g) +{ + register grpread_info *CONST info = (grpread_info *) g; + char *start, *end; + register size_t i; + + /* Idiocy checks. */ + if (stream == NULL) + { + errno = EINVAL; + return NULL; + } + + if (fgets (info->buf, sizeof(info->buf), stream) == NULL) + return NULL; + + start = info->buf; + end = strchr (start, ':'); + if (end == NULL) + return NULL; + *end = '\0'; + info->g.gr_name = start; + + start = end + 1; + end = strchr (start, ':'); + if (end == NULL) + return NULL; + *end = '\0'; + info->g.gr_passwd = start; + + info->g.gr_gid = (gid_t) strtol (end + 1, &end, 10); + if (*end != ':') + return NULL; + + i = 0; + do + { + start = end + 1; + end = strchr (start, ','); + if (end == NULL) + { + end = strchr (start, '\n'); + if (end == start) + break; + if (end == NULL) + return NULL; + *end = '\0'; + end = NULL; + } + else + *end = '\0'; + + if (i == info->max_members - 2) + { + info->max_members += 5; + info->members = (char **) + realloc ((PTR) info->members, info->max_members * sizeof (char *)); + if (info->members == NULL) + return NULL; + } + + info->members[i++] = start; + } while (end != NULL); + info->members[i] = NULL; + info->g.gr_mem = info->members; + + return &info->g; +} diff --git a/linux-0.11-lab/newlibc/grp/initgroups.c b/linux-0.11-lab/newlibc/grp/initgroups.c new file mode 100644 index 0000000..e35811f --- /dev/null +++ b/linux-0.11-lab/newlibc/grp/initgroups.c @@ -0,0 +1,66 @@ +/* Copyright (C) 1989, 1991 Free Software Foundation, Inc. +This file is part of the GNU C Library. + +The GNU C Library is free software; you can redistribute it and/or +modify it under the terms of the GNU Library General Public License as +published by the Free Software Foundation; either version 2 of the +License, or (at your option) any later version. + +The GNU C Library is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include +#include +#include +#include +#include +#include + + +/* Initialize the group set for the current user + by reading the group database and using all groups + of which USER is a member. Also include GROUP. */ +int +DEFUN(initgroups, (user, group), + CONST char *user AND gid_t group) +{ + static PTR info = NULL; + register FILE *stream; + register struct group *g; + gid_t groups[NGROUPS_MAX]; + register size_t n; + + if (info == NULL) + { + info = __grpalloc(); + if (info == NULL) + return -1; + } + + stream = __grpopen(); + if (stream == NULL) + return -1; + + n = 0; + if (group >= 0) + groups[n++] = group; + + while (n < NGROUPS_MAX && (g = __grpread(stream, info)) != NULL) + if (g->gr_gid != group) + { + register char **m; + + for (m = g->gr_mem; *m != NULL; ++m) + if (!strcmp(*m, user)) + groups[n++] = g->gr_gid; + } + + return setgroups(n, groups); +} diff --git a/linux-0.11-lab/newlibc/include/a.out.h b/linux-0.11-lab/newlibc/include/a.out.h new file mode 100644 index 0000000..c6e42bd --- /dev/null +++ b/linux-0.11-lab/newlibc/include/a.out.h @@ -0,0 +1,222 @@ +/* Gnu a.out.h modified for linux */ +#ifndef __A_OUT_H__ +#define __A_OUT_H__ + +#define __GNU_EXEC_MACROS__ + +struct exec +{ + unsigned long a_magic; /* Use macros N_MAGIC, etc for access */ + unsigned a_text; /* length of text, in bytes */ + unsigned a_data; /* length of data, in bytes */ + unsigned a_bss; /* length of uninitialized data area for file, in bytes */ + unsigned a_syms; /* length of symbol table data in file, in bytes */ + unsigned a_entry; /* start address */ + unsigned a_trsize; /* length of relocation info for text, in bytes */ + unsigned a_drsize; /* length of relocation info for data, in bytes */ +}; + +#ifndef N_MAGIC +#define N_MAGIC(exec) ((exec).a_magic) +#endif + +#ifndef OMAGIC +/* Code indicating object file or impure executable. */ +#define OMAGIC 0407 +/* Code indicating pure executable. */ +#define NMAGIC 0410 +/* Code indicating demand-paged executable. */ +#define ZMAGIC 0413 +#endif /* not OMAGIC */ + +#ifndef N_BADMAG +#define N_BADMAG(x) \ + (N_MAGIC(x) != OMAGIC && N_MAGIC(x) != NMAGIC \ + && N_MAGIC(x) != ZMAGIC) +#endif + +#define _N_BADMAG(x) \ + (N_MAGIC(x) != OMAGIC && N_MAGIC(x) != NMAGIC \ + && N_MAGIC(x) != ZMAGIC) + +#define _N_HDROFF(x) (SEGMENT_SIZE - sizeof (struct exec)) + +#ifndef N_TXTOFF +#define N_TXTOFF(x) \ + (N_MAGIC(x) == ZMAGIC ? _N_HDROFF((x)) + sizeof (struct exec) : sizeof (struct exec)) +#endif + +#ifndef N_DATOFF +#define N_DATOFF(x) (N_TXTOFF(x) + (x).a_text) +#endif + +#ifndef N_TRELOFF +#define N_TRELOFF(x) (N_DATOFF(x) + (x).a_data) +#endif + +#ifndef N_DRELOFF +#define N_DRELOFF(x) (N_TRELOFF(x) + (x).a_trsize) +#endif + +#ifndef N_SYMOFF +#define N_SYMOFF(x) (N_DRELOFF(x) + (x).a_drsize) +#endif + +#ifndef N_STROFF +#define N_STROFF(x) (N_SYMOFF(x) + (x).a_syms) +#endif + +/* Address of text segment in memory after it is loaded. */ +#ifndef N_TXTADDR +#define N_TXTADDR(x) 0 +#endif + +/* Address of data segment in memory after it is loaded. + Note that it is up to you to define SEGMENT_SIZE + on machines not listed here. */ +#if defined(vax) || defined(hp300) || defined(pyr) +#define SEGMENT_SIZE PAGE_SIZE +#endif +#ifdef hp300 +#define PAGE_SIZE 4096 +#endif +#ifdef sony +#define SEGMENT_SIZE 0x2000 +#endif /* Sony. */ +#ifdef is68k +#define SEGMENT_SIZE 0x20000 +#endif +#if defined(m68k) && defined(PORTAR) +#define PAGE_SIZE 0x400 +#define SEGMENT_SIZE PAGE_SIZE +#endif + +#define PAGE_SIZE 4096 +#define SEGMENT_SIZE 1024 + +#define _N_SEGMENT_ROUND(x) (((x) + SEGMENT_SIZE - 1) & ~(SEGMENT_SIZE - 1)) + +#define _N_TXTENDADDR(x) (N_TXTADDR(x)+(x).a_text) + +#ifndef N_DATADDR +#define N_DATADDR(x) \ + (N_MAGIC(x)==OMAGIC? (_N_TXTENDADDR(x)) \ + : (_N_SEGMENT_ROUND (_N_TXTENDADDR(x)))) +#endif + +/* Address of bss segment in memory after it is loaded. */ +#ifndef N_BSSADDR +#define N_BSSADDR(x) (N_DATADDR(x) + (x).a_data) +#endif + +#ifndef N_NLIST_DECLARED +struct nlist { + union { + char *n_name; + struct nlist *n_next; + long n_strx; + } n_un; + unsigned char n_type; + char n_other; + short n_desc; + unsigned long n_value; +}; +#endif + +#ifndef N_UNDF +#define N_UNDF 0 +#endif +#ifndef N_ABS +#define N_ABS 2 +#endif +#ifndef N_TEXT +#define N_TEXT 4 +#endif +#ifndef N_DATA +#define N_DATA 6 +#endif +#ifndef N_BSS +#define N_BSS 8 +#endif +#ifndef N_COMM +#define N_COMM 18 +#endif +#ifndef N_FN +#define N_FN 15 +#endif + +#ifndef N_EXT +#define N_EXT 1 +#endif +#ifndef N_TYPE +#define N_TYPE 036 +#endif +#ifndef N_STAB +#define N_STAB 0340 +#endif + +/* The following type indicates the definition of a symbol as being + an indirect reference to another symbol. The other symbol + appears as an undefined reference, immediately following this symbol. + + Indirection is asymmetrical. The other symbol's value will be used + to satisfy requests for the indirect symbol, but not vice versa. + If the other symbol does not have a definition, libraries will + be searched to find a definition. */ +#define N_INDR 0xa + +/* The following symbols refer to set elements. + All the N_SET[ATDB] symbols with the same name form one set. + Space is allocated for the set in the text section, and each set + element's value is stored into one word of the space. + The first word of the space is the length of the set (number of elements). + + The address of the set is made into an N_SETV symbol + whose name is the same as the name of the set. + This symbol acts like a N_DATA global symbol + in that it can satisfy undefined external references. */ + +/* These appear as input to LD, in a .o file. */ +#define N_SETA 0x14 /* Absolute set element symbol */ +#define N_SETT 0x16 /* Text set element symbol */ +#define N_SETD 0x18 /* Data set element symbol */ +#define N_SETB 0x1A /* Bss set element symbol */ + +/* This is output from LD. */ +#define N_SETV 0x1C /* Pointer to set vector in data area. */ + +#ifndef N_RELOCATION_INFO_DECLARED + +/* This structure describes a single relocation to be performed. + The text-relocation section of the file is a vector of these structures, + all of which apply to the text section. + Likewise, the data-relocation section applies to the data section. */ + +struct relocation_info +{ + /* Address (within segment) to be relocated. */ + int r_address; + /* The meaning of r_symbolnum depends on r_extern. */ + unsigned int r_symbolnum:24; + /* Nonzero means value is a pc-relative offset + and it should be relocated for changes in its own address + as well as for changes in the symbol or section specified. */ + unsigned int r_pcrel:1; + /* Length (as exponent of 2) of the field to be relocated. + Thus, a value of 2 indicates 1<<2 bytes. */ + unsigned int r_length:2; + /* 1 => relocate with value of symbol. + r_symbolnum is the index of the symbol + in file's the symbol table. + 0 => relocate with the address of a segment. + r_symbolnum is N_TEXT, N_DATA, N_BSS or N_ABS + (the N_EXT bit may be set also, but signifies nothing). */ + unsigned int r_extern:1; + /* Four bits that aren't used, but when writing an object file + it is desirable to clear them. */ + unsigned int r_pad:4; +}; +#endif /* no N_RELOCATION_INFO_DECLARED. */ + + +#endif /* __A_OUT_GNU_H__ */ diff --git a/linux-0.11-lab/newlibc/include/ansidecl.h b/linux-0.11-lab/newlibc/include/ansidecl.h new file mode 100644 index 0000000..c351653 --- /dev/null +++ b/linux-0.11-lab/newlibc/include/ansidecl.h @@ -0,0 +1,108 @@ +/* Copyright (C) 1991 Free Software Foundation, Inc. +This file is part of the GNU C Library. + +The GNU C Library is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 1, or (at your option) +any later version. + +The GNU C Library is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with the GNU C Library; see the file COPYING. If not, write to +the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ + +/* ANSI and traditional C compatibility macros + + ANSI C is assumed if __STDC__ is #defined. + + Macro ANSI C definition Traditional C definition + ----- ---- - ---------- ----------- - ---------- + PTR `void *' `char *' + LONG_DOUBLE `long double' `double' + CONST `const' `' + VOLATILE `volatile' `' + SIGNED `signed' `' + PTRCONST `void *const' `char *' + + DEFUN(name, arglist, args) + + Defines function NAME. + + ARGLIST lists the arguments, separated by commas and enclosed in + parentheses. ARGLIST becomes the argument list in traditional C. + + ARGS list the arguments with their types. It becomes a prototype in + ANSI C, and the type declarations in traditional C. Arguments should + be separated with `AND'. For functions with a variable number of + arguments, the last thing listed should be `DOTS'. + + DEFUN_VOID(name) + + Defines a function NAME, which takes no arguments. + + EXFUN(name, prototype) + + Is used in an external function declaration. + In ANSI C it is `NAMEPROTOTYPE' (so PROTOTYPE should be enclosed in + parentheses). In traditional C it is `NAME()'. + For a function that takes no arguments, PROTOTYPE should be `(NOARGS)'. + + For example: + extern int EXFUN(printf, (CONST char *format DOTS)); + int DEFUN(fprintf, (stream, format), + FILE *stream AND CONST char *format DOTS) { ... } + void DEFUN_VOID(abort) { ... } +*/ + +#ifndef _ANSIDECL_H + +#define _ANSIDECL_H 1 + + +/* Every source file includes this file, + so they will all get the switch for lint. */ +/* LINTLIBRARY */ + + +#ifdef __STDC__ + +#define PTR void * +#define PTRCONST void *CONST +#define LONG_DOUBLE long double + +#define AND , +#define NOARGS void +#define CONST const +#define VOLATILE volatile +#define SIGNED signed +#define DOTS , ... + +#define EXFUN(name, proto) name proto +#define DEFUN(name, arglist, args) name(args) +#define DEFUN_VOID(name) name(NOARGS) + +#else /* Not ANSI C. */ + +#define PTR char * +#define PTRCONST PTR +#define LONG_DOUBLE double + +#define AND ; +#define NOARGS +#define CONST +#define VOLATILE +#define SIGNED +#define DOTS + +#define EXFUN(name, proto) name() +#define DEFUN(name, arglist, args) name arglist args; +#define DEFUN_VOID(name) name() + +#endif /* ANSI C. */ + + +#endif /* ansidecl.h */ diff --git a/linux-0.11-lab/newlibc/include/ar.h b/linux-0.11-lab/newlibc/include/ar.h new file mode 100644 index 0000000..99fac5a --- /dev/null +++ b/linux-0.11-lab/newlibc/include/ar.h @@ -0,0 +1,20 @@ +/* Typed in by Richard */ +/* minor changes for linux */ +#ifndef _AR_H +#define _AR_H + +#define ARMAG "!\n" +#define SARMAG 8 +#define ARFMAG "`\n" + +struct ar_hdr { + char ar_name[16], + ar_date[12], + ar_uid[6], + ar_gid[6], + ar_mode[8], + ar_size[10], + ar_fmag[2]; +}; + +#endif /* _AR_H */ diff --git a/linux-0.11-lab/newlibc/include/asm/io.h b/linux-0.11-lab/newlibc/include/asm/io.h new file mode 100644 index 0000000..d5cc42a --- /dev/null +++ b/linux-0.11-lab/newlibc/include/asm/io.h @@ -0,0 +1,24 @@ +#define outb(value,port) \ +__asm__ ("outb %%al,%%dx"::"a" (value),"d" (port)) + + +#define inb(port) ({ \ +unsigned char _v; \ +__asm__ volatile ("inb %%dx,%%al":"=a" (_v):"d" (port)); \ +_v; \ +}) + +#define outb_p(value,port) \ +__asm__ ("outb %%al,%%dx\n" \ + "\tjmp 1f\n" \ + "1:\tjmp 1f\n" \ + "1:"::"a" (value),"d" (port)) + +#define inb_p(port) ({ \ +unsigned char _v; \ +__asm__ volatile ("inb %%dx,%%al\n" \ + "\tjmp 1f\n" \ + "1:\tjmp 1f\n" \ + "1:":"=a" (_v):"d" (port)); \ +_v; \ +}) diff --git a/linux-0.11-lab/newlibc/include/asm/memory.h b/linux-0.11-lab/newlibc/include/asm/memory.h new file mode 100644 index 0000000..4b0a98e --- /dev/null +++ b/linux-0.11-lab/newlibc/include/asm/memory.h @@ -0,0 +1,14 @@ +/* + * NOTE!!! memcpy(dest,src,n) assumes ds=es=normal data segment. This + * goes for all kernel functions (ds=es=kernel space, fs=local data, + * gs=null), as well as for all well-behaving user programs (ds=es= + * user data space). This is NOT a bug, as any user program that changes + * es deserves to die if it isn't careful. + */ +#define memcpy(dest,src,n) ({ \ +void * _res = dest; \ +__asm__ ("cld;rep;movsb" \ + ::"D" ((long)(_res)),"S" ((long)(src)),"c" ((long) (n)) \ + :"di","si","cx"); \ +_res; \ +}) diff --git a/linux-0.11-lab/newlibc/include/asm/segment.h b/linux-0.11-lab/newlibc/include/asm/segment.h new file mode 100644 index 0000000..c03657f --- /dev/null +++ b/linux-0.11-lab/newlibc/include/asm/segment.h @@ -0,0 +1,65 @@ +extern inline unsigned char get_fs_byte(const char * addr) +{ + unsigned register char _v; + + __asm__ ("movb %%fs:%1,%0":"=r" (_v):"m" (*addr)); + return _v; +} + +extern inline unsigned short get_fs_word(const unsigned short *addr) +{ + unsigned short _v; + + __asm__ ("movw %%fs:%1,%0":"=r" (_v):"m" (*addr)); + return _v; +} + +extern inline unsigned long get_fs_long(const unsigned long *addr) +{ + unsigned long _v; + + __asm__ ("movl %%fs:%1,%0":"=r" (_v):"m" (*addr)); \ + return _v; +} + +extern inline void put_fs_byte(char val,char *addr) +{ +__asm__ ("movb %0,%%fs:%1"::"r" (val),"m" (*addr)); +} + +extern inline void put_fs_word(short val,short * addr) +{ +__asm__ ("movw %0,%%fs:%1"::"r" (val),"m" (*addr)); +} + +extern inline void put_fs_long(unsigned long val,unsigned long * addr) +{ +__asm__ ("movl %0,%%fs:%1"::"r" (val),"m" (*addr)); +} + +/* + * Someone who knows GNU asm better than I should double check the followig. + * It seems to work, but I don't know if I'm doing something subtly wrong. + * --- TYT, 11/24/91 + * [ nothing wrong here, Linus ] + */ + +extern inline unsigned long get_fs() +{ + unsigned short _v; + __asm__("mov %%fs,%%ax":"=a" (_v):); + return _v; +} + +extern inline unsigned long get_ds() +{ + unsigned short _v; + __asm__("mov %%ds,%%ax":"=a" (_v):); + return _v; +} + +extern inline void set_fs(unsigned long val) +{ + __asm__("mov %0,%%fs"::"a" ((unsigned short) val)); +} + diff --git a/linux-0.11-lab/newlibc/include/asm/system.h b/linux-0.11-lab/newlibc/include/asm/system.h new file mode 100644 index 0000000..0b5a21d --- /dev/null +++ b/linux-0.11-lab/newlibc/include/asm/system.h @@ -0,0 +1,66 @@ +#define move_to_user_mode() \ +__asm__ ("movl %%esp,%%eax\n\t" \ + "pushl $0x17\n\t" \ + "pushl %%eax\n\t" \ + "pushfl\n\t" \ + "pushl $0x0f\n\t" \ + "pushl $1f\n\t" \ + "iret\n" \ + "1:\tmovl $0x17,%%eax\n\t" \ + "movw %%ax,%%ds\n\t" \ + "movw %%ax,%%es\n\t" \ + "movw %%ax,%%fs\n\t" \ + "movw %%ax,%%gs" \ + :::"ax") + +#define sti() __asm__ ("sti"::) +#define cli() __asm__ ("cli"::) +#define nop() __asm__ ("nop"::) + +#define iret() __asm__ ("iret"::) + +#define _set_gate(gate_addr,type,dpl,addr) \ +__asm__ ("movw %%dx,%%ax\n\t" \ + "movw %0,%%dx\n\t" \ + "movl %%eax,%1\n\t" \ + "movl %%edx,%2" \ + : \ + : "i" ((short) (0x8000+(dpl<<13)+(type<<8))), \ + "o" (*((char *) (gate_addr))), \ + "o" (*(4+(char *) (gate_addr))), \ + "d" ((char *) (addr)),"a" (0x00080000)) + +#define set_intr_gate(n,addr) \ + _set_gate(&idt[n],14,0,addr) + +#define set_trap_gate(n,addr) \ + _set_gate(&idt[n],15,0,addr) + +#define set_system_gate(n,addr) \ + _set_gate(&idt[n],15,3,addr) + +#define _set_seg_desc(gate_addr,type,dpl,base,limit) {\ + *(gate_addr) = ((base) & 0xff000000) | \ + (((base) & 0x00ff0000)>>16) | \ + ((limit) & 0xf0000) | \ + ((dpl)<<13) | \ + (0x00408000) | \ + ((type)<<8); \ + *((gate_addr)+1) = (((base) & 0x0000ffff)<<16) | \ + ((limit) & 0x0ffff); } + +#define _set_tssldt_desc(n,addr,type) \ +__asm__ ("movw $104,%1\n\t" \ + "movw %%ax,%2\n\t" \ + "rorl $16,%%eax\n\t" \ + "movb %%al,%3\n\t" \ + "movb $" type ",%4\n\t" \ + "movb $0x00,%5\n\t" \ + "movb %%ah,%6\n\t" \ + "rorl $16,%%eax" \ + ::"a" (addr), "m" (*(n)), "m" (*(n+2)), "m" (*(n+4)), \ + "m" (*(n+5)), "m" (*(n+6)), "m" (*(n+7)) \ + ) + +#define set_tss_desc(n,addr) _set_tssldt_desc(((char *) (n)),addr,"0x89") +#define set_ldt_desc(n,addr) _set_tssldt_desc(((char *) (n)),addr,"0x82") diff --git a/linux-0.11-lab/newlibc/include/assert.h b/linux-0.11-lab/newlibc/include/assert.h new file mode 100644 index 0000000..26b5d13 --- /dev/null +++ b/linux-0.11-lab/newlibc/include/assert.h @@ -0,0 +1,34 @@ +/* Allow this file to be included multiple times + with different settings of NDEBUG. */ +#undef assert +#undef __assert + +#ifdef NDEBUG +#define assert(ignore) ((void)0) +#else + +void __eprintf (); /* Defined in gnulib */ + +#ifdef __STDC__ + +#define assert(expression) \ + ((expression) ? 0 : (__assert (#expression, __FILE__, __LINE__), 0)) + +#define __assert(expression, file, line) \ + (__eprintf ("Failed assertion `%s' at line %d of `%s'.\n", \ + expression, line, file), \ + abort ()) + +#else /* no __STDC__; i.e. -traditional. */ + +#define assert(expression) \ + ((expression) ? 0 : __assert (expression, __FILE__, __LINE__)) + +#define __assert(expression, file, lineno) \ + (__eprintf ("Failed assertion `%s' at line %d of `%s'.\n", \ + "expression", lineno, file), \ + abort ()) + +#endif /* no __STDC__; i.e. -traditional. */ + +#endif diff --git a/linux-0.11-lab/newlibc/include/blocksize.h b/linux-0.11-lab/newlibc/include/blocksize.h new file mode 100644 index 0000000..a93c31d --- /dev/null +++ b/linux-0.11-lab/newlibc/include/blocksize.h @@ -0,0 +1,6 @@ +#ifndef _BLOCK_SIZE_H +#define _BLOCK_SIZE_H + +#define BLOCK_SIZE 1024 /* file system data block size */ + +#endif /* _BLOCK_SIZE_H */ diff --git a/linux-0.11-lab/newlibc/include/const.h b/linux-0.11-lab/newlibc/include/const.h new file mode 100644 index 0000000..0f0b88f --- /dev/null +++ b/linux-0.11-lab/newlibc/include/const.h @@ -0,0 +1,16 @@ +#ifndef _CONST_H + +#define _CONST_H + +#define BUFFER_END 0x200000 + +#define I_TYPE 0170000 +#define I_DIRECTORY 0040000 +#define I_REGULAR 0100000 +#define I_BLOCK_SPECIAL 0060000 +#define I_CHAR_SPECIAL 0020000 +#define I_NAMED_PIPE 0010000 +#define I_SET_UID_BIT 0004000 +#define I_SET_GID_BIT 0002000 + +#endif diff --git a/linux-0.11-lab/newlibc/include/ctype.h b/linux-0.11-lab/newlibc/include/ctype.h new file mode 100644 index 0000000..7acf55d --- /dev/null +++ b/linux-0.11-lab/newlibc/include/ctype.h @@ -0,0 +1,34 @@ +#ifndef _CTYPE_H +#define _CTYPE_H + +#define _U 0x01 /* upper */ +#define _L 0x02 /* lower */ +#define _D 0x04 /* digit */ +#define _C 0x08 /* cntrl */ +#define _P 0x10 /* punct */ +#define _S 0x20 /* white space (space/lf/tab) */ +#define _X 0x40 /* hex digit */ +#define _SP 0x80 /* hard space (0x20) */ + +extern unsigned char _ctype[]; +extern char _ctmp; + +#define isalnum(c) ((_ctype+1)[c]&(_U|_L|_D)) +#define isalpha(c) ((_ctype+1)[c]&(_U|_L)) +#define iscntrl(c) ((_ctype+1)[c]&(_C)) +#define isdigit(c) ((_ctype+1)[c]&(_D)) +#define isgraph(c) ((_ctype+1)[c]&(_P|_U|_L|_D)) +#define islower(c) ((_ctype+1)[c]&(_L)) +#define isprint(c) ((_ctype+1)[c]&(_P|_U|_L|_D|_SP)) +#define ispunct(c) ((_ctype+1)[c]&(_P)) +#define isspace(c) ((_ctype+1)[c]&(_S)) +#define isupper(c) ((_ctype+1)[c]&(_U)) +#define isxdigit(c) ((_ctype+1)[c]&(_D|_X)) + +#define isascii(c) (((unsigned) c)<=0x7f) +#define toascii(c) (((unsigned) c)&0x7f) + +#define tolower(c) (_ctmp=c,isupper(_ctmp)?_ctmp-('A'-'a'):_ctmp) +#define toupper(c) (_ctmp=c,islower(_ctmp)?_ctmp-('a'-'A'):_ctmp) + +#endif diff --git a/linux-0.11-lab/newlibc/include/dirent.h b/linux-0.11-lab/newlibc/include/dirent.h new file mode 100644 index 0000000..fb916d7 --- /dev/null +++ b/linux-0.11-lab/newlibc/include/dirent.h @@ -0,0 +1,33 @@ +/* + -- definitions for SVR3 directory access routines + + last edit: 25-Apr-1987 D A Gwyn + + Prerequisite: +*/ + +/* NOTE! The actual routines by D A Gwyn aren't used in linux - I though + * they were too complicated, so I wrote my own. I use the header files, + * though, as I didn't know what should be in them. + */ + +#include +#include + +#define DIRBUF 8192 /* buffer size for fs-indep. dirs */ + /* must in general be larger than the filesystem buffer size */ + +typedef struct + { + int dd_fd; /* file descriptor */ + int dd_loc; /* offset in block */ + int dd_size; /* amount of valid data */ + char *dd_buf; /* -> directory block */ + } DIR; /* stream data from opendir() */ + +extern DIR *opendir(); +extern struct dirent *readdir(); +extern off_t telldir(); +extern void seekdir(); +extern void rewinddir(); +extern int closedir(); diff --git a/linux-0.11-lab/newlibc/include/errno.h b/linux-0.11-lab/newlibc/include/errno.h new file mode 100644 index 0000000..c282f69 --- /dev/null +++ b/linux-0.11-lab/newlibc/include/errno.h @@ -0,0 +1,60 @@ +#ifndef _ERRNO_H +#define _ERRNO_H + +/* + * ok, as I hadn't got any other source of information about + * possible error numbers, I was forced to use the same numbers + * as minix. + * Hopefully these are posix or something. I wouldn't know (and posix + * isn't telling me - they want $$$ for their f***ing standard). + * + * We don't use the _SIGN cludge of minix, so kernel returns must + * see to the sign by themselves. + * + * NOTE! Remember to change strerror() if you change this file! + */ + +extern int errno; + +#define ERROR 99 +#define EPERM 1 +#define ENOENT 2 +#define ESRCH 3 +#define EINTR 4 +#define EIO 5 +#define ENXIO 6 +#define E2BIG 7 +#define ENOEXEC 8 +#define EBADF 9 +#define ECHILD 10 +#define EAGAIN 11 +#define ENOMEM 12 +#define EACCES 13 +#define EFAULT 14 +#define ENOTBLK 15 +#define EBUSY 16 +#define EEXIST 17 +#define EXDEV 18 +#define ENODEV 19 +#define ENOTDIR 20 +#define EISDIR 21 +#define EINVAL 22 +#define ENFILE 23 +#define EMFILE 24 +#define ENOTTY 25 +#define ETXTBSY 26 +#define EFBIG 27 +#define ENOSPC 28 +#define ESPIPE 29 +#define EROFS 30 +#define EMLINK 31 +#define EPIPE 32 +#define EDOM 33 +#define ERANGE 34 +#define EDEADLK 35 +#define ENAMETOOLONG 36 +#define ENOLCK 37 +#define ENOSYS 38 +#define ENOTEMPTY 39 + +#endif diff --git a/linux-0.11-lab/newlibc/include/fcntl.h b/linux-0.11-lab/newlibc/include/fcntl.h new file mode 100644 index 0000000..0eadd32 --- /dev/null +++ b/linux-0.11-lab/newlibc/include/fcntl.h @@ -0,0 +1,56 @@ +#ifndef _FCNTL_H +#define _FCNTL_H + +/* I don't think this should be included like this, but it's easier */ +#include + +/* open/fcntl - NOCTTY, NDELAY isn't implemented yet */ +#define O_ACCMODE 00003 +#define O_RDONLY 00 +#define O_WRONLY 01 +#define O_RDWR 02 +#define O_CREAT 00100 /* not fcntl */ +#define O_EXCL 00200 /* not fcntl */ +#define O_NOCTTY 00400 /* not fcntl */ +#define O_TRUNC 01000 /* not fcntl */ +#define O_APPEND 02000 +#define O_NONBLOCK 04000 /* not fcntl */ +#define O_NDELAY O_NONBLOCK + +/* Defines for fcntl-commands. Note that currently + * locking isn't supported, and other things aren't really + * tested. + */ +#define F_DUPFD 0 /* dup */ +#define F_GETFD 1 /* get f_flags */ +#define F_SETFD 2 /* set f_flags */ +#define F_GETFL 3 /* more flags (cloexec) */ +#define F_SETFL 4 +#define F_GETLK 5 /* not implemented */ +#define F_SETLK 6 +#define F_SETLKW 7 + +/* for F_[GET|SET]FL */ +#define FD_CLOEXEC 1 /* actually anything with low bit set goes */ + +/* Ok, these are locking features, and aren't implemented at any + * level. POSIX wants them. + */ +#define F_RDLCK 0 +#define F_WRLCK 1 +#define F_UNLCK 2 + +/* Once again - not implemented, but ... */ +struct flock { + short l_type; + short l_whence; + off_t l_start; + off_t l_len; + pid_t l_pid; +}; + +extern int creat(const char * filename,mode_t mode); +extern int fcntl(int fildes,int cmd, ...); +extern int open(const char * filename, int flags, ...); + +#endif diff --git a/linux-0.11-lab/newlibc/include/float.h b/linux-0.11-lab/newlibc/include/float.h new file mode 100644 index 0000000..4959d9f --- /dev/null +++ b/linux-0.11-lab/newlibc/include/float.h @@ -0,0 +1,25 @@ +/* float.h */ +/* Produced by hard-params version 4.1, CWI, Amsterdam */ + +#define FLT_RADIX 2 +#define FLT_MANT_DIG 24 +#define FLT_DIG 6 +#define FLT_ROUNDS 1 +#define FLT_EPSILON ((float)1.19209290e-07) +#define FLT_MIN_EXP (-125) +#define FLT_MIN ((float)1.17549435e-38) +#define FLT_MIN_10_EXP (-37) +#define FLT_MAX_EXP 128 +#define FLT_MAX ((float)3.40282347e+38) +#define FLT_MAX_10_EXP 38 + +#define DBL_MANT_DIG 53 +#define DBL_DIG 15 +#define DBL_EPSILON 2.2204460492503131e-16 +#define DBL_MIN_EXP (-1021) +#define DBL_MIN 2.2250738585072014e-308 +#define DBL_MIN_10_EXP (-307) +#define DBL_MAX_EXP 1024 +#define DBL_MAX 1.7976931348623157e+308 +#define DBL_MAX_10_EXP 308 + diff --git a/linux-0.11-lab/newlibc/include/getopt.h b/linux-0.11-lab/newlibc/include/getopt.h new file mode 100644 index 0000000..d3c2048 --- /dev/null +++ b/linux-0.11-lab/newlibc/include/getopt.h @@ -0,0 +1,11 @@ +#ifndef _GETOPT_H +#define _GETOPT_H + +extern int opterr; +extern int optind; +extern int optopt; +extern char *optarg; + +extern int getopt(int argc, char ** argv, char * opts); + +#endif /* _GETOPT_H */ diff --git a/linux-0.11-lab/newlibc/include/gnu-stabs.h b/linux-0.11-lab/newlibc/include/gnu-stabs.h new file mode 100644 index 0000000..e4e58f9 --- /dev/null +++ b/linux-0.11-lab/newlibc/include/gnu-stabs.h @@ -0,0 +1,83 @@ +/* Copyright (C) 1991 Free Software Foundation, Inc. +This file is part of the GNU C Library. + +The GNU C Library is free software; you can redistribute it and/or +modify it under the terms of the GNU Library General Public License as +published by the Free Software Foundation; either version 2 of the +License, or (at your option) any later version. + +The GNU C Library is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#ifndef __GNU_STABS_H + +#define __GNU_STABS_H 1 + +#ifdef __GNU_STAB__ + +/* Alias a function: + function_alias(creat, _creat, int, (file, mode), + DEFUN(creat, (file, mode), + CONST char *file AND int mode)) + Yes, this is very repetitive. Nothing you can do about it, so shut up. */ +#define function_alias(name, _name, type, args, defun) \ + symbol_alias(_name, name); + +/* Make references to ALIAS refer to SYMBOL. */ +#ifdef __STDC__ +#define symbol_alias(symbol, alias) \ + asm(".stabs \"" "_" #alias "\",11,0,0,0\n"\ + ".stabs \"" "_" #symbol "\",1,0,0,0") +#else +/* Your assembler better grok this right! */ +#define symbol_alias(symbol, alias) \ + asm(".stabs \"_/**/alias\",11,0,0,0\n.stabs \"_/**/symbol\",1,0,0,0") +#endif + +/* Issue a warning message from the linker whenever SYMBOL is referenced. */ +#ifdef __STDC__ +#define warn_references(symbol, msg) \ + asm(".stabs \"" msg "\",30,0,0,0\n" \ + ".stabs \"_" #symbol "\",1,0,0,0") +#else +#define warn_references(symbol, msg) \ + asm(".stabs msg,30,0,0,0\n.stabs \"_/**/symbol\",1,0,0,0") +#endif + +#ifdef __STDC__ +#define stub_warning(name) \ + warn_references(name, \ + "warning: " #name " is not implemented and will always fail") +#else +#define stub_warning(name) \ + warn_references(name, \ + "warning: name is not implemented and will always fail") +#endif + +#ifdef __STDC__ +#define text_set_element(set, symbol) \ + asm(".stabs \"_" #set "\",23,0,0,_" #symbol) +#define data_set_element(set, symbol) \ + asm(".stabs \"_" #set "\",25,0,0,_" #symbol) +#else +#define text_set_element(set, symbol) \ + asm(".stabs \"_/**/set\",23,0,0,_/**/symbol") +#define data_set_element(set, symbol) \ + asm(".stabs \"_/**/set\",25,0,0,_/**/symbol") +#endif + +#else /* No GNU stabs. */ + +#define function_alias(name, _name, type, args, defun) \ + type defun { return name args; } + +#endif /* GNU stabs. */ + +#endif /* gnu-stabs.h */ diff --git a/linux-0.11-lab/newlibc/include/grp.h b/linux-0.11-lab/newlibc/include/grp.h new file mode 100644 index 0000000..4830148 --- /dev/null +++ b/linux-0.11-lab/newlibc/include/grp.h @@ -0,0 +1,101 @@ +/* Copyright (C) 1991 Free Software Foundation, Inc. +This file is part of the GNU C Library. + +The GNU C Library is free software; you can redistribute it and/or +modify it under the terms of the GNU Library General Public License as +published by the Free Software Foundation; either version 2 of the +License, or (at your option) any later version. + +The GNU C Library is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +/* + * POSIX Standard: 9.2.1 Group Database Access + */ + +#ifndef _GRP_H + +#define _GRP_H 1 + +#include +#include + +#define __USE_SVID +#define __USE_BSD +#define __USE_GNU + +/* The group structure. */ +struct group + { + char *gr_name; /* Group name. */ + char *gr_passwd; /* Password. */ + gid_t gr_gid; /* Group ID. */ + char **gr_mem; /* Member list. */ + }; + + +#if defined(__USE_SVID) || defined(__USE_GNU) +#define __need_FILE +#include +#endif + +#ifdef __USE_GNU +/* Return a new stream open on the group file. */ +extern FILE *EXFUN(__grpopen, (NOARGS)); + +/* Read a group entry from STREAM, filling in G. + Return the `struct group' of G if successful, NULL on failure. */ +extern struct group *EXFUN(__grpread, (FILE *__stream, PTR __g)); + +/* Return a chunk of memory containing pre-initialized data for __grpread. */ +extern PTR EXFUN(__grpalloc, (NOARGS)); +#endif + + +#if defined(__USE_SVID) || defined(__USE_MISC) +/* Rewind the group-file stream. */ +extern void EXFUN(setgrent, (NOARGS)); + +/* Close the group-file stream. */ +extern void EXFUN(endgrent, (NOARGS)); + +/* Read an entry from the group-file stream, opening it if necessary. */ +extern struct group *EXFUN(getgrent, (NOARGS)); +#endif + +#ifdef __USE_SVID +/* Read a group entry from STREAM. */ +extern struct group *EXFUN(fgetgrent, (FILE *__stream)); +#endif + +/* Search for an entry with a matching group ID. */ +extern struct group *EXFUN(getgrgid, (gid_t __gid)); + +/* Search for an entry with a matching group name. */ +extern struct group *EXFUN(getgrnam, (CONST char *__name)); + + +#ifdef __USE_BSD + +#define __need_size_t +#include + +/* Set the group set for the current user to GROUPS (N of them). */ +extern int EXFUN(setgroups, (size_t __n, CONST gid_t *groups)); + +/* Initialize the group set for the current user + by reading the group database and using all groups + of which USER is a member. Also include GROUP. */ +extern int EXFUN(initgroups, (CONST char *user, gid_t group)); + +#endif /* Use BSD. */ + + +#endif /* grp.h */ diff --git a/linux-0.11-lab/newlibc/include/limits.h b/linux-0.11-lab/newlibc/include/limits.h new file mode 100644 index 0000000..a486d7b --- /dev/null +++ b/linux-0.11-lab/newlibc/include/limits.h @@ -0,0 +1,59 @@ +#ifndef _LIMITS_H +#define _LIMITS_H + +#define RAND_MAX 0x7ffffffd /* don't ask - see rand.c */ + +#define CHAR_BIT 8 +#define MB_LEN_MAX 1 + +#define SCHAR_MIN (-128) +#define SCHAR_MAX 127 + +#define UCHAR_MAX 255U + +#ifdef __CHAR_UNSIGNED__ +#define CHAR_MIN 0 +#define CHAR_MAX UCHAR_MAX +#else +#define CHAR_MIN SCHAR_MIN +#define CHAR_MAX SCHAR_MAX +#endif + +#define SHRT_MIN (-32768) +#define SHRT_MAX 32767 + +#define USHRT_MAX 65535U + +#define INT_MIN (-2147483648) +#define INT_MAX 2147483647 + +#define UINT_MAX 4294967295U + +#define LONG_MIN (-2147483648) +#define LONG_MAX 2147483647 + +#define ULONG_MAX 4294967295U + +#define _POSIX_ARG_MAX 40960 /* exec() may have 40K worth of args */ +#define _POSIX_CHILD_MAX 6 /* a process may have 6 children */ +#define _POSIX_LINK_MAX 8 /* a file may have 8 links */ +#define _POSIX_MAX_CANON 255 /* size of the canonical input queue */ +#define _POSIX_MAX_INPUT 255 /* you can type 255 chars ahead */ +#define _POSIX_NAME_MAX 14 /* a file name may have 14 chars */ +#define _POSIX_NGROUPS_MAX 0 /* supplementary group IDs are optional */ +#define _POSIX_OPEN_MAX 16 /* a process may have 16 files open */ +#define _POSIX_PATH_MAX 255 /* a pathname may contain 255 chars */ +#define _POSIX_PIPE_BUF 512 /* pipes writes of 512 bytes must be atomic */ + +#define NGROUPS_MAX 0 /* supplemental group IDs not available */ +#define ARG_MAX 40960 /* # bytes of args + environ for exec() */ +#define CHILD_MAX 999 /* no limit :-) */ +#define OPEN_MAX 20 /* # open files a process may have */ +#define LINK_MAX 127 /* # links a file may have */ +#define MAX_CANON 255 /* size of the canonical input queue */ +#define MAX_INPUT 255 /* size of the type-ahead buffer */ +#define NAME_MAX 14 /* # chars in a file name */ +#define PATH_MAX 1024 /* # chars in a path name */ +#define PIPE_BUF 4095 /* # bytes in atomic write to a pipe */ + +#endif diff --git a/linux-0.11-lab/newlibc/include/linux/config.h b/linux-0.11-lab/newlibc/include/linux/config.h new file mode 100644 index 0000000..b706122 --- /dev/null +++ b/linux-0.11-lab/newlibc/include/linux/config.h @@ -0,0 +1,48 @@ +#ifndef _CONFIG_H +#define _CONFIG_H + +/* + * The root-device is no longer hard-coded. You can change the default + * root-device by changing the line ROOT_DEV = XXX in boot/bootsect.s + */ + +/* + * define your keyboard here - + * KBD_FINNISH for Finnish keyboards + * KBD_US for US-type + * KBD_GR for German keyboards + * KBD_FR for Frech keyboard + */ +/*#define KBD_US */ +/*#define KBD_GR */ +/*#define KBD_FR */ +#define KBD_FINNISH + +/* + * Normally, Linux can get the drive parameters from the BIOS at + * startup, but if this for some unfathomable reason fails, you'd + * be left stranded. For this case, you can define HD_TYPE, which + * contains all necessary info on your harddisk. + * + * The HD_TYPE macro should look like this: + * + * #define HD_TYPE { head, sect, cyl, wpcom, lzone, ctl} + * + * In case of two harddisks, the info should be sepatated by + * commas: + * + * #define HD_TYPE { h,s,c,wpcom,lz,ctl },{ h,s,c,wpcom,lz,ctl } + */ +/* + This is an example, two drives, first is type 2, second is type 3: + +#define HD_TYPE { 4,17,615,300,615,8 }, { 6,17,615,300,615,0 } + + NOTE: ctl is 0 for all drives with heads<=8, and ctl=8 for drives + with more than 8 heads. + + If you want the BIOS to tell what kind of drive you have, just + leave HD_TYPE undefined. This is the normal thing to do. +*/ + +#endif diff --git a/linux-0.11-lab/newlibc/include/linux/fdreg.h b/linux-0.11-lab/newlibc/include/linux/fdreg.h new file mode 100644 index 0000000..01355af --- /dev/null +++ b/linux-0.11-lab/newlibc/include/linux/fdreg.h @@ -0,0 +1,71 @@ +/* + * This file contains some defines for the floppy disk controller. + * Various sources. Mostly "IBM Microcomputers: A Programmers + * Handbook", Sanches and Canton. + */ +#ifndef _FDREG_H +#define _FDREG_H + +extern int ticks_to_floppy_on(unsigned int nr); +extern void floppy_on(unsigned int nr); +extern void floppy_off(unsigned int nr); +extern void floppy_select(unsigned int nr); +extern void floppy_deselect(unsigned int nr); + +/* Fd controller regs. S&C, about page 340 */ +#define FD_STATUS 0x3f4 +#define FD_DATA 0x3f5 +#define FD_DOR 0x3f2 /* Digital Output Register */ +#define FD_DIR 0x3f7 /* Digital Input Register (read) */ +#define FD_DCR 0x3f7 /* Diskette Control Register (write)*/ + +/* Bits of main status register */ +#define STATUS_BUSYMASK 0x0F /* drive busy mask */ +#define STATUS_BUSY 0x10 /* FDC busy */ +#define STATUS_DMA 0x20 /* 0- DMA mode */ +#define STATUS_DIR 0x40 /* 0- cpu->fdc */ +#define STATUS_READY 0x80 /* Data reg ready */ + +/* Bits of FD_ST0 */ +#define ST0_DS 0x03 /* drive select mask */ +#define ST0_HA 0x04 /* Head (Address) */ +#define ST0_NR 0x08 /* Not Ready */ +#define ST0_ECE 0x10 /* Equipment chech error */ +#define ST0_SE 0x20 /* Seek end */ +#define ST0_INTR 0xC0 /* Interrupt code mask */ + +/* Bits of FD_ST1 */ +#define ST1_MAM 0x01 /* Missing Address Mark */ +#define ST1_WP 0x02 /* Write Protect */ +#define ST1_ND 0x04 /* No Data - unreadable */ +#define ST1_OR 0x10 /* OverRun */ +#define ST1_CRC 0x20 /* CRC error in data or addr */ +#define ST1_EOC 0x80 /* End Of Cylinder */ + +/* Bits of FD_ST2 */ +#define ST2_MAM 0x01 /* Missing Addess Mark (again) */ +#define ST2_BC 0x02 /* Bad Cylinder */ +#define ST2_SNS 0x04 /* Scan Not Satisfied */ +#define ST2_SEH 0x08 /* Scan Equal Hit */ +#define ST2_WC 0x10 /* Wrong Cylinder */ +#define ST2_CRC 0x20 /* CRC error in data field */ +#define ST2_CM 0x40 /* Control Mark = deleted */ + +/* Bits of FD_ST3 */ +#define ST3_HA 0x04 /* Head (Address) */ +#define ST3_TZ 0x10 /* Track Zero signal (1=track 0) */ +#define ST3_WP 0x40 /* Write Protect */ + +/* Values for FD_COMMAND */ +#define FD_RECALIBRATE 0x07 /* move to track 0 */ +#define FD_SEEK 0x0F /* seek track */ +#define FD_READ 0xE6 /* read with MT, MFM, SKip deleted */ +#define FD_WRITE 0xC5 /* write with MT, MFM */ +#define FD_SENSEI 0x08 /* Sense Interrupt Status */ +#define FD_SPECIFY 0x03 /* specify HUT etc */ + +/* DMA commands */ +#define DMA_READ 0x46 +#define DMA_WRITE 0x4A + +#endif diff --git a/linux-0.11-lab/newlibc/include/linux/fs.h b/linux-0.11-lab/newlibc/include/linux/fs.h new file mode 100644 index 0000000..7a90b10 --- /dev/null +++ b/linux-0.11-lab/newlibc/include/linux/fs.h @@ -0,0 +1,202 @@ +/* + * This file has definitions for some important file table + * structures etc. + */ + +#ifndef _FS_H +#define _FS_H + +#include + +/* devices are as follows: (same as minix, so we can use the minix + * file system. These are major numbers.) + * + * 0 - unused (nodev) + * 1 - /dev/mem + * 2 - /dev/fd + * 3 - /dev/hd + * 4 - /dev/ttyx + * 5 - /dev/tty + * 6 - /dev/lp + * 7 - unnamed pipes + */ + +#define IS_SEEKABLE(x) ((x)>=1 && (x)<=3) + +#define READ 0 +#define WRITE 1 +#define READA 2 /* read-ahead - don't pause */ +#define WRITEA 3 /* "write-ahead" - silly, but somewhat useful */ + +void buffer_init(long buffer_end); + +#define MAJOR(a) (((unsigned)(a))>>8) +#define MINOR(a) ((a)&0xff) + +#define NAME_LEN 14 +#define ROOT_INO 1 + +#define I_MAP_SLOTS 8 +#define Z_MAP_SLOTS 8 +#define SUPER_MAGIC 0x137F + +#define NR_OPEN 20 +#define NR_INODE 32 +#define NR_FILE 64 +#define NR_SUPER 8 +#define NR_HASH 307 +#define NR_BUFFERS nr_buffers +#define BLOCK_SIZE 1024 +#define BLOCK_SIZE_BITS 10 +#ifndef NULL +#define NULL ((void *) 0) +#endif + +#define INODES_PER_BLOCK ((BLOCK_SIZE)/(sizeof (struct d_inode))) +#define DIR_ENTRIES_PER_BLOCK ((BLOCK_SIZE)/(sizeof (struct dir_entry))) + +#define PIPE_HEAD(inode) ((inode).i_zone[0]) +#define PIPE_TAIL(inode) ((inode).i_zone[1]) +#define PIPE_SIZE(inode) ((PIPE_HEAD(inode)-PIPE_TAIL(inode))&(PAGE_SIZE-1)) +#define PIPE_EMPTY(inode) (PIPE_HEAD(inode)==PIPE_TAIL(inode)) +#define PIPE_FULL(inode) (PIPE_SIZE(inode)==(PAGE_SIZE-1)) +#define INC_PIPE(head) \ +__asm__("incl %0\n\tandl $4095,%0"::"m" (head)) + +typedef char buffer_block[BLOCK_SIZE]; + +struct buffer_head { + char * b_data; /* pointer to data block (1024 bytes) */ + unsigned long b_blocknr; /* block number */ + unsigned short b_dev; /* device (0 = free) */ + unsigned char b_uptodate; + unsigned char b_dirt; /* 0-clean,1-dirty */ + unsigned char b_count; /* users using this block */ + unsigned char b_lock; /* 0 - ok, 1 -locked */ + struct task_struct * b_wait; + struct buffer_head * b_prev; + struct buffer_head * b_next; + struct buffer_head * b_prev_free; + struct buffer_head * b_next_free; +}; + +struct d_inode { + unsigned short i_mode; + unsigned short i_uid; + unsigned long i_size; + unsigned long i_time; + unsigned char i_gid; + unsigned char i_nlinks; + unsigned short i_zone[9]; +}; + +struct m_inode { + unsigned short i_mode; + unsigned short i_uid; + unsigned long i_size; + unsigned long i_mtime; + unsigned char i_gid; + unsigned char i_nlinks; + unsigned short i_zone[9]; +/* these are in memory also */ + struct task_struct * i_wait; + unsigned long i_atime; + unsigned long i_ctime; + unsigned short i_dev; + unsigned short i_num; + unsigned short i_count; + unsigned char i_lock; + unsigned char i_dirt; + unsigned char i_pipe; + unsigned char i_mount; + unsigned char i_seek; + unsigned char i_update; +}; + +struct file { + unsigned short f_mode; + unsigned short f_flags; + unsigned short f_count; + struct m_inode * f_inode; + off_t f_pos; +}; + +struct super_block { + unsigned short s_ninodes; + unsigned short s_nzones; + unsigned short s_imap_blocks; + unsigned short s_zmap_blocks; + unsigned short s_firstdatazone; + unsigned short s_log_zone_size; + unsigned long s_max_size; + unsigned short s_magic; +/* These are only in memory */ + struct buffer_head * s_imap[8]; + struct buffer_head * s_zmap[8]; + unsigned short s_dev; + struct m_inode * s_isup; + struct m_inode * s_imount; + unsigned long s_time; + struct task_struct * s_wait; + unsigned char s_lock; + unsigned char s_rd_only; + unsigned char s_dirt; +}; + +struct d_super_block { + unsigned short s_ninodes; + unsigned short s_nzones; + unsigned short s_imap_blocks; + unsigned short s_zmap_blocks; + unsigned short s_firstdatazone; + unsigned short s_log_zone_size; + unsigned long s_max_size; + unsigned short s_magic; +}; + +struct dir_entry { + unsigned short inode; + char name[NAME_LEN]; +}; + +extern struct m_inode inode_table[NR_INODE]; +extern struct file file_table[NR_FILE]; +extern struct super_block super_block[NR_SUPER]; +extern struct buffer_head * start_buffer; +extern int nr_buffers; + +extern void check_disk_change(int dev); +extern int floppy_change(unsigned int nr); +extern int ticks_to_floppy_on(unsigned int dev); +extern void floppy_on(unsigned int dev); +extern void floppy_off(unsigned int dev); +extern void truncate(struct m_inode * inode); +extern void sync_inodes(void); +extern void wait_on(struct m_inode * inode); +extern int bmap(struct m_inode * inode,int block); +extern int create_block(struct m_inode * inode,int block); +extern struct m_inode * namei(const char * pathname); +extern int open_namei(const char * pathname, int flag, int mode, + struct m_inode ** res_inode); +extern void iput(struct m_inode * inode); +extern struct m_inode * iget(int dev,int nr); +extern struct m_inode * get_empty_inode(void); +extern struct m_inode * get_pipe_inode(void); +extern struct buffer_head * get_hash_table(int dev, int block); +extern struct buffer_head * getblk(int dev, int block); +extern void ll_rw_block(int rw, struct buffer_head * bh); +extern void brelse(struct buffer_head * buf); +extern struct buffer_head * bread(int dev,int block); +extern void bread_page(unsigned long addr,int dev,int b[4]); +extern struct buffer_head * breada(int dev,int block,...); +extern int new_block(int dev); +extern void free_block(int dev, int block); +extern struct m_inode * new_inode(int dev); +extern void free_inode(struct m_inode * inode); +extern int sync_dev(int dev); +extern struct super_block * get_super(int dev); +extern int ROOT_DEV; + +extern void mount_root(void); + +#endif diff --git a/linux-0.11-lab/newlibc/include/linux/hdreg.h b/linux-0.11-lab/newlibc/include/linux/hdreg.h new file mode 100644 index 0000000..e6c593f --- /dev/null +++ b/linux-0.11-lab/newlibc/include/linux/hdreg.h @@ -0,0 +1,65 @@ +/* + * This file contains some defines for the AT-hd-controller. + * Various sources. Check out some definitions (see comments with + * a ques). + */ +#ifndef _HDREG_H +#define _HDREG_H + +/* Hd controller regs. Ref: IBM AT Bios-listing */ +#define HD_DATA 0x1f0 /* _CTL when writing */ +#define HD_ERROR 0x1f1 /* see err-bits */ +#define HD_NSECTOR 0x1f2 /* nr of sectors to read/write */ +#define HD_SECTOR 0x1f3 /* starting sector */ +#define HD_LCYL 0x1f4 /* starting cylinder */ +#define HD_HCYL 0x1f5 /* high byte of starting cyl */ +#define HD_CURRENT 0x1f6 /* 101dhhhh , d=drive, hhhh=head */ +#define HD_STATUS 0x1f7 /* see status-bits */ +#define HD_PRECOMP HD_ERROR /* same io address, read=error, write=precomp */ +#define HD_COMMAND HD_STATUS /* same io address, read=status, write=cmd */ + +#define HD_CMD 0x3f6 + +/* Bits of HD_STATUS */ +#define ERR_STAT 0x01 +#define INDEX_STAT 0x02 +#define ECC_STAT 0x04 /* Corrected error */ +#define DRQ_STAT 0x08 +#define SEEK_STAT 0x10 +#define WRERR_STAT 0x20 +#define READY_STAT 0x40 +#define BUSY_STAT 0x80 + +/* Values for HD_COMMAND */ +#define WIN_RESTORE 0x10 +#define WIN_READ 0x20 +#define WIN_WRITE 0x30 +#define WIN_VERIFY 0x40 +#define WIN_FORMAT 0x50 +#define WIN_INIT 0x60 +#define WIN_SEEK 0x70 +#define WIN_DIAGNOSE 0x90 +#define WIN_SPECIFY 0x91 + +/* Bits for HD_ERROR */ +#define MARK_ERR 0x01 /* Bad address mark ? */ +#define TRK0_ERR 0x02 /* couldn't find track 0 */ +#define ABRT_ERR 0x04 /* ? */ +#define ID_ERR 0x10 /* ? */ +#define ECC_ERR 0x40 /* ? */ +#define BBD_ERR 0x80 /* ? */ + +struct partition { + unsigned char boot_ind; /* 0x80 - active (unused) */ + unsigned char head; /* ? */ + unsigned char sector; /* ? */ + unsigned char cyl; /* ? */ + unsigned char sys_ind; /* ? */ + unsigned char end_head; /* ? */ + unsigned char end_sector; /* ? */ + unsigned char end_cyl; /* ? */ + unsigned int start_sect; /* starting sector counting from 0 */ + unsigned int nr_sects; /* nr of sectors in partition */ +}; + +#endif diff --git a/linux-0.11-lab/newlibc/include/linux/head.h b/linux-0.11-lab/newlibc/include/linux/head.h new file mode 100644 index 0000000..db3dda2 --- /dev/null +++ b/linux-0.11-lab/newlibc/include/linux/head.h @@ -0,0 +1,20 @@ +#ifndef _HEAD_H +#define _HEAD_H + +typedef struct desc_struct { + unsigned long a,b; +} desc_table[256]; + +extern unsigned long pg_dir[1024]; +extern desc_table idt,gdt; + +#define GDT_NUL 0 +#define GDT_CODE 1 +#define GDT_DATA 2 +#define GDT_TMP 3 + +#define LDT_NUL 0 +#define LDT_CODE 1 +#define LDT_DATA 2 + +#endif diff --git a/linux-0.11-lab/newlibc/include/linux/kernel.h b/linux-0.11-lab/newlibc/include/linux/kernel.h new file mode 100644 index 0000000..cb40dd5 --- /dev/null +++ b/linux-0.11-lab/newlibc/include/linux/kernel.h @@ -0,0 +1,22 @@ +/* + * 'kernel.h' contains some often-used function prototypes etc + */ +void verify_area(void * addr,int count); +volatile void panic(const char * str); +int printf(const char * fmt, ...); +int printk(const char * fmt, ...); +int tty_write(unsigned ch,char * buf,int count); +void * malloc(unsigned int size); +void free_s(void * obj, int size); + +#define free(x) free_s((x), 0) + +/* + * This is defined as a macro, but at some point this might become a + * real subroutine that sets a flag if it returns true (to do + * BSD-style accounting where the process is flagged if it uses root + * privs). The implication of this is that you should do normal + * permissions checks first, and check suser() last. + */ +#define suser() (current->euid == 0) + diff --git a/linux-0.11-lab/newlibc/include/linux/mm.h b/linux-0.11-lab/newlibc/include/linux/mm.h new file mode 100644 index 0000000..5a160f3 --- /dev/null +++ b/linux-0.11-lab/newlibc/include/linux/mm.h @@ -0,0 +1,10 @@ +#ifndef _MM_H +#define _MM_H + +#define PAGE_SIZE 4096 + +extern unsigned long get_free_page(void); +extern unsigned long put_page(unsigned long page,unsigned long address); +extern void free_page(unsigned long addr); + +#endif diff --git a/linux-0.11-lab/newlibc/include/linux/sched.h b/linux-0.11-lab/newlibc/include/linux/sched.h new file mode 100644 index 0000000..3407bb9 --- /dev/null +++ b/linux-0.11-lab/newlibc/include/linux/sched.h @@ -0,0 +1,233 @@ +#ifndef _SCHED_H +#define _SCHED_H + +#define NR_TASKS 64 +#define HZ 100 + +#define FIRST_TASK task[0] +#define LAST_TASK task[NR_TASKS-1] + +#include +#include +#include +#include + +#if (NR_OPEN > 32) +#error "Currently the close-on-exec-flags are in one word, max 32 files/proc" +#endif + +#define TASK_RUNNING 0 +#define TASK_INTERRUPTIBLE 1 +#define TASK_UNINTERRUPTIBLE 2 +#define TASK_ZOMBIE 3 +#define TASK_STOPPED 4 + +#ifndef NULL +#define NULL ((void *) 0) +#endif + +extern int copy_page_tables(unsigned long from, unsigned long to, long size); +extern int free_page_tables(unsigned long from, unsigned long size); + +extern void sched_init(void); +extern void schedule(void); +extern void trap_init(void); +extern void panic(const char * str); +extern int tty_write(unsigned minor,char * buf,int count); + +typedef int (*fn_ptr)(); + +struct i387_struct { + long cwd; + long swd; + long twd; + long fip; + long fcs; + long foo; + long fos; + long st_space[20]; /* 8*10 bytes for each FP-reg = 80 bytes */ +}; + +struct tss_struct { + long back_link; /* 16 high bits zero */ + long esp0; + long ss0; /* 16 high bits zero */ + long esp1; + long ss1; /* 16 high bits zero */ + long esp2; + long ss2; /* 16 high bits zero */ + long cr3; + long eip; + long eflags; + long eax,ecx,edx,ebx; + long esp; + long ebp; + long esi; + long edi; + long es; /* 16 high bits zero */ + long cs; /* 16 high bits zero */ + long ss; /* 16 high bits zero */ + long ds; /* 16 high bits zero */ + long fs; /* 16 high bits zero */ + long gs; /* 16 high bits zero */ + long ldt; /* 16 high bits zero */ + long trace_bitmap; /* bits: trace 0, bitmap 16-31 */ + struct i387_struct i387; +}; + +struct task_struct { +/* these are hardcoded - don't touch */ + long state; /* -1 unrunnable, 0 runnable, >0 stopped */ + long counter; + long priority; + long signal; + struct sigaction sigaction[32]; + long blocked; /* bitmap of masked signals */ +/* various fields */ + int exit_code; + unsigned long start_code,end_code,end_data,brk,start_stack; + long pid,father,pgrp,session,leader; + unsigned short uid,euid,suid; + unsigned short gid,egid,sgid; + long alarm; + long utime,stime,cutime,cstime,start_time; + unsigned short used_math; +/* file system info */ + int tty; /* -1 if no tty, so it must be signed */ + unsigned short umask; + struct m_inode * pwd; + struct m_inode * root; + struct m_inode * executable; + unsigned long close_on_exec; + struct file * filp[NR_OPEN]; +/* ldt for this task 0 - zero 1 - cs 2 - ds&ss */ + struct desc_struct ldt[3]; +/* tss for this task */ + struct tss_struct tss; +}; + +/* + * INIT_TASK is used to set up the first task table, touch at + * your own risk!. Base=0, limit=0x9ffff (=640kB) + */ +#define INIT_TASK \ +/* state etc */ { 0,15,15, \ +/* signals */ 0,{{},},0, \ +/* ec,brk... */ 0,0,0,0,0,0, \ +/* pid etc.. */ 0,-1,0,0,0, \ +/* uid etc */ 0,0,0,0,0,0, \ +/* alarm */ 0,0,0,0,0,0, \ +/* math */ 0, \ +/* fs info */ -1,0022,NULL,NULL,NULL,0, \ +/* filp */ {NULL,}, \ + { \ + {0,0}, \ +/* ldt */ {0x9f,0xc0fa00}, \ + {0x9f,0xc0f200}, \ + }, \ +/*tss*/ {0,PAGE_SIZE+(long)&init_task,0x10,0,0,0,0,(long)&pg_dir,\ + 0,0,0,0,0,0,0,0, \ + 0,0,0x17,0x17,0x17,0x17,0x17,0x17, \ + _LDT(0),0x80000000, \ + {} \ + }, \ +} + +extern struct task_struct *task[NR_TASKS]; +extern struct task_struct *last_task_used_math; +extern struct task_struct *current; +extern long volatile jiffies; +extern long startup_time; + +#define CURRENT_TIME (startup_time+jiffies/HZ) + +extern void add_timer(long jiffies, void (*fn)(void)); +extern void sleep_on(struct task_struct ** p); +extern void interruptible_sleep_on(struct task_struct ** p); +extern void wake_up(struct task_struct ** p); + +/* + * Entry into gdt where to find first TSS. 0-nul, 1-cs, 2-ds, 3-syscall + * 4-TSS0, 5-LDT0, 6-TSS1 etc ... + */ +#define FIRST_TSS_ENTRY 4 +#define FIRST_LDT_ENTRY (FIRST_TSS_ENTRY+1) +#define _TSS(n) ((((unsigned long) n)<<4)+(FIRST_TSS_ENTRY<<3)) +#define _LDT(n) ((((unsigned long) n)<<4)+(FIRST_LDT_ENTRY<<3)) +#define ltr(n) __asm__("ltr %%ax"::"a" (_TSS(n))) +#define lldt(n) __asm__("lldt %%ax"::"a" (_LDT(n))) +#define str(n) \ +__asm__("str %%ax\n\t" \ + "subl %2,%%eax\n\t" \ + "shrl $4,%%eax" \ + :"=a" (n) \ + :"a" (0),"i" (FIRST_TSS_ENTRY<<3)) +/* + * switch_to(n) should switch tasks to task nr n, first + * checking that n isn't the current task, in which case it does nothing. + * This also clears the TS-flag if the task we switched to has used + * tha math co-processor latest. + */ +#define switch_to(n) {\ +struct {long a,b;} __tmp; \ +__asm__("cmpl %%ecx,_current\n\t" \ + "je 1f\n\t" \ + "movw %%dx,%1\n\t" \ + "xchgl %%ecx,_current\n\t" \ + "ljmp %0\n\t" \ + "cmpl %%ecx,_last_task_used_math\n\t" \ + "jne 1f\n\t" \ + "clts\n" \ + "1:" \ + ::"m" (*&__tmp.a),"m" (*&__tmp.b), \ + "d" (_TSS(n)),"c" ((long) task[n])); \ +} + +#define PAGE_ALIGN(n) (((n)+0xfff)&0xfffff000) + +#define _set_base(addr,base) \ +__asm__("movw %%dx,%0\n\t" \ + "rorl $16,%%edx\n\t" \ + "movb %%dl,%1\n\t" \ + "movb %%dh,%2" \ + ::"m" (*((addr)+2)), \ + "m" (*((addr)+4)), \ + "m" (*((addr)+7)), \ + "d" (base) \ + :"dx") + +#define _set_limit(addr,limit) \ +__asm__("movw %%dx,%0\n\t" \ + "rorl $16,%%edx\n\t" \ + "movb %1,%%dh\n\t" \ + "andb $0xf0,%%dh\n\t" \ + "orb %%dh,%%dl\n\t" \ + "movb %%dl,%1" \ + ::"m" (*(addr)), \ + "m" (*((addr)+6)), \ + "d" (limit) \ + :"dx") + +#define set_base(ldt,base) _set_base( ((char *)&(ldt)) , base ) +#define set_limit(ldt,limit) _set_limit( ((char *)&(ldt)) , (limit-1)>>12 ) + +#define _get_base(addr) ({\ +unsigned long __base; \ +__asm__("movb %3,%%dh\n\t" \ + "movb %2,%%dl\n\t" \ + "shll $16,%%edx\n\t" \ + "movw %1,%%dx" \ + :"=d" (__base) \ + :"m" (*((addr)+2)), \ + "m" (*((addr)+4)), \ + "m" (*((addr)+7))); \ +__base;}) + +#define get_base(ldt) _get_base( ((char *)&(ldt)) ) + +#define get_limit(segment) ({ \ +unsigned long __limit; \ +__asm__("lsll %1,%0\n\tincl %0":"=r" (__limit):"r" (segment)); \ +__limit;}) + +#endif diff --git a/linux-0.11-lab/newlibc/include/linux/sys.h b/linux-0.11-lab/newlibc/include/linux/sys.h new file mode 100644 index 0000000..c538fc1 --- /dev/null +++ b/linux-0.11-lab/newlibc/include/linux/sys.h @@ -0,0 +1,86 @@ +extern int sys_setup(); +extern int sys_exit(); +extern int sys_fork(); +extern int sys_read(); +extern int sys_write(); +extern int sys_open(); +extern int sys_close(); +extern int sys_waitpid(); +extern int sys_creat(); +extern int sys_link(); +extern int sys_unlink(); +extern int sys_execve(); +extern int sys_chdir(); +extern int sys_time(); +extern int sys_mknod(); +extern int sys_chmod(); +extern int sys_chown(); +extern int sys_break(); +extern int sys_stat(); +extern int sys_lseek(); +extern int sys_getpid(); +extern int sys_mount(); +extern int sys_umount(); +extern int sys_setuid(); +extern int sys_getuid(); +extern int sys_stime(); +extern int sys_ptrace(); +extern int sys_alarm(); +extern int sys_fstat(); +extern int sys_pause(); +extern int sys_utime(); +extern int sys_stty(); +extern int sys_gtty(); +extern int sys_access(); +extern int sys_nice(); +extern int sys_ftime(); +extern int sys_sync(); +extern int sys_kill(); +extern int sys_rename(); +extern int sys_mkdir(); +extern int sys_rmdir(); +extern int sys_dup(); +extern int sys_pipe(); +extern int sys_times(); +extern int sys_prof(); +extern int sys_brk(); +extern int sys_setgid(); +extern int sys_getgid(); +extern int sys_signal(); +extern int sys_geteuid(); +extern int sys_getegid(); +extern int sys_acct(); +extern int sys_phys(); +extern int sys_lock(); +extern int sys_ioctl(); +extern int sys_fcntl(); +extern int sys_mpx(); +extern int sys_setpgid(); +extern int sys_ulimit(); +extern int sys_uname(); +extern int sys_umask(); +extern int sys_chroot(); +extern int sys_ustat(); +extern int sys_dup2(); +extern int sys_getppid(); +extern int sys_getpgrp(); +extern int sys_setsid(); +extern int sys_sigaction(); +extern int sys_sgetmask(); +extern int sys_ssetmask(); +extern int sys_setreuid(); +extern int sys_setregid(); + +fn_ptr sys_call_table[] = { sys_setup, sys_exit, sys_fork, sys_read, +sys_write, sys_open, sys_close, sys_waitpid, sys_creat, sys_link, +sys_unlink, sys_execve, sys_chdir, sys_time, sys_mknod, sys_chmod, +sys_chown, sys_break, sys_stat, sys_lseek, sys_getpid, sys_mount, +sys_umount, sys_setuid, sys_getuid, sys_stime, sys_ptrace, sys_alarm, +sys_fstat, sys_pause, sys_utime, sys_stty, sys_gtty, sys_access, +sys_nice, sys_ftime, sys_sync, sys_kill, sys_rename, sys_mkdir, +sys_rmdir, sys_dup, sys_pipe, sys_times, sys_prof, sys_brk, sys_setgid, +sys_getgid, sys_signal, sys_geteuid, sys_getegid, sys_acct, sys_phys, +sys_lock, sys_ioctl, sys_fcntl, sys_mpx, sys_setpgid, sys_ulimit, +sys_uname, sys_umask, sys_chroot, sys_ustat, sys_dup2, sys_getppid, +sys_getpgrp, sys_setsid, sys_sigaction, sys_sgetmask, sys_ssetmask, +sys_setreuid,sys_setregid }; diff --git a/linux-0.11-lab/newlibc/include/linux/tty.h b/linux-0.11-lab/newlibc/include/linux/tty.h new file mode 100644 index 0000000..ad846b3 --- /dev/null +++ b/linux-0.11-lab/newlibc/include/linux/tty.h @@ -0,0 +1,77 @@ +/* + * 'tty.h' defines some structures used by tty_io.c and some defines. + * + * NOTE! Don't touch this without checking that nothing in rs_io.s or + * con_io.s breaks. Some constants are hardwired into the system (mainly + * offsets into 'tty_queue' + */ + +#ifndef _TTY_H +#define _TTY_H + +#include + +#define TTY_BUF_SIZE 1024 + +struct tty_queue { + unsigned long data; + unsigned long head; + unsigned long tail; + struct task_struct * proc_list; + char buf[TTY_BUF_SIZE]; +}; + +#define INC(a) ((a) = ((a)+1) & (TTY_BUF_SIZE-1)) +#define DEC(a) ((a) = ((a)-1) & (TTY_BUF_SIZE-1)) +#define EMPTY(a) ((a).head == (a).tail) +#define LEFT(a) (((a).tail-(a).head-1)&(TTY_BUF_SIZE-1)) +#define LAST(a) ((a).buf[(TTY_BUF_SIZE-1)&((a).head-1)]) +#define FULL(a) (!LEFT(a)) +#define CHARS(a) (((a).head-(a).tail)&(TTY_BUF_SIZE-1)) +#define GETCH(queue,c) \ +(void)({c=(queue).buf[(queue).tail];INC((queue).tail);}) +#define PUTCH(c,queue) \ +(void)({(queue).buf[(queue).head]=(c);INC((queue).head);}) + +#define INTR_CHAR(tty) ((tty)->termios.c_cc[VINTR]) +#define QUIT_CHAR(tty) ((tty)->termios.c_cc[VQUIT]) +#define ERASE_CHAR(tty) ((tty)->termios.c_cc[VERASE]) +#define KILL_CHAR(tty) ((tty)->termios.c_cc[VKILL]) +#define EOF_CHAR(tty) ((tty)->termios.c_cc[VEOF]) +#define START_CHAR(tty) ((tty)->termios.c_cc[VSTART]) +#define STOP_CHAR(tty) ((tty)->termios.c_cc[VSTOP]) +#define SUSPEND_CHAR(tty) ((tty)->termios.c_cc[VSUSP]) + +struct tty_struct { + struct termios termios; + int pgrp; + int stopped; + void (*write)(struct tty_struct * tty); + struct tty_queue read_q; + struct tty_queue write_q; + struct tty_queue secondary; + }; + +extern struct tty_struct tty_table[]; + +/* intr=^C quit=^| erase=del kill=^U + eof=^D vtime=\0 vmin=\1 sxtc=\0 + start=^Q stop=^S susp=^Z eol=\0 + reprint=^R discard=^U werase=^W lnext=^V + eol2=\0 +*/ +#define INIT_C_CC "\003\034\177\025\004\0\1\0\021\023\032\0\022\017\027\026\0" + +void rs_init(void); +void con_init(void); +void tty_init(void); + +int tty_read(unsigned c, char * buf, int n); +int tty_write(unsigned c, char * buf, int n); + +void rs_write(struct tty_struct * tty); +void con_write(struct tty_struct * tty); + +void copy_to_cooked(struct tty_struct * tty); + +#endif diff --git a/linux-0.11-lab/newlibc/include/localeinfo.h b/linux-0.11-lab/newlibc/include/localeinfo.h new file mode 100644 index 0000000..2dc0f4d --- /dev/null +++ b/linux-0.11-lab/newlibc/include/localeinfo.h @@ -0,0 +1,208 @@ +/* Copyright (C) 1991 Free Software Foundation, Inc. +This file is part of the GNU C Library. + +The GNU C Library is free software; you can redistribute it and/or +modify it under the terms of the GNU Library General Public License as +published by the Free Software Foundation; either version 2 of the +License, or (at your option) any later version. + +The GNU C Library is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +/* Locale-specific information. */ + +#ifndef _LOCALEINFO_H + +#define _LOCALEINFO_H 1 + +#define __need_size_t +#define __need_wchar_t +#include +#include + + +/* Change these if the `wchar_t' type is changed. */ +#define WCHAR_MAX ((wchar_t) UCHAR_MAX) + + +/* Used by multibyte char functions. */ +typedef struct + { + char *string; /* Bytes. */ + size_t len; /* # of bytes. */ + long int shift; /* # of mb_char's to shift. */ + } mb_char; + +struct ctype_mbchar_info + { + size_t mb_max; /* Max MB char length. */ + mb_char *mb_chars; /* MB chars. */ + }; + +struct ctype_ctype_info + { + unsigned short int *ctype_b; /* Characteristics. */ + unsigned char *ctype_tolower; /* Case mappings. */ + unsigned char *ctype_toupper; /* Case mappings. */ + }; + +struct ctype_info + { + struct ctype_ctype_info *ctype; + struct ctype_mbchar_info *mbchar; + }; + +extern CONST struct ctype_info *_ctype_info; + +/* These are necessary because they are used in a header file. */ +extern CONST unsigned short int *__ctype_b; +extern CONST unsigned char *__ctype_tolower; +extern CONST unsigned char *__ctype_toupper; + + +/* Used by strcoll and strxfrm. */ +typedef struct + { + unsigned char *values; + size_t nvalues; + } literal_value; + +typedef struct + { + union + { + literal_value literal; + /* %%% This may become a regex_t in the future. */ + char *regexp; + } replace, with; + unsigned int regexp:1; + } subst; + +struct collate_info + { + size_t nsubsts; + subst *substs; + + unsigned char *values; + unsigned char *offsets; + }; + +extern CONST struct collate_info *_collate_info; + + +/* Used by strtod, atof. */ +struct numeric_info + { + char *decimal_point; + char *thousands_sep; + char *grouping; + }; + +extern CONST struct numeric_info *_numeric_info; + + +/* Used in the return value of localeconv. */ +struct monetary_info + { + char *int_curr_symbol; + char *currency_symbol; + char *mon_decimal_point; + char *mon_thousands_sep; + char *mon_grouping; + char *positive_sign; + char *negative_sign; + char int_frac_digits; + char frac_digits; + char p_cs_precedes; + char p_sep_by_space; + char n_cs_precedes; + char n_sep_by_space; + char p_sign_posn; + char n_sign_posn; + }; + +extern CONST struct monetary_info *_monetary_info; + + +/* Used by strftime, asctime. */ +struct time_info + { + char *abbrev_wkday[7]; /* Short weekday names. */ + char *full_wkday[7]; /* Full weekday names. */ + char *abbrev_month[12]; /* Short month names. */ + char *full_month[12]; /* Full month names. */ + char *ampm[2]; /* "AM" and "PM" strings. */ + + char *date_time; /* Appropriate date and time format. */ + char *date; /* Appropriate date format. */ + char *time; /* Appropriate time format. */ + + char *ut0; /* Name for GMT. */ + char *tz; /* Default TZ value. */ + }; + +extern CONST struct time_info *_time_info; + +struct response_info + { + /* Regexp for affirmative answers. */ + char *yesexpr; + + /* Regexp for negative answers. */ + char *noexpr; + }; + +extern CONST struct response_info *_response_info; + +/* Locale structure. */ +typedef struct + { + char *name; + int categories; + + unsigned int allocated:1; + + int subcategories; + size_t num_sublocales; + struct sub_locale *sublocales; + + PTR *info; + } locale; + +typedef struct sub_locale + { + unsigned int pointer:1; + + int categories; + char *name; + + locale *locale; + } sublocale; + + +/* This is the magic number that localeinfo object files begin with. + In case you're wondering why I chose the value 0x051472CA, it's + because I was born on 05-14-72 in Oakland, CA. */ +#define LIMAGIC 0x051472CA +/* This is the magic number that precedes each category-specific section + of a localeinfo object file. It's the arbitrary magic number above, + but modified by the category so that it's different from the per-file + magic number and unique for each category. */ +#define CATEGORY_MAGIC(x) (LIMAGIC ^ (x)) + +extern CONST char *__lidir, *__lidefault; + +extern locale *EXFUN(__find_locale, (int categories, CONST char *name)); +extern locale *EXFUN(__new_locale, (locale *)); +extern locale *EXFUN(__localefile, (CONST char *file)); +extern void EXFUN(__free_locale, (locale *)); + + +#endif /* localeinfo.h */ diff --git a/linux-0.11-lab/newlibc/include/math.h b/linux-0.11-lab/newlibc/include/math.h new file mode 100644 index 0000000..c013bec --- /dev/null +++ b/linux-0.11-lab/newlibc/include/math.h @@ -0,0 +1,31 @@ +/* The header contains prototypes for mathematical functions. */ + +#ifndef _MATH_H +#define _MATH_H + +#define HUGE_VAL 9.9e+307 + +double acos(double x); +double asin(double x); +double atan(double x); +double atan2(double y, double x); +double ceil(double x); +double cos(double x); +double cosh(double x); +double exp(double x); +double fabs(double x); +double floor(double x); +double fmod(double x, double y); +double frexp(double x, int *exp); +double ldexp(double x, int exp); +double log(double x); +double log10(double x); +double modf(double x, double *iptr); +double pow(double x, double y); +double sin(double x); +double sinh(double x); +double sqrt(double x); +double tan(double x); +double tanh(double x); + +#endif /* _MATH_H */ diff --git a/linux-0.11-lab/newlibc/include/pwd.h b/linux-0.11-lab/newlibc/include/pwd.h new file mode 100644 index 0000000..4616f65 --- /dev/null +++ b/linux-0.11-lab/newlibc/include/pwd.h @@ -0,0 +1,89 @@ +/* Copyright (C) 1991 Free Software Foundation, Inc. +This file is part of the GNU C Library. + +The GNU C Library is free software; you can redistribute it and/or +modify it under the terms of the GNU Library General Public License as +published by the Free Software Foundation; either version 2 of the +License, or (at your option) any later version. + +The GNU C Library is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +/* + * POSIX Standard: 9.2.2 User Database Access + */ + +#ifndef _PWD_H +#define _PWD_H 1 + +#include +#include + +#define __USE_SVID +#define __USE_GNU + +/* The passwd structure. */ +struct passwd + { + char *pw_name; /* Username. */ + char *pw_passwd; /* Password. */ + uid_t pw_uid; /* User ID. */ + gid_t pw_gid; /* Group ID. */ + char *pw_gecos; /* Real name. */ + char *pw_dir; /* Home directory. */ + char *pw_shell; /* Shell program. */ + }; + + +#if defined(__USE_SVID) || defined(__USE_GNU) +#define __need_FILE +#include +#endif + +#ifdef __USE_GNU +/* Return a new stream open on the password file. */ +extern FILE *EXFUN(__pwdopen, (NOARGS)); + +/* Read a password entry from STREAM, filling in P. + Return the `struct passwd' of P if successful, NULL on failure. */ +extern struct passwd *EXFUN(__pwdread, (FILE *__stream, PTR __p)); + +/* Return a chunk of memory containing pre-initialized data for __pwdread. */ +extern PTR EXFUN(__pwdalloc, (NOARGS)); +#endif + + +#if defined(__USE_SVID) || defined(__USE_MISC) +/* Rewind the password-file stream. */ +extern void EXFUN(setpwent, (NOARGS)); + +/* Close the password-file stream. */ +extern void EXFUN(endpwent, (NOARGS)); + +/* Read an entry from the password-file stream, opening it if necessary. */ +extern struct passwd *EXFUN(getpwent, (NOARGS)); +#endif + +#ifdef __USE_SVID +/* Read an entry from STREAM. */ +extern struct passwd *EXFUN(fgetpwent, (FILE *__stream)); + +/* Write the given entry onto the given stream. */ +extern int EXFUN(putpwent, (CONST struct passwd *__p, FILE *__f)); +#endif + +/* Search for an entry with a matching user ID. */ +extern struct passwd *EXFUN(getpwuid, (uid_t __uid)); + +/* Search for an entry with a matching username. */ +extern struct passwd *EXFUN(getpwnam, (CONST char *__name)); + + +#endif /* pwd.h */ diff --git a/linux-0.11-lab/newlibc/include/regex.h b/linux-0.11-lab/newlibc/include/regex.h new file mode 100644 index 0000000..81f953a --- /dev/null +++ b/linux-0.11-lab/newlibc/include/regex.h @@ -0,0 +1,257 @@ +/* Definitions for data structures callers pass the regex library. + + Copyright (C) 1985, 1989-90 Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ + + +#ifdef __GNUC__ + #pragma once +#endif + +#ifndef __REGEXP_LIBRARY +#define __REGEXP_LIBRARY + +/* Define number of parens for which we record the beginnings and ends. + This affects how much space the `struct re_registers' type takes up. */ +#ifndef RE_NREGS +#define RE_NREGS 10 +#endif + +#define BYTEWIDTH 8 + + +/* Maximum number of duplicates an interval can allow. */ +#define RE_DUP_MAX ((1 << 15) - 1) + + +/* This defines the various regexp syntaxes. */ +extern int obscure_syntax; + + +/* The following bits are used in the obscure_syntax variable to choose among + alternative regexp syntaxes. */ + +/* If this bit is set, plain parentheses serve as grouping, and backslash + parentheses are needed for literal searching. + If not set, backslash-parentheses are grouping, and plain parentheses + are for literal searching. */ +#define RE_NO_BK_PARENS 1 + +/* If this bit is set, plain | serves as the `or'-operator, and \| is a + literal. + If not set, \| serves as the `or'-operator, and | is a literal. */ +#define RE_NO_BK_VBAR (1 << 1) + +/* If this bit is not set, plain + or ? serves as an operator, and \+, \? are + literals. + If set, \+, \? are operators and plain +, ? are literals. */ +#define RE_BK_PLUS_QM (1 << 2) + +/* If this bit is set, | binds tighter than ^ or $. + If not set, the contrary. */ +#define RE_TIGHT_VBAR (1 << 3) + +/* If this bit is set, then treat newline as an OR operator. + If not set, treat it as a normal character. */ +#define RE_NEWLINE_OR (1 << 4) + +/* If this bit is set, then special characters may act as normal + characters in some contexts. Specifically, this applies to: + ^ -- only special at the beginning, or after ( or |; + $ -- only special at the end, or before ) or |; + *, +, ? -- only special when not after the beginning, (, or |. + If this bit is not set, special characters (such as *, ^, and $) + always have their special meaning regardless of the surrounding + context. */ +#define RE_CONTEXT_INDEP_OPS (1 << 5) + +/* If this bit is not set, then \ before anything inside [ and ] is taken as + a real \. + If set, then such a \ escapes the following character. This is a + special case for awk. */ +#define RE_AWK_CLASS_HACK (1 << 6) + +/* If this bit is set, then \{ and \} or { and } serve as interval operators. + If not set, then \{ and \} and { and } are treated as literals. */ +#define RE_INTERVALS (1 << 7) + +/* If this bit is not set, then \{ and \} serve as interval operators and + { and } are literals. + If set, then { and } serve as interval operators and \{ and \} are + literals. */ +#define RE_NO_BK_CURLY_BRACES (1 << 8) + +/* If this bit is set, then character classes are supported; they are: + [:alpha:], [:upper:], [:lower:], [:digit:], [:alnum:], [:xdigit:], + [:space:], [:print:], [:punct:], [:graph:], and [:cntrl:]. + If not set, then character classes are not supported. */ +#define RE_CHAR_CLASSES (1 << 9) + +/* If this bit is set, then the dot re doesn't match a null byte. + If not set, it does. */ +#define RE_DOT_NOT_NULL (1 << 10) + +/* If this bit is set, then [^...] doesn't match a newline. + If not set, it does. */ +#define RE_HAT_NOT_NEWLINE (1 << 11) + +/* If this bit is set, back references are recognized. + If not set, they aren't. */ +#define RE_NO_BK_REFS (1 << 12) + +/* If this bit is set, back references must refer to a preceding + subexpression. If not set, a back reference to a nonexistent + subexpression is treated as literal characters. */ +#define RE_NO_EMPTY_BK_REF (1 << 13) + +/* If this bit is set, bracket expressions can't be empty. + If it is set, they can be empty. */ +#define RE_NO_EMPTY_BRACKETS (1 << 14) + +/* If this bit is set, then *, +, ? and { cannot be first in an re or + immediately after a |, or a (. Furthermore, a | cannot be first or + last in an re, or immediately follow another | or a (. Also, a ^ + cannot appear in a nonleading position and a $ cannot appear in a + nontrailing position (outside of bracket expressions, that is). */ +#define RE_CONTEXTUAL_INVALID_OPS (1 << 15) + +/* If this bit is set, then +, ? and | aren't recognized as operators. + If it's not, they are. */ +#define RE_LIMITED_OPS (1 << 16) + +/* If this bit is set, then an ending range point has to collate higher + or equal to the starting range point. + If it's not set, then when the ending range point collates higher + than the starting range point, the range is just considered empty. */ +#define RE_NO_EMPTY_RANGES (1 << 17) + +/* If this bit is set, then a hyphen (-) can't be an ending range point. + If it isn't, then it can. */ +#define RE_NO_HYPHEN_RANGE_END (1 << 18) + + +/* Define combinations of bits for the standard possibilities. */ +#define RE_SYNTAX_POSIX_AWK (RE_NO_BK_PARENS | RE_NO_BK_VBAR \ + | RE_CONTEXT_INDEP_OPS) +#define RE_SYNTAX_AWK (RE_NO_BK_PARENS | RE_NO_BK_VBAR \ + | RE_CONTEXT_INDEP_OPS | RE_AWK_CLASS_HACK) +#define RE_SYNTAX_EGREP (RE_NO_BK_PARENS | RE_NO_BK_VBAR \ + | RE_CONTEXT_INDEP_OPS | RE_NEWLINE_OR) +#define RE_SYNTAX_GREP (RE_BK_PLUS_QM | RE_NEWLINE_OR) +#define RE_SYNTAX_EMACS 0 +#define RE_SYNTAX_POSIX_BASIC (RE_INTERVALS | RE_BK_PLUS_QM \ + | RE_CHAR_CLASSES | RE_DOT_NOT_NULL \ + | RE_HAT_NOT_NEWLINE | RE_NO_EMPTY_BK_REF \ + | RE_NO_EMPTY_BRACKETS | RE_LIMITED_OPS \ + | RE_NO_EMPTY_RANGES | RE_NO_HYPHEN_RANGE_END) + +#define RE_SYNTAX_POSIX_EXTENDED (RE_INTERVALS | RE_NO_BK_CURLY_BRACES \ + | RE_NO_BK_VBAR | RE_NO_BK_PARENS \ + | RE_HAT_NOT_NEWLINE | RE_CHAR_CLASSES \ + | RE_NO_EMPTY_BRACKETS | RE_CONTEXTUAL_INVALID_OPS \ + | RE_NO_BK_REFS | RE_NO_EMPTY_RANGES \ + | RE_NO_HYPHEN_RANGE_END) + + +/* This data structure is used to represent a compiled pattern. */ + +struct re_pattern_buffer + { + char *buffer; /* Space holding the compiled pattern commands. */ + long allocated; /* Size of space that `buffer' points to. */ + long used; /* Length of portion of buffer actually occupied */ + char *fastmap; /* Pointer to fastmap, if any, or zero if none. */ + /* re_search uses the fastmap, if there is one, + to skip over totally implausible characters. */ + char *translate; /* Translate table to apply to all characters before + comparing, or zero for no translation. + The translation is applied to a pattern when it is + compiled and to data when it is matched. */ + char fastmap_accurate; + /* Set to zero when a new pattern is stored, + set to one when the fastmap is updated from it. */ + char can_be_null; /* Set to one by compiling fastmap + if this pattern might match the null string. + It does not necessarily match the null string + in that case, but if this is zero, it cannot. + 2 as value means can match null string + but at end of range or before a character + listed in the fastmap. */ + }; + + +/* search.c (search_buffer) needs this one value. It is defined both in + regex.c and here. */ +#define RE_EXACTN_VALUE 1 + + +/* Structure to store register contents data in. + + Pass the address of such a structure as an argument to re_match, etc., + if you want this information back. + + For i from 1 to RE_NREGS - 1, start[i] records the starting index in + the string of where the ith subexpression matched, and end[i] records + one after the ending index. start[0] and end[0] are analogous, for + the entire pattern. */ + +struct re_registers + { + int start[RE_NREGS]; + int end[RE_NREGS]; + }; + + + +#ifdef __STDC__ + +extern char *re_compile_pattern (char *, int, struct re_pattern_buffer *); +/* Is this really advertised? */ +extern void re_compile_fastmap (struct re_pattern_buffer *); +extern int re_search (struct re_pattern_buffer *, char*, int, int, int, + struct re_registers *); +extern int re_search_2 (struct re_pattern_buffer *, char *, int, + char *, int, int, int, + struct re_registers *, int); +extern int re_match (struct re_pattern_buffer *, char *, int, int, + struct re_registers *); +extern int re_match_2 (struct re_pattern_buffer *, char *, int, + char *, int, int, struct re_registers *, int); + +/* 4.2 bsd compatibility. */ +extern char *re_comp (char *); +extern int re_exec (char *); + +#else /* !__STDC__ */ + +extern char *re_compile_pattern (); +/* Is this really advertised? */ +extern void re_compile_fastmap (); +extern int re_search (), re_search_2 (); +extern int re_match (), re_match_2 (); + +/* 4.2 bsd compatibility. */ +extern char *re_comp (); +extern int re_exec (); + +#endif /* __STDC__ */ + + +#ifdef SYNTAX_TABLE +extern char *re_syntax_table; +#endif + +#endif /* !__REGEXP_LIBRARY */ diff --git a/linux-0.11-lab/newlibc/include/setjmp.h b/linux-0.11-lab/newlibc/include/setjmp.h new file mode 100644 index 0000000..b2d8141 --- /dev/null +++ b/linux-0.11-lab/newlibc/include/setjmp.h @@ -0,0 +1,16 @@ +#ifndef _SETJMP_H +#define _SETJMP_H + +/* longjump wants %ebp, %esp, %eip, %ebx, %esi, %edi */ +#define _JBLEN 32 +#define _SJBLEN (_JBLEN+4) + +typedef char * jmp_buf[_JBLEN]; +typedef char * sigjmp_buf[_SJBLEN]; + +int setjmp(jmp_buf env); +void longjmp(jmp_buf env, int val); +int sigsetjmp(sigjmp_buf env, int savemask); +int siglongjmp(sigjmp_buf env, int val); + +#endif diff --git a/linux-0.11-lab/newlibc/include/signal.h b/linux-0.11-lab/newlibc/include/signal.h new file mode 100644 index 0000000..ad599f0 --- /dev/null +++ b/linux-0.11-lab/newlibc/include/signal.h @@ -0,0 +1,69 @@ +#ifndef _SIGNAL_H +#define _SIGNAL_H + +#include + +typedef int sig_atomic_t; +typedef unsigned int sigset_t; /* 32 bits */ + +#define _NSIG 32 +#define NSIG _NSIG + +#define SIGHUP 1 +#define SIGINT 2 +#define SIGQUIT 3 +#define SIGILL 4 +#define SIGTRAP 5 +#define SIGABRT 6 +#define SIGIOT 6 +#define SIGUNUSED 7 +#define SIGFPE 8 +#define SIGKILL 9 +#define SIGUSR1 10 +#define SIGSEGV 11 +#define SIGUSR2 12 +#define SIGPIPE 13 +#define SIGALRM 14 +#define SIGTERM 15 +#define SIGSTKFLT 16 +#define SIGCHLD 17 +#define SIGCONT 18 +#define SIGSTOP 19 +#define SIGTSTP 20 +#define SIGTTIN 21 +#define SIGTTOU 22 + +/* Ok, I haven't implemented sigactions, but trying to keep headers POSIX */ +#define SA_NOCLDSTOP 1 +#define SA_NOMASK 0x40000000 +#define SA_ONESHOT 0x80000000 + +#define SIG_BLOCK 0 /* for blocking signals */ +#define SIG_UNBLOCK 1 /* for unblocking signals */ +#define SIG_SETMASK 2 /* for setting the signal mask */ + +#define SIG_DFL ((void (*)(int))0) /* default signal handling */ +#define SIG_IGN ((void (*)(int))1) /* ignore signal */ +#define SIG_ERR ((void (*)(int))-1) /* error return from signal */ + +struct sigaction { + void (*sa_handler)(int); + sigset_t sa_mask; + int sa_flags; + void (*sa_restorer)(void); +}; + +void (*signal(int _sig, void (*_func)(int)))(int); +int raise(int sig); +int kill(pid_t pid, int sig); +int sigaddset(sigset_t *mask, int signo); +int sigdelset(sigset_t *mask, int signo); +int sigemptyset(sigset_t *mask); +int sigfillset(sigset_t *mask); +int sigismember(sigset_t *mask, int signo); /* 1 - is, 0 - not, -1 error */ +int sigpending(sigset_t *set); +int sigprocmask(int how, sigset_t *set, sigset_t *oldset); +int sigsuspend(sigset_t *sigmask); +int sigaction(int sig, struct sigaction *act, struct sigaction *oldact); + +#endif /* _SIGNAL_H */ diff --git a/linux-0.11-lab/newlibc/include/stdarg.h b/linux-0.11-lab/newlibc/include/stdarg.h new file mode 100644 index 0000000..fd79ec0 --- /dev/null +++ b/linux-0.11-lab/newlibc/include/stdarg.h @@ -0,0 +1,28 @@ +#ifndef _STDARG_H +#define _STDARG_H + +typedef char *va_list; + +/* Amount of space required in an argument list for an arg of type TYPE. + TYPE may alternatively be an expression whose type is used. */ + +#define __va_rounded_size(TYPE) \ + (((sizeof (TYPE) + sizeof (int) - 1) / sizeof (int)) * sizeof (int)) + +#ifndef __sparc__ +#define va_start(AP, LASTARG) \ + (AP = ((char *) &(LASTARG) + __va_rounded_size (LASTARG))) +#else +#define va_start(AP, LASTARG) \ + (__builtin_saveregs (), \ + AP = ((char *) &(LASTARG) + __va_rounded_size (LASTARG))) +#endif + +void va_end (va_list); /* Defined in gnulib */ +#define va_end(AP) + +#define va_arg(AP, TYPE) \ + (AP += __va_rounded_size (TYPE), \ + *((TYPE *) (AP - __va_rounded_size (TYPE)))) + +#endif /* _STDARG_H */ diff --git a/linux-0.11-lab/newlibc/include/stddef.h b/linux-0.11-lab/newlibc/include/stddef.h new file mode 100644 index 0000000..97f72ff --- /dev/null +++ b/linux-0.11-lab/newlibc/include/stddef.h @@ -0,0 +1,19 @@ +#ifndef _STDDEF_H +#define _STDDEF_H + +#ifndef _PTRDIFF_T +#define _PTRDIFF_T +typedef long ptrdiff_t; +#endif + +#ifndef _SIZE_T +#define _SIZE_T +typedef unsigned long size_t; +#endif + +#undef NULL +#define NULL ((void *)0) + +#define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER) + +#endif diff --git a/linux-0.11-lab/newlibc/include/stdio.h b/linux-0.11-lab/newlibc/include/stdio.h new file mode 100644 index 0000000..a779059 --- /dev/null +++ b/linux-0.11-lab/newlibc/include/stdio.h @@ -0,0 +1,256 @@ +#ifndef _STDIO_H +#define _STDIO_H + +/* s t d i o + * + * Author: C. E. Chew + * Date: August 1989 + * + * (C) Copyright C E Chew + * + * Feel free to copy, use and distribute this software provided: + * + * 1. you do not pretend that you wrote it + * 2. you leave this copyright notice intact. + * + * Definitions and user interface for the stream io package. + * + * Patchlevel 2.0 + * + * Edit History: + */ + +/* Site specific definitions */ +/*@*/ +#ifndef NULL +# define NULL ((void *)0) +#endif +#define _STDIO_UCHAR_ 0 +#define _STDIO_VA_LIST_ char * +#define _STDIO_SIZE_T_ unsigned int /* type returned by sizeof */ +#define _STDIO_USIZE_T_ unsigned int +/*=*/ + +/* Definitions based on ANSI compiler */ +#ifdef __STDC__ +# ifndef _STDIO_P_ +# define _STDIO_P_(x) x +# endif +# ifndef _STDIO_VA_ +# define _STDIO_VA_ , ... +# endif +# ifndef _STDIO_UCHAR_ +# define _STDIO_UCHAR_ 0 +# endif +#else +# ifndef _STDIO_P_ +# define _STDIO_P_(x) () +# endif +# ifndef _STDIO_VA_ +# define _STDIO_VA_ +# endif +# ifndef _STDIO_UCHAR_ +# define _STDIO_UCHAR_ (0xff) +# endif +#endif + +#ifndef _STDIO_VA_LIST_ +# define _STDIO_VA_LIST_ void * +#endif + +#ifndef _STDIO_SIZE_T_ +# define _STDIO_SIZE_T_ unsigned int +#endif + +#ifndef _STDIO_USIZE_T_ +# define _STDIO_USIZE_T_ unsigned int +#endif + +/* ANSI Definitions */ +#define BUFSIZ 1024 /* default buffer size */ + +#ifndef NULL +# define NULL ((void *) 0) /* null pointer */ +#endif + +#define EOF (-1) /* eof flag */ +#define FOPEN_MAX 16 /* minimum guarantee */ +#define FILENAME_MAX 127 /* maximum length of file name */ + +#define SEEK_SET 0 /* seek from beginning */ +#define SEEK_CUR 1 /* seek from here */ +#define SEEK_END 2 /* seek from end */ + +#define TMP_MAX (0xffff) /* maximum number of temporaries */ + +#define L_tmpnam (5 + 8 + 4 + 1 + 1) /* length of temporary file name */ + +#ifndef _FPOS_T +# define _FPOS_T + typedef long fpos_t; /* stream positioning */ +#endif + +#ifndef _SIZE_T +# define _SIZE_T + typedef _STDIO_SIZE_T_ size_t; /* sizeof type */ +#endif + +#define _IOFBF 000000 /* fully buffered io */ +#define _IOREAD 000001 /* opened for reading */ +#define _IOWRITE 000002 /* opened for writing */ +#define _IONBF 000004 /* unbuffered */ +#define _IOMYBUF 000010 /* allocated buffer */ +#define _IOPOOLBUF 000020 /* buffer belongs to pool */ +#define _IOEOF 000040 /* eof encountered */ +#define _IOERR 000100 /* error encountered */ +#define _IOSTRING 000200 /* strings */ +#define _IOLBF 000400 /* line buffered */ +#define _IORW 001000 /* opened for reading and writing */ +#define _IOAPPEND 002000 /* append mode */ +#define _IOINSERT 004000 /* insert into __iop chain */ +#define _IOSTDX 030000 /* standard stream */ + +#define _IOSTDIN 010000 /* stdin indication */ +#define _IOSTDOUT 020000 /* stdout indication */ +#define _IOSTDERR 030000 /* stderr indication */ + +#define _IORETAIN (_IOSTDX | _IOINSERT) /* flags to be retained */ + +/* Implementation Definitions */ + +typedef char __stdiobuf_t; /* stdio buffer type */ +typedef _STDIO_USIZE_T_ __stdiosize_t; /* unsigned size_t */ + +typedef struct __iobuf { + __stdiobuf_t *__rptr; /* pointer into read buffer */ + __stdiobuf_t *__rend; /* point at end of read buffer */ + __stdiobuf_t *__wptr; /* pointer into write buffer */ + __stdiobuf_t *__wend; /* point at end of write buffer */ + __stdiobuf_t *__base; /* base of buffer */ + __stdiosize_t __bufsiz; /* size of buffer */ + short __flag; /* flags */ + char __file; /* channel number */ + __stdiobuf_t __buf; /* small buffer */ + int (*__filbuf) _STDIO_P_((struct __iobuf *)); /* fill input buffer */ + int (*__flsbuf) _STDIO_P_((int, struct __iobuf *)); /* flush output buffer */ + int (*__flush) _STDIO_P_((struct __iobuf *)); /* flush buffer */ + struct __iobuf *__next; /* next in chain */ +} FILE; + +extern FILE __stdin; /* stdin */ +extern FILE __stdout; /* stdout */ +extern FILE __stderr; /* stderr */ + +#define stdin (&__stdin) +#define stdout (&__stdout) +#define stderr (&__stderr) + +/* ANSI Stdio Requirements */ + +int getc _STDIO_P_((FILE *)); +#if _STDIO_UCHAR_ +# define getc(p) ((p)->__rptr>=(p)->__rend\ + ?(*(p)->__filbuf)(p)\ + :(int)(*(p)->__rptr++&_STDIO_UCHAR_)) +#else +# define getc(p) ((p)->__rptr>=(p)->__rend\ + ?(*(p)->__filbuf)(p)\ + :(int)((unsigned char)(*(p)->__rptr++))) +#endif + +int getchar _STDIO_P_((void)); +#define getchar() getc(stdin) + +int putc _STDIO_P_((int, FILE *)); +#if _STDIO_UCHAR_ +# define putc(x,p) ((p)->__wptr>=(p)->__wend\ + ?(*(p)->__flsbuf)((x),(p))\ + :(int)(*(p)->__wptr++=(x)&_STDIO_UCHAR_)) +#else +# define putc(x,p) ((p)->__wptr>=(p)->__wend\ + ?(*(p)->__flsbuf)((x),(p))\ + :(int)((unsigned char)(*(p)->__wptr++=(x)))) +#endif + +int putchar _STDIO_P_((int)); +#define putchar(x) putc(x,stdout) + +int feof _STDIO_P_((FILE *)); +#define feof(p) (((p)->__flag&_IOEOF)!=0) + +int ferror _STDIO_P_((FILE *)); +#define ferror(p) (((p)->__flag&_IOERR)!=0) + +void clearerr _STDIO_P_((FILE *)); +#define clearerr(p) ((p)->__flag&=~(_IOEOF|_IOERR)) + +FILE *fopen _STDIO_P_((const char *, const char *)); +FILE *freopen _STDIO_P_((const char *, const char *, FILE *)); +int fflush _STDIO_P_((FILE *)); +int fclose _STDIO_P_((FILE *)); + +int fgetpos _STDIO_P_((FILE *, fpos_t *)); +int fsetpos _STDIO_P_((FILE *, fpos_t *)); +long ftell _STDIO_P_((FILE *)); +int fseek _STDIO_P_((FILE *, long, int)); +void rewind _STDIO_P_((FILE *)); + +int fgetc _STDIO_P_((FILE *)); +int fputc _STDIO_P_((int, FILE *)); +__stdiosize_t fread _STDIO_P_((void *, __stdiosize_t, + __stdiosize_t, FILE *)); +__stdiosize_t fwrite _STDIO_P_((void *, __stdiosize_t, + __stdiosize_t, FILE *)); + +int getw _STDIO_P_((FILE *)); +int putw _STDIO_P_((int, FILE *)); +char *gets _STDIO_P_((char *)); +char *fgets _STDIO_P_((char *, int, FILE *)); +int puts _STDIO_P_((const char *)); +int fputs _STDIO_P_((const char *, FILE *)); + +int ungetc _STDIO_P_((int, FILE *)); + +int printf _STDIO_P_((const char * _STDIO_VA_)); +int fprintf _STDIO_P_((FILE *, const char * _STDIO_VA_)); +int sprintf _STDIO_P_((char *, const char * _STDIO_VA_)); +int vprintf _STDIO_P_((const char *, _STDIO_VA_LIST_)); +int vfprintf _STDIO_P_((FILE *, const char *, _STDIO_VA_LIST_)); +int vsprintf _STDIO_P_((char *, const char *, _STDIO_VA_LIST_)); +int scanf _STDIO_P_((const char * _STDIO_VA_)); +int fscanf _STDIO_P_((FILE *, const char * _STDIO_VA_)); +int sscanf _STDIO_P_((const char *, const char * _STDIO_VA_)); + +void setbuf _STDIO_P_((FILE *, char *)); +int setvbuf _STDIO_P_((FILE *, char *, int, __stdiosize_t)); + +int rename _STDIO_P_((const char *, const char *)); +int remove _STDIO_P_((const char *)); + +void perror _STDIO_P_((const char *)); + +char * tmpnam _STDIO_P_((char *)); +FILE * tmpfile _STDIO_P_((void)); + +/* Posix Definitions */ +int unlink _STDIO_P_((const char *)); +#define remove(x) unlink((x)) + +#define L_ctermid 9 +char * ctermid _STDIO_P_((char *s)); + +#define L_cuserid 9 +char * cuserid _STDIO_P_((char *s)); + +FILE *fdopen _STDIO_P_((int, const char *)); + +int fileno _STDIO_P_((FILE *)); +#define fileno(p) ((p)->__file) + +#undef _STDIO_P_ +#undef _STDIO_VA_ +#undef _STDIO_VA_LIST_ +/*ndef _STDIO_UCHAR_*/ +#undef _STDIO_SIZE_T_ +#undef _STDIO_USIZE_T_ +#endif diff --git a/linux-0.11-lab/newlibc/include/stdlib.h b/linux-0.11-lab/newlibc/include/stdlib.h new file mode 100644 index 0000000..7880598 --- /dev/null +++ b/linux-0.11-lab/newlibc/include/stdlib.h @@ -0,0 +1,43 @@ +#ifndef _STDLIB_H +#define _STDLIB_H + +#include + +#define EXIT_SUCCESS 0 +#define EXIT_FAILURE 1 + +extern double atof(const char * s); +extern int atoi(const char *s); +extern long atol(const char *s); +extern double strtod(const char *s, char **endp); +extern long strtol(const char *s, char **endp, int base); +extern unsigned long strtoul(const char *s, char **endp, int base); +extern int rand(void); +extern void srand(unsigned int seed); +extern void * calloc(size_t nobj, size_t size); +extern void * malloc(size_t size); +extern void * realloc(void * p, size_t size); +extern void free(void * p); +extern void abort(void); +extern volatile void exit(int status); +extern int atexit(void (*fcn)(void)); +extern int system(const char *s); +extern char * getenv(const char *name); +extern void * bsearch(const void *key, const void *base, + size_t n, size_t size, + int (*cmp)(const void *keyval, const void *datum)); +extern void qsort(void *base, size_t n, size_t size, + int (*cmp)(const void *,const void *)); +extern int abs(int n); +extern long labs(long n); +extern div_t div(int num, int denom); +extern ldiv_t ldiv(long num, long denom); +extern char * getcwd(char * buf, size_t size); + +#ifdef __GNUC__ +#define __alloca(n) __builtin_alloca(n) +#else +#define __alloca(n) alloca(n) +#endif + +#endif diff --git a/linux-0.11-lab/newlibc/include/string.h b/linux-0.11-lab/newlibc/include/string.h new file mode 100644 index 0000000..05a6d9c --- /dev/null +++ b/linux-0.11-lab/newlibc/include/string.h @@ -0,0 +1,405 @@ +#ifndef _STRING_H_ +#define _STRING_H_ + +#ifndef NULL +#define NULL ((void *) 0) +#endif + +#ifndef _SIZE_T +#define _SIZE_T +typedef unsigned int size_t; +#endif + +extern char * strerror(int errno); + +/* + * This string-include defines all string functions as inline + * functions. Use gcc. It also assumes ds=es=data space, this should be + * normal. Most of the string-functions are rather heavily hand-optimized, + * see especially strtok,strstr,str[c]spn. They should work, but are not + * very easy to understand. Everything is done entirely within the register + * set, making the functions fast and clean. String instructions have been + * used through-out, making for "slightly" unclear code :-) + * + * (C) 1991 Linus Torvalds + */ + +extern inline char * strcpy(char * dest,const char *src) +{ +__asm__("cld\n" + "1:\tlodsb\n\t" + "stosb\n\t" + "testb %%al,%%al\n\t" + "jne 1b" + ::"S" (src),"D" (dest):"si","di","ax"); +return dest; +} + +extern inline char * strncpy(char * dest,const char *src,int count) +{ +__asm__("cld\n" + "1:\tdecl %2\n\t" + "js 2f\n\t" + "lodsb\n\t" + "stosb\n\t" + "testb %%al,%%al\n\t" + "jne 1b\n\t" + "rep\n\t" + "stosb\n" + "2:" + ::"S" (src),"D" (dest),"c" (count):"si","di","ax","cx"); +return dest; +} + +extern inline char * strcat(char * dest,const char * src) +{ +__asm__("cld\n\t" + "repne\n\t" + "scasb\n\t" + "decl %1\n" + "1:\tlodsb\n\t" + "stosb\n\t" + "testb %%al,%%al\n\t" + "jne 1b" + ::"S" (src),"D" (dest),"a" (0),"c" (0xffffffff):"si","di","ax","cx"); +return dest; +} + +extern inline char * strncat(char * dest,const char * src,int count) +{ +__asm__("cld\n\t" + "repne\n\t" + "scasb\n\t" + "decl %1\n\t" + "movl %4,%3\n" + "1:\tdecl %3\n\t" + "js 2f\n\t" + "lodsb\n\t" + "stosb\n\t" + "testb %%al,%%al\n\t" + "jne 1b\n" + "2:\txorl %2,%2\n\t" + "stosb" + ::"S" (src),"D" (dest),"a" (0),"c" (0xffffffff),"g" (count) + :"si","di","ax","cx"); +return dest; +} + +extern inline int strcmp(const char * cs,const char * ct) +{ +register int __res __asm__("ax"); +__asm__("cld\n" + "1:\tlodsb\n\t" + "scasb\n\t" + "jne 2f\n\t" + "testb %%al,%%al\n\t" + "jne 1b\n\t" + "xorl %%eax,%%eax\n\t" + "jmp 3f\n" + "2:\tmovl $1,%%eax\n\t" + "jl 3f\n\t" + "negl %%eax\n" + "3:" + :"=a" (__res):"D" (cs),"S" (ct):"si","di"); +return __res; +} + +extern inline int strncmp(const char * cs,const char * ct,int count) +{ +register int __res __asm__("ax"); +__asm__("cld\n" + "1:\tdecl %3\n\t" + "js 2f\n\t" + "lodsb\n\t" + "scasb\n\t" + "jne 3f\n\t" + "testb %%al,%%al\n\t" + "jne 1b\n" + "2:\txorl %%eax,%%eax\n\t" + "jmp 4f\n" + "3:\tmovl $1,%%eax\n\t" + "jl 4f\n\t" + "negl %%eax\n" + "4:" + :"=a" (__res):"D" (cs),"S" (ct),"c" (count):"si","di","cx"); +return __res; +} + +extern inline char * strchr(const char * s,char c) +{ +register char * __res __asm__("ax"); +__asm__("cld\n\t" + "movb %%al,%%ah\n" + "1:\tlodsb\n\t" + "cmpb %%ah,%%al\n\t" + "je 2f\n\t" + "testb %%al,%%al\n\t" + "jne 1b\n\t" + "movl $1,%1\n" + "2:\tmovl %1,%0\n\t" + "decl %0" + :"=a" (__res):"S" (s),"0" (c):"si"); +return __res; +} + +extern inline char * strrchr(const char * s,char c) +{ +register char * __res __asm__("dx"); +__asm__("cld\n\t" + "movb %%al,%%ah\n" + "1:\tlodsb\n\t" + "cmpb %%ah,%%al\n\t" + "jne 2f\n\t" + "movl %%esi,%0\n\t" + "decl %0\n" + "2:\ttestb %%al,%%al\n\t" + "jne 1b" + :"=d" (__res):"0" (0),"S" (s),"a" (c):"ax","si"); +return __res; +} + +extern inline int strspn(const char * cs, const char * ct) +{ +register char * __res __asm__("si"); +__asm__("cld\n\t" + "movl %4,%%edi\n\t" + "repne\n\t" + "scasb\n\t" + "notl %%ecx\n\t" + "decl %%ecx\n\t" + "movl %%ecx,%%edx\n" + "1:\tlodsb\n\t" + "testb %%al,%%al\n\t" + "je 2f\n\t" + "movl %4,%%edi\n\t" + "movl %%edx,%%ecx\n\t" + "repne\n\t" + "scasb\n\t" + "je 1b\n" + "2:\tdecl %0" + :"=S" (__res):"a" (0),"c" (0xffffffff),"0" (cs),"g" (ct) + :"ax","cx","dx","di"); +return __res-cs; +} + +extern inline int strcspn(const char * cs, const char * ct) +{ +register char * __res __asm__("si"); +__asm__("cld\n\t" + "movl %4,%%edi\n\t" + "repne\n\t" + "scasb\n\t" + "notl %%ecx\n\t" + "decl %%ecx\n\t" + "movl %%ecx,%%edx\n" + "1:\tlodsb\n\t" + "testb %%al,%%al\n\t" + "je 2f\n\t" + "movl %4,%%edi\n\t" + "movl %%edx,%%ecx\n\t" + "repne\n\t" + "scasb\n\t" + "jne 1b\n" + "2:\tdecl %0" + :"=S" (__res):"a" (0),"c" (0xffffffff),"0" (cs),"g" (ct) + :"ax","cx","dx","di"); +return __res-cs; +} + +extern inline char * strpbrk(const char * cs,const char * ct) +{ +register char * __res __asm__("si"); +__asm__("cld\n\t" + "movl %4,%%edi\n\t" + "repne\n\t" + "scasb\n\t" + "notl %%ecx\n\t" + "decl %%ecx\n\t" + "movl %%ecx,%%edx\n" + "1:\tlodsb\n\t" + "testb %%al,%%al\n\t" + "je 2f\n\t" + "movl %4,%%edi\n\t" + "movl %%edx,%%ecx\n\t" + "repne\n\t" + "scasb\n\t" + "jne 1b\n\t" + "decl %0\n\t" + "jmp 3f\n" + "2:\txorl %0,%0\n" + "3:" + :"=S" (__res):"a" (0),"c" (0xffffffff),"0" (cs),"g" (ct) + :"ax","cx","dx","di"); +return __res; +} + +extern inline char * strstr(const char * cs,const char * ct) +{ +register char * __res __asm__("ax"); +__asm__("cld\n\t" \ + "movl %4,%%edi\n\t" + "repne\n\t" + "scasb\n\t" + "notl %%ecx\n\t" + "decl %%ecx\n\t" /* NOTE! This also sets Z if searchstring='' */ + "movl %%ecx,%%edx\n" + "1:\tmovl %4,%%edi\n\t" + "movl %%esi,%%eax\n\t" + "movl %%edx,%%ecx\n\t" + "repe\n\t" + "cmpsb\n\t" + "je 2f\n\t" /* also works for empty string, see above */ + "xchgl %%eax,%%esi\n\t" + "incl %%esi\n\t" + "cmpb $0,-1(%%eax)\n\t" + "jne 1b\n\t" + "xorl %%eax,%%eax\n\t" + "2:" + :"=a" (__res):"0" (0),"c" (0xffffffff),"S" (cs),"g" (ct) + :"cx","dx","di","si"); +return __res; +} + +extern inline int strlen(const char * s) +{ +register int __res __asm__("cx"); +__asm__("cld\n\t" + "repne\n\t" + "scasb\n\t" + "notl %0\n\t" + "decl %0" + :"=c" (__res):"D" (s),"a" (0),"0" (0xffffffff):"di"); +return __res; +} + +extern char * ___strtok; + +extern inline char * strtok(char * s,const char * ct) +{ +register char * __res __asm__("si"); +__asm__("testl %1,%1\n\t" + "jne 1f\n\t" + "testl %0,%0\n\t" + "je 8f\n\t" + "movl %0,%1\n" + "1:\txorl %0,%0\n\t" + "movl $-1,%%ecx\n\t" + "xorl %%eax,%%eax\n\t" + "cld\n\t" + "movl %4,%%edi\n\t" + "repne\n\t" + "scasb\n\t" + "notl %%ecx\n\t" + "decl %%ecx\n\t" + "je 7f\n\t" /* empty delimeter-string */ + "movl %%ecx,%%edx\n" + "2:\tlodsb\n\t" + "testb %%al,%%al\n\t" + "je 7f\n\t" + "movl %4,%%edi\n\t" + "movl %%edx,%%ecx\n\t" + "repne\n\t" + "scasb\n\t" + "je 2b\n\t" + "decl %1\n\t" + "cmpb $0,(%1)\n\t" + "je 7f\n\t" + "movl %1,%0\n" + "3:\tlodsb\n\t" + "testb %%al,%%al\n\t" + "je 5f\n\t" + "movl %4,%%edi\n\t" + "movl %%edx,%%ecx\n\t" + "repne\n\t" + "scasb\n\t" + "jne 3b\n\t" + "decl %1\n\t" + "cmpb $0,(%1)\n\t" + "je 5f\n\t" + "movb $0,(%1)\n\t" + "incl %1\n\t" + "jmp 6f\n" + "5:\txorl %1,%1\n" + "6:\tcmpb $0,(%0)\n\t" + "jne 7f\n\t" + "xorl %0,%0\n" + "7:\ttestl %0,%0\n\t" + "jne 8f\n\t" + "movl %0,%1\n" + "8:" + :"=b" (__res),"=S" (___strtok) + :"0" (___strtok),"1" (s),"g" (ct) + :"ax","cx","dx","di"); +return __res; +} + +extern inline void * memcpy(void * dest,const void * src, int n) +{ +__asm__("cld\n\t" + "rep\n\t" + "movsb" + ::"c" (n),"S" (src),"D" (dest) + :"cx","si","di"); +return dest; +} + +extern inline void * memmove(void * dest,const void * src, int n) +{ +if (dest diff --git a/linux-0.11-lab/newlibc/include/sys/dir.h b/linux-0.11-lab/newlibc/include/sys/dir.h new file mode 100644 index 0000000..7ca5a7d --- /dev/null +++ b/linux-0.11-lab/newlibc/include/sys/dir.h @@ -0,0 +1,16 @@ +#ifndef _SYS_DIR_H +#define _SYS_DIR_H + +#include +#include + +#ifndef DIRSIZ +#define DIRSIZ NAME_MAX +#endif + +struct direct { + ino_t d_ino; + char d_name[NAME_MAX]; +}; + +#endif diff --git a/linux-0.11-lab/newlibc/include/sys/dirent.h b/linux-0.11-lab/newlibc/include/sys/dirent.h new file mode 100644 index 0000000..d0873a9 --- /dev/null +++ b/linux-0.11-lab/newlibc/include/sys/dirent.h @@ -0,0 +1,13 @@ +#ifndef _SYS_DIRENT_H +#define _SYS_DIRENT_H + +#include + +struct dirent { + long d_ino; + off_t d_off; + unsigned short d_reclen; + char d_name[NAME_MAX+1]; +}; + +#endif diff --git a/linux-0.11-lab/newlibc/include/sys/file.h b/linux-0.11-lab/newlibc/include/sys/file.h new file mode 100644 index 0000000..5192a59 --- /dev/null +++ b/linux-0.11-lab/newlibc/include/sys/file.h @@ -0,0 +1,10 @@ +#ifndef _SYS_FILE_H +#define _SYS_FILE_H + +#include + +#define L_SET 0 /* absolute offset */ +#define L_INCR 1 /* relative to current offset */ +#define L_XTND 2 /* relative to end of file */ + +#endif diff --git a/linux-0.11-lab/newlibc/include/sys/ioctl.h b/linux-0.11-lab/newlibc/include/sys/ioctl.h new file mode 100644 index 0000000..541e4d5 --- /dev/null +++ b/linux-0.11-lab/newlibc/include/sys/ioctl.h @@ -0,0 +1,4 @@ +#ifndef _SYS_IOCTL_H +#define _SYS_IOCTL_H + +#endif diff --git a/linux-0.11-lab/newlibc/include/sys/param.h b/linux-0.11-lab/newlibc/include/sys/param.h new file mode 100644 index 0000000..0a21cfa --- /dev/null +++ b/linux-0.11-lab/newlibc/include/sys/param.h @@ -0,0 +1,6 @@ +#ifndef _SYS_PARAM_H +#define _SYS_PARAM_H + +#define HZ 100 + +#endif diff --git a/linux-0.11-lab/newlibc/include/sys/stat.h b/linux-0.11-lab/newlibc/include/sys/stat.h new file mode 100644 index 0000000..41c3840 --- /dev/null +++ b/linux-0.11-lab/newlibc/include/sys/stat.h @@ -0,0 +1,58 @@ +#ifndef _SYS_STAT_H +#define _SYS_STAT_H + +#include + +struct stat { + dev_t st_dev; + ino_t st_ino; + umode_t st_mode; + nlink_t st_nlink; + uid_t st_uid; + gid_t st_gid; + dev_t st_rdev; + off_t st_size; + time_t st_atime; + time_t st_mtime; + time_t st_ctime; +}; + +#define S_IFMT 00170000 +#define S_IFREG 0100000 +#define S_IFBLK 0060000 +#define S_IFDIR 0040000 +#define S_IFCHR 0020000 +#define S_IFIFO 0010000 +#define S_ISUID 0004000 +#define S_ISGID 0002000 +#define S_ISVTX 0001000 + +#define S_ISREG(m) (((m) & S_IFMT) == S_IFREG) +#define S_ISDIR(m) (((m) & S_IFMT) == S_IFDIR) +#define S_ISCHR(m) (((m) & S_IFMT) == S_IFCHR) +#define S_ISBLK(m) (((m) & S_IFMT) == S_IFBLK) +#define S_ISFIFO(m) (((m) & S_IFMT) == S_IFIFO) + +#define S_IRWXU 00700 +#define S_IRUSR 00400 +#define S_IWUSR 00200 +#define S_IXUSR 00100 + +#define S_IRWXG 00070 +#define S_IRGRP 00040 +#define S_IWGRP 00020 +#define S_IXGRP 00010 + +#define S_IRWXO 00007 +#define S_IROTH 00004 +#define S_IWOTH 00002 +#define S_IXOTH 00001 + +extern int chmod(const char *_path, mode_t mode); +extern int fstat(int fildes, struct stat *stat_buf); +extern int mkdir(const char *_path, mode_t mode); +extern int mkfifo(const char *_path, mode_t mode); +extern int stat(const char *filename, struct stat *stat_buf); +extern mode_t umask(mode_t mask); + +#endif diff --git a/linux-0.11-lab/newlibc/include/sys/sysmacros.h b/linux-0.11-lab/newlibc/include/sys/sysmacros.h new file mode 100644 index 0000000..1747bb8 --- /dev/null +++ b/linux-0.11-lab/newlibc/include/sys/sysmacros.h @@ -0,0 +1,8 @@ +#ifndef _SYS_SYSMACROS_H +#define _SYS_SYSMACROS_H + +#define major(dev) (((unsigned) (dev))>>8) +#define minor(dev) ((dev)&0xff) +#define makedev(major,minor) ((major<<8)|minor) + +#endif diff --git a/linux-0.11-lab/newlibc/include/sys/time.h b/linux-0.11-lab/newlibc/include/sys/time.h new file mode 100644 index 0000000..19645e8 --- /dev/null +++ b/linux-0.11-lab/newlibc/include/sys/time.h @@ -0,0 +1,55 @@ +#ifndef _SYS_TIME_H +#define _SYS_TIME_H + +/* gettimofday returns this */ +struct timeval { + long tv_sec; /* seconds */ + long tv_usec; /* microseconds */ +}; + +struct timezone { + int tz_minuteswest; /* minutes west of Greenwich */ + int tz_dsttime; /* type of dst correction */ +}; + +#define DST_NONE 0 /* not on dst */ +#define DST_USA 1 /* USA style dst */ +#define DST_AUST 2 /* Australian style dst */ +#define DST_WET 3 /* Western European dst */ +#define DST_MET 4 /* Middle European dst */ +#define DST_EET 5 /* Eastern European dst */ +#define DST_CAN 6 /* Canada */ +#define DST_GB 7 /* Great Britain and Eire */ +#define DST_RUM 8 /* Rumania */ +#define DST_TUR 9 /* Turkey */ +#define DST_AUSTALT 10 /* Australian style with shift in 1986 */ + +/* + * Operations on timevals. + * + * NB: timercmp does not work for >= or <=. + */ +#define timerisset(tvp) ((tvp)->tv_sec || (tvp)->tv_usec) +#define timercmp(tvp, uvp, cmp) \ + ((tvp)->tv_sec cmp (uvp)->tv_sec || \ + (tvp)->tv_sec == (uvp)->tv_sec && (tvp)->tv_usec cmp (uvp)->tv_usec) +#define timerclear(tvp) ((tvp)->tv_sec = (tvp)->tv_usec = 0) + +/* + * Names of the interval timers, and structure + * defining a timer setting. + */ +#define ITIMER_REAL 0 +#define ITIMER_VIRTUAL 1 +#define ITIMER_PROF 2 + +struct itimerval { + struct timeval it_interval; /* timer interval */ + struct timeval it_value; /* current value */ +}; + +#include + +int gettimeofday(struct timeval * tp, struct timezone * tz); + +#endif /*_SYS_TIME_H*/ diff --git a/linux-0.11-lab/newlibc/include/sys/timeb.h b/linux-0.11-lab/newlibc/include/sys/timeb.h new file mode 100644 index 0000000..caf0b81 --- /dev/null +++ b/linux-0.11-lab/newlibc/include/sys/timeb.h @@ -0,0 +1,13 @@ +#ifndef _SYS_TIMEB_H +#define _SYS_TIMEB_H + +#include + +struct timeb { + time_t time; + unsigned short millitm; + short timezone; + short dstflag; +}; + +#endif /* _SYS_TIMEB_H */ diff --git a/linux-0.11-lab/newlibc/include/sys/times.h b/linux-0.11-lab/newlibc/include/sys/times.h new file mode 100644 index 0000000..68d5bfb --- /dev/null +++ b/linux-0.11-lab/newlibc/include/sys/times.h @@ -0,0 +1,15 @@ +#ifndef _TIMES_H +#define _TIMES_H + +#include + +struct tms { + time_t tms_utime; + time_t tms_stime; + time_t tms_cutime; + time_t tms_cstime; +}; + +extern time_t times(struct tms * tp); + +#endif diff --git a/linux-0.11-lab/newlibc/include/sys/types.h b/linux-0.11-lab/newlibc/include/sys/types.h new file mode 100644 index 0000000..557aa31 --- /dev/null +++ b/linux-0.11-lab/newlibc/include/sys/types.h @@ -0,0 +1,46 @@ +#ifndef _SYS_TYPES_H +#define _SYS_TYPES_H + +#ifndef _SIZE_T +#define _SIZE_T +typedef unsigned int size_t; +#endif + +#ifndef _TIME_T +#define _TIME_T +typedef long time_t; +#endif + +#ifndef _PTRDIFF_T +#define _PTRDIFF_T +typedef long ptrdiff_t; +#endif + +#ifndef NULL +#define NULL ((void *) 0) +#endif + +typedef int pid_t; +typedef unsigned short uid_t; +typedef unsigned char gid_t; +typedef unsigned short dev_t; +typedef unsigned short ino_t; +typedef unsigned short mode_t; +typedef unsigned short umode_t; +typedef unsigned char nlink_t; +typedef int daddr_t; +typedef long off_t; +typedef unsigned char u_char; +typedef unsigned short ushort; + +typedef struct { int quot,rem; } div_t; +typedef struct { long quot,rem; } ldiv_t; + +struct ustat { + daddr_t f_tfree; + ino_t f_tinode; + char f_fname[6]; + char f_fpack[6]; +}; + +#endif diff --git a/linux-0.11-lab/newlibc/include/sys/utsname.h b/linux-0.11-lab/newlibc/include/sys/utsname.h new file mode 100644 index 0000000..0a1c5a0 --- /dev/null +++ b/linux-0.11-lab/newlibc/include/sys/utsname.h @@ -0,0 +1,16 @@ +#ifndef _SYS_UTSNAME_H +#define _SYS_UTSNAME_H + +#include + +struct utsname { + char sysname[9]; + char nodename[9]; + char release[9]; + char version[9]; + char machine[9]; +}; + +extern int uname(struct utsname * utsbuf); + +#endif diff --git a/linux-0.11-lab/newlibc/include/sys/varargs.h b/linux-0.11-lab/newlibc/include/sys/varargs.h new file mode 100644 index 0000000..4bd4921 --- /dev/null +++ b/linux-0.11-lab/newlibc/include/sys/varargs.h @@ -0,0 +1,19 @@ +/* @(#)varargs.h 1.11 89/06/14 SMI; from UCB 4.1 83/05/03 */ + +#ifndef _sys_varargs_h +#define _sys_varargs_h + +typedef char *va_list; +#if defined(sparc) +# define va_alist __builtin_va_alist +#endif +# define va_dcl int va_alist; +# define va_start(list) list = (char *) &va_alist +# define va_end(list) +# if defined(__BUILTIN_VA_ARG_INCR) && !defined(lint) +# define va_arg(list,mode) ((mode*)__builtin_va_arg_incr((mode *)list))[0] +# else +# define va_arg(list,mode) ((mode *)(list += sizeof(mode)))[-1] +# endif + +#endif /*!_sys_varargs_h*/ diff --git a/linux-0.11-lab/newlibc/include/sys/wait.h b/linux-0.11-lab/newlibc/include/sys/wait.h new file mode 100644 index 0000000..53190c2 --- /dev/null +++ b/linux-0.11-lab/newlibc/include/sys/wait.h @@ -0,0 +1,23 @@ +#ifndef _SYS_WAIT_H +#define _SYS_WAIT_H + +#include + +#define _LOW(v) ( (v) & 0377) +#define _HIGH(v) ( ((v) >> 8) & 0377) + +/* options for waitpid, WUNTRACED not supported */ +#define WNOHANG 1 +#define WUNTRACED 2 + +#define WIFEXITED(s) (!((s)&0xFF) +#define WIFSTOPPED(s) (((s)&0xFF)==0x7F) +#define WEXITSTATUS(s) (((s)>>8)&0xFF) +#define WTERMSIG(s) ((s)&0x7F) +#define WSTOPSIG(s) (((s)>>8)&0xFF) +#define WIFSIGNALED(s) (((unsigned int)(s)-1 & 0xFFFF) < 0xFF) + +pid_t wait(int *stat_loc); +pid_t waitpid(pid_t pid, int *stat_loc, int options); + +#endif diff --git a/linux-0.11-lab/newlibc/include/termcap.h b/linux-0.11-lab/newlibc/include/termcap.h new file mode 100644 index 0000000..9947377 --- /dev/null +++ b/linux-0.11-lab/newlibc/include/termcap.h @@ -0,0 +1,11 @@ +#ifndef _TERMCAP_H +#define _TERMCAP_H + +extern int tgetent(char *bp, char *name); +extern int tgetflag(char *id); +extern int tgetnum(char *id); +extern char *tgetstr(char *id, char **area); +extern char *tgoto(char *cm, int destcol, int destline); +extern int tputs(char *cp, int affcnt, void (*outc)(int)); + +#endif /* _TERMCAP_H */ diff --git a/linux-0.11-lab/newlibc/include/termio.h b/linux-0.11-lab/newlibc/include/termio.h new file mode 100644 index 0000000..9e26956 --- /dev/null +++ b/linux-0.11-lab/newlibc/include/termio.h @@ -0,0 +1 @@ +#include diff --git a/linux-0.11-lab/newlibc/include/termios.h b/linux-0.11-lab/newlibc/include/termios.h new file mode 100644 index 0000000..2421db5 --- /dev/null +++ b/linux-0.11-lab/newlibc/include/termios.h @@ -0,0 +1,225 @@ +#ifndef _TERMIOS_H +#define _TERMIOS_H + +#define TTY_BUF_SIZE 1024 + +/* 0x54 is just a magic number to make these relatively uniqe ('T') */ + +#define TCGETS 0x5401 +#define TCSETS 0x5402 +#define TCSETSW 0x5403 +#define TCSETSF 0x5404 +#define TCGETA 0x5405 +#define TCSETA 0x5406 +#define TCSETAW 0x5407 +#define TCSETAF 0x5408 +#define TCSBRK 0x5409 +#define TCXONC 0x540A +#define TCFLSH 0x540B +#define TIOCEXCL 0x540C +#define TIOCNXCL 0x540D +#define TIOCSCTTY 0x540E +#define TIOCGPGRP 0x540F +#define TIOCSPGRP 0x5410 +#define TIOCOUTQ 0x5411 +#define TIOCSTI 0x5412 +#define TIOCGWINSZ 0x5413 +#define TIOCSWINSZ 0x5414 +#define TIOCMGET 0x5415 +#define TIOCMBIS 0x5416 +#define TIOCMBIC 0x5417 +#define TIOCMSET 0x5418 +#define TIOCGSOFTCAR 0x5419 +#define TIOCSSOFTCAR 0x541A +#define TIOCINQ 0x541B + +struct winsize { + unsigned short ws_row; + unsigned short ws_col; + unsigned short ws_xpixel; + unsigned short ws_ypixel; +}; + +#define NCC 8 +struct termio { + unsigned short c_iflag; /* input mode flags */ + unsigned short c_oflag; /* output mode flags */ + unsigned short c_cflag; /* control mode flags */ + unsigned short c_lflag; /* local mode flags */ + unsigned char c_line; /* line discipline */ + unsigned char c_cc[NCC]; /* control characters */ +}; + +#define NCCS 17 +struct termios { + unsigned long c_iflag; /* input mode flags */ + unsigned long c_oflag; /* output mode flags */ + unsigned long c_cflag; /* control mode flags */ + unsigned long c_lflag; /* local mode flags */ + unsigned char c_line; /* line discipline */ + unsigned char c_cc[NCCS]; /* control characters */ +}; + +/* c_cc characters */ +#define VINTR 0 +#define VQUIT 1 +#define VERASE 2 +#define VKILL 3 +#define VEOF 4 +#define VTIME 5 +#define VMIN 6 +#define VSWTC 7 +#define VSTART 8 +#define VSTOP 9 +#define VSUSP 10 +#define VEOL 11 +#define VREPRINT 12 +#define VDISCARD 13 +#define VWERASE 14 +#define VLNEXT 15 +#define VEOL2 16 + +/* c_iflag bits */ +#define IGNBRK 0000001 +#define BRKINT 0000002 +#define IGNPAR 0000004 +#define PARMRK 0000010 +#define INPCK 0000020 +#define ISTRIP 0000040 +#define INLCR 0000100 +#define IGNCR 0000200 +#define ICRNL 0000400 +#define IUCLC 0001000 +#define IXON 0002000 +#define IXANY 0004000 +#define IXOFF 0010000 +#define IMAXBEL 0020000 + +/* c_oflag bits */ +#define OPOST 0000001 +#define OLCUC 0000002 +#define ONLCR 0000004 +#define OCRNL 0000010 +#define ONOCR 0000020 +#define ONLRET 0000040 +#define OFILL 0000100 +#define OFDEL 0000200 +#define NLDLY 0000400 +#define NL0 0000000 +#define NL1 0000400 +#define CRDLY 0003000 +#define CR0 0000000 +#define CR1 0001000 +#define CR2 0002000 +#define CR3 0003000 +#define TABDLY 0014000 +#define TAB0 0000000 +#define TAB1 0004000 +#define TAB2 0010000 +#define TAB3 0014000 +#define XTABS 0014000 +#define BSDLY 0020000 +#define BS0 0000000 +#define BS1 0020000 +#define VTDLY 0040000 +#define VT0 0000000 +#define VT1 0040000 +#define FFDLY 0040000 +#define FF0 0000000 +#define FF1 0040000 + +/* c_cflag bit meaning */ +#define CBAUD 0000017 +#define B0 0000000 /* hang up */ +#define B50 0000001 +#define B75 0000002 +#define B110 0000003 +#define B134 0000004 +#define B150 0000005 +#define B200 0000006 +#define B300 0000007 +#define B600 0000010 +#define B1200 0000011 +#define B1800 0000012 +#define B2400 0000013 +#define B4800 0000014 +#define B9600 0000015 +#define B19200 0000016 +#define B38400 0000017 +#define EXTA B19200 +#define EXTB B38400 +#define CSIZE 0000060 +#define CS5 0000000 +#define CS6 0000020 +#define CS7 0000040 +#define CS8 0000060 +#define CSTOPB 0000100 +#define CREAD 0000200 +#define PARENB 0000400 +#define PARODD 0001000 +#define HUPCL 0002000 +#define CLOCAL 0004000 +#define CIBAUD 03600000 /* input baud rate (not used) */ +#define CRTSCTS 020000000000 /* flow control */ + +/* c_lflag bits */ +#define ISIG 0000001 +#define ICANON 0000002 +#define XCASE 0000004 +#define ECHO 0000010 +#define ECHOE 0000020 +#define ECHOK 0000040 +#define ECHONL 0000100 +#define NOFLSH 0000200 +#define TOSTOP 0000400 +#define ECHOCTL 0001000 +#define ECHOPRT 0002000 +#define ECHOKE 0004000 +#define FLUSHO 0010000 +#define PENDIN 0040000 +#define IEXTEN 0100000 + +/* modem lines */ +#define TIOCM_LE 0x001 +#define TIOCM_DTR 0x002 +#define TIOCM_RTS 0x004 +#define TIOCM_ST 0x008 +#define TIOCM_SR 0x010 +#define TIOCM_CTS 0x020 +#define TIOCM_CAR 0x040 +#define TIOCM_RNG 0x080 +#define TIOCM_DSR 0x100 +#define TIOCM_CD TIOCM_CAR +#define TIOCM_RI TIOCM_RNG + +/* tcflow() and TCXONC use these */ +#define TCOOFF 0 +#define TCOON 1 +#define TCIOFF 2 +#define TCION 3 + +/* tcflush() and TCFLSH use these */ +#define TCIFLUSH 0 +#define TCOFLUSH 1 +#define TCIOFLUSH 2 + +/* tcsetattr uses these */ +#define TCSANOW 0 +#define TCSADRAIN 1 +#define TCSAFLUSH 2 + +typedef int speed_t; + +extern speed_t cfgetispeed(struct termios *termios_p); +extern speed_t cfgetospeed(struct termios *termios_p); +extern int cfsetispeed(struct termios *termios_p, speed_t speed); +extern int cfsetospeed(struct termios *termios_p, speed_t speed); +extern int tcdrain(int fildes); +extern int tcflow(int fildes, int action); +extern int tcflush(int fildes, int queue_selector); +extern int tcgetattr(int fildes, struct termios *termios_p); +extern int tcsendbreak(int fildes, int duration); +extern int tcsetattr(int fildes, int optional_actions, + struct termios *termios_p); + +#endif diff --git a/linux-0.11-lab/newlibc/include/time.h b/linux-0.11-lab/newlibc/include/time.h new file mode 100644 index 0000000..fbb4e73 --- /dev/null +++ b/linux-0.11-lab/newlibc/include/time.h @@ -0,0 +1,49 @@ +#ifndef _TIME_H +#define _TIME_H + +#ifndef _TIME_T +#define _TIME_T +typedef long time_t; +#endif + +#ifndef _SIZE_T +#define _SIZE_T +typedef unsigned int size_t; +#endif + +#ifndef NULL +#define NULL ((void *) 0) +#endif + +#define CLOCKS_PER_SEC 100 + +typedef long clock_t; + +struct tm { + int tm_sec; + int tm_min; + int tm_hour; + int tm_mday; + int tm_mon; + int tm_year; + int tm_wday; + int tm_yday; + int tm_isdst; +}; + +#define __isleap(year) \ + ((year) % 4 == 0 && ((year) % 100 != 0 || (year) % 1000 == 0)) + +clock_t clock(void); +time_t time(time_t * tp); +double difftime(time_t time2, time_t time1); +time_t mktime(struct tm * tp); + +char * asctime(const struct tm * tp); +char * ctime(const time_t * tp); +struct tm * gmtime(const time_t *tp); +struct tm *localtime(const time_t * tp); +size_t strftime(char * s, size_t smax, const char * fmt, const struct tm * tp); +void tzset(void); + +#endif diff --git a/linux-0.11-lab/newlibc/include/unistd.h b/linux-0.11-lab/newlibc/include/unistd.h new file mode 100644 index 0000000..dcbc754 --- /dev/null +++ b/linux-0.11-lab/newlibc/include/unistd.h @@ -0,0 +1,269 @@ +#ifndef _UNISTD_H +#define _UNISTD_H + +/* ok, this may be a joke, but I'm working on it */ +#define _POSIX_VERSION 198808L + +#define _POSIX_CHOWN_RESTRICTED /* only root can do a chown (I think..) */ +#define _POSIX_NO_TRUNC /* no pathname truncation (but see in kernel) */ +#define _POSIX_VDISABLE '\0' /* character to disable things like ^C */ +/*#define _POSIX_SAVED_IDS */ /* we'll get to this yet */ +/*#define _POSIX_JOB_CONTROL */ /* we aren't there quite yet. Soon hopefully */ + +#define STDIN_FILENO 0 +#define STDOUT_FILENO 1 +#define STDERR_FILENO 2 + +#ifndef NULL +#define NULL ((void *)0) +#endif + +/* access */ +#define F_OK 0 +#define X_OK 1 +#define W_OK 2 +#define R_OK 4 + +/* lseek */ +#define SEEK_SET 0 +#define SEEK_CUR 1 +#define SEEK_END 2 + +/* _SC stands for System Configuration. We don't use them much */ +#define _SC_ARG_MAX 1 +#define _SC_CHILD_MAX 2 +#define _SC_CLOCKS_PER_SEC 3 +#define _SC_NGROUPS_MAX 4 +#define _SC_OPEN_MAX 5 +#define _SC_JOB_CONTROL 6 +#define _SC_SAVED_IDS 7 +#define _SC_VERSION 8 + +/* more (possibly) configurable things - now pathnames */ +#define _PC_LINK_MAX 1 +#define _PC_MAX_CANON 2 +#define _PC_MAX_INPUT 3 +#define _PC_NAME_MAX 4 +#define _PC_PATH_MAX 5 +#define _PC_PIPE_BUF 6 +#define _PC_NO_TRUNC 7 +#define _PC_VDISABLE 8 +#define _PC_CHOWN_RESTRICTED 9 + +#include +#include +#include +#include + +#ifdef __LIBRARY__ + +#define __NR_setup 0 /* used only by init, to get system going */ +#define __NR_exit 1 +#define __NR_fork 2 +#define __NR_read 3 +#define __NR_write 4 +#define __NR_open 5 +#define __NR_close 6 +#define __NR_waitpid 7 +#define __NR_creat 8 +#define __NR_link 9 +#define __NR_unlink 10 +#define __NR_execve 11 +#define __NR_chdir 12 +#define __NR_time 13 +#define __NR_mknod 14 +#define __NR_chmod 15 +#define __NR_chown 16 +#define __NR_break 17 +#define __NR_stat 18 +#define __NR_lseek 19 +#define __NR_getpid 20 +#define __NR_mount 21 +#define __NR_umount 22 +#define __NR_setuid 23 +#define __NR_getuid 24 +#define __NR_stime 25 +#define __NR_ptrace 26 +#define __NR_alarm 27 +#define __NR_fstat 28 +#define __NR_pause 29 +#define __NR_utime 30 +#define __NR_stty 31 +#define __NR_gtty 32 +#define __NR_access 33 +#define __NR_nice 34 +#define __NR_ftime 35 +#define __NR_sync 36 +#define __NR_kill 37 +#define __NR_rename 38 +#define __NR_mkdir 39 +#define __NR_rmdir 40 +#define __NR_dup 41 +#define __NR_pipe 42 +#define __NR_times 43 +#define __NR_prof 44 +#define __NR_brk 45 +#define __NR_setgid 46 +#define __NR_getgid 47 +#define __NR_signal 48 +#define __NR_geteuid 49 +#define __NR_getegid 50 +#define __NR_acct 51 +#define __NR_phys 52 +#define __NR_lock 53 +#define __NR_ioctl 54 +#define __NR_fcntl 55 +#define __NR_mpx 56 +#define __NR_setpgid 57 +#define __NR_ulimit 58 +#define __NR_uname 59 +#define __NR_umask 60 +#define __NR_chroot 61 +#define __NR_ustat 62 +#define __NR_dup2 63 +#define __NR_getppid 64 +#define __NR_getpgrp 65 +#define __NR_setsid 66 +#define __NR_sigaction 67 +#define __NR_sgetmask 68 +#define __NR_ssetmask 69 +#define __NR_setreuid 70 +#define __NR_setregid 71 +#define __NR_sigsuspend 72 +#define __NR_sigpending 73 +#define __NR_sethostname 74 +#define __NR_setrlimit 75 +#define __NR_getrlimit 76 +#define __NR_getrusage 77 +#define __NR_gettimeofday 78 +#define __NR_settimeofday 79 +#define __NR_getgroups 80 +#define __NR_setgroups 81 +#define __NR_select 82 +#define __NR_symlink 83 +#define __NR_lstat 84 +#define __NR_readlink 85 +#define __NR_uselib 86 +#define _syscall0(type,name) \ +type name(void) \ +{ \ +long __res; \ +__asm__ volatile ("int $0x80" \ + : "=a" (__res) \ + : "0" (__NR_##name)); \ +if (__res >= 0) \ + return (type) __res; \ +errno = -__res; \ +return -1; \ +} + +#define _syscall1(type,name,atype,a) \ +type name(atype a) \ +{ \ +long __res; \ +__asm__ volatile ("int $0x80" \ + : "=a" (__res) \ + : "0" (__NR_##name),"b" ((long)(a))); \ +if (__res >= 0) \ + return (type) __res; \ +errno = -__res; \ +return -1; \ +} + +#define _syscall2(type,name,atype,a,btype,b) \ +type name(atype a,btype b) \ +{ \ +long __res; \ +__asm__ volatile ("int $0x80" \ + : "=a" (__res) \ + : "0" (__NR_##name),"b" ((long)(a)),"c" ((long)(b))); \ +if (__res >= 0) \ + return (type) __res; \ +errno = -__res; \ +return -1; \ +} + +#define _syscall3(type,name,atype,a,btype,b,ctype,c) \ +type name(atype a,btype b,ctype c) \ +{ \ +long __res; \ +__asm__ volatile ("int $0x80" \ + : "=a" (__res) \ + : "0" (__NR_##name),"b" ((long)(a)),"c" ((long)(b)),"d" ((long)(c))); \ +if (__res>=0) \ + return (type) __res; \ +errno=-__res; \ +return -1; \ +} + +#endif /* __LIBRARY__ */ + +extern int errno; + +int access(const char * filename, mode_t mode); +int acct(const char * filename); +int alarm(int sec); +int brk(void * end_data_segment); +void * sbrk(ptrdiff_t increment); +int chdir(const char * filename); +int chmod(const char * filename, mode_t mode); +int chown(const char * filename, uid_t owner, gid_t group); +int chroot(const char * filename); +int close(int fildes); +int creat(const char * filename, mode_t mode); +int dup(int fildes); +int execve(const char * filename, char ** argv, char ** envp); +int execv(const char * pathname, char ** argv); +int execvp(const char * file, char ** argv); +int execl(const char * pathname, char * arg0, ...); +int execlp(const char * file, char * arg0, ...); +int execle(const char * pathname, char * arg0, ...); +volatile void exit(int status); +volatile void _exit(int status); +int fcntl(int fildes, int cmd, ...); +int fork(void); +int getpid(void); +int getuid(void); +int geteuid(void); +int getgid(void); +int getegid(void); +int ioctl(int fildes, int cmd, ...); +int kill(pid_t pid, int signal); +int link(const char * filename1, const char * filename2); +int lseek(int fildes, off_t offset, int origin); +int mknod(const char * filename, mode_t mode, dev_t dev); +int mount(const char * specialfile, const char * dir, int rwflag); +int nice(int val); +int open(const char * filename, int flag, ...); +int pause(void); +int pipe(int * fildes); +int read(int fildes, char * buf, off_t count); +int setpgrp(void); +int setpgid(pid_t pid,pid_t pgid); +int setuid(uid_t uid); +int setgid(gid_t gid); +void (*signal(int sig, void (*fn)(int)))(int); +int stat(const char * filename, struct stat * stat_buf); +int fstat(int fildes, struct stat * stat_buf); +int stime(time_t * tptr); +int sync(void); +time_t time(time_t * tloc); +time_t times(struct tms * tbuf); +int ulimit(int cmd, long limit); +mode_t umask(mode_t mask); +int umount(const char * specialfile); +int uname(struct utsname * name); +int unlink(const char * filename); +int ustat(dev_t dev, struct ustat * ubuf); +int utime(const char * filename, struct utimbuf * times); +pid_t waitpid(pid_t pid,int * wait_stat,int options); +pid_t wait(int * wait_stat); +int write(int fildes, const char * buf, off_t count); +int dup2(int oldfd, int newfd); +int getppid(void); +pid_t getpgrp(void); +pid_t setsid(void); + +#define __always_inline inline __attribute__((always_inline)) + +#endif diff --git a/linux-0.11-lab/newlibc/include/utime.h b/linux-0.11-lab/newlibc/include/utime.h new file mode 100644 index 0000000..83f07c7 --- /dev/null +++ b/linux-0.11-lab/newlibc/include/utime.h @@ -0,0 +1,13 @@ +#ifndef _UTIME_H +#define _UTIME_H + +#include /* I know - shouldn't do this, but .. */ + +struct utimbuf { + time_t actime; + time_t modtime; +}; + +extern int utime(const char *filename, struct utimbuf *times); + +#endif diff --git a/linux-0.11-lab/newlibc/include/varargs.h b/linux-0.11-lab/newlibc/include/varargs.h new file mode 100644 index 0000000..4bd4921 --- /dev/null +++ b/linux-0.11-lab/newlibc/include/varargs.h @@ -0,0 +1,19 @@ +/* @(#)varargs.h 1.11 89/06/14 SMI; from UCB 4.1 83/05/03 */ + +#ifndef _sys_varargs_h +#define _sys_varargs_h + +typedef char *va_list; +#if defined(sparc) +# define va_alist __builtin_va_alist +#endif +# define va_dcl int va_alist; +# define va_start(list) list = (char *) &va_alist +# define va_end(list) +# if defined(__BUILTIN_VA_ARG_INCR) && !defined(lint) +# define va_arg(list,mode) ((mode*)__builtin_va_arg_incr((mode *)list))[0] +# else +# define va_arg(list,mode) ((mode *)(list += sizeof(mode)))[-1] +# endif + +#endif /*!_sys_varargs_h*/ diff --git a/linux-0.11-lab/newlibc/malloc/Makefile b/linux-0.11-lab/newlibc/malloc/Makefile new file mode 100644 index 0000000..a950d27 --- /dev/null +++ b/linux-0.11-lab/newlibc/malloc/Makefile @@ -0,0 +1,18 @@ +CC = gcc +INC=-nostdinc -I. -I../include +CFLAGS=-O $(INC) +OBJS=free.o malloc.o mcheck.o mstats.o realloc.o unix.o valloc.o +ONESRC=ansidecl.h limits.h stddef.h stdlib.h string.h malloc.h \ + free.c malloc.c realloc.c unix.c valloc.c + +all: library + +library: gmalloc.o + $(AR) uvc ../Libc.a gmalloc.o + sync + +#gmalloc.c: $(ONESRC) gmalloc.sed gmalloc.skel +# sed -f gmalloc.sed gmalloc.skel > gmalloc.c + +clean: + $(RM) -f $(OBJS) gmalloc.o diff --git a/linux-0.11-lab/newlibc/malloc/README b/linux-0.11-lab/newlibc/malloc/README new file mode 100644 index 0000000..ca01a92 --- /dev/null +++ b/linux-0.11-lab/newlibc/malloc/README @@ -0,0 +1,4 @@ +This is a alpha/pre-alpha version of the new GNU malloc, and is +intended for people who want to play with it/look for bugs/etc. It +has not been extensively tested and is not intended for widespread +distribution. Bug reports should be sent to mike@ai.mit.edu. diff --git a/linux-0.11-lab/newlibc/malloc/ansidecl.h b/linux-0.11-lab/newlibc/malloc/ansidecl.h new file mode 100644 index 0000000..9e8f390 --- /dev/null +++ b/linux-0.11-lab/newlibc/malloc/ansidecl.h @@ -0,0 +1,93 @@ +/* Copyright (C) 1989 Free Software Foundation, Inc. +This file is part of the GNU C Library. + +The GNU C Library is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 1, or (at your option) +any later version. + +The GNU C Library is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with the GNU C Library; see the file COPYING. If not, write to +the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ + +/* ANSI and traditional C compatibility macros + + ANSI C is assumed if __STDC__ is #defined. + + Macros + PTR - Generic pointer type + LONG_DOUBLE - `long double' type + CONST - `const' keyword + VOLATILE - `volatile' keyword + SIGNED - `signed' keyword + PTRCONST - Generic const pointer (void *const) + + EXFUN(name, prototype) - declare external function NAME + with prototype PROTOTYPE + DEFUN(name, arglist, args) - define function NAME with + args ARGLIST of types in ARGS + DEFUN_VOID(name) - define function NAME with no args + AND - argument separator for ARGS + NOARGS - null arglist + DOTS - `...' in args + + For example: + extern int EXFUN(printf, (CONST char *format DOTS)); + int DEFUN(fprintf, (stream, format), + FILE *stream AND CONST char *format DOTS) { ... } + void DEFUN_VOID(abort) { ... } +*/ + +#ifndef _ANSIDECL_H + +#define _ANSIDECL_H 1 + + +/* Every source file includes this file, + so they will all get the switch for lint. */ +/* LINTLIBRARY */ + + +#ifdef __STDC__ + +#define PTR void * +#define PTRCONST void *CONST +#define LONG_DOUBLE long double + +#define AND , +#define NOARGS void +#define CONST const +#define VOLATILE volatile +#define SIGNED signed +#define DOTS , ... + +#define EXFUN(name, proto) name proto +#define DEFUN(name, arglist, args) name(args) +#define DEFUN_VOID(name) name(NOARGS) + +#else /* Not ANSI C. */ + +#define PTR char * +#define PTRCONST PTR +#define LONG_DOUBLE double + +#define AND ; +#define NOARGS +#define CONST +#define VOLATILE +#define SIGNED +#define DOTS + +#define EXFUN(name, proto) name() +#define DEFUN(name, arglist, args) name arglist args; +#define DEFUN_VOID(name) name() + +#endif /* ANSI C. */ + + +#endif /* ansidecl.h */ diff --git a/linux-0.11-lab/newlibc/malloc/free.c b/linux-0.11-lab/newlibc/malloc/free.c new file mode 100644 index 0000000..e3ea952 --- /dev/null +++ b/linux-0.11-lab/newlibc/malloc/free.c @@ -0,0 +1,192 @@ +/* Free a block of memory allocated by `malloc'. + Copyright 1989 Free Software Foundation + Written May 1989 by Mike Haertel. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 1, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + + The author may be reached (Email) at the address mike@ai.mit.edu, + or (US mail) as Mike Haertel c/o Free Software Foundation. */ + +#ifndef __ONEFILE +#include "ansidecl.h" +#include +#include + +#define _MALLOC_INTERNAL +#include "malloc.h" +#endif /* __ONEFILE */ + +/* Debugging hook for free. */ +void EXFUN((*__free_hook), (PTR __ptr)); + +/* Return memory to the heap. */ +void +DEFUN(free, (ptr), PTR ptr) +{ + int type; + size_t block, blocks; + register size_t i; + struct list *prev, *next; + + if (ptr == NULL) + return; + + if (__free_hook != NULL) + { + (*__free_hook)(ptr); + return; + } + + block = BLOCK(ptr); + + type = _heapinfo[block].busy.type; + switch (type) + { + case 0: + /* Get as many statistics as early as we can. */ + --_chunks_used; + _bytes_used -= _heapinfo[block].busy.info.size * BLOCKSIZE; + _bytes_free += _heapinfo[block].busy.info.size * BLOCKSIZE; + + /* Find the free cluster previous to this one in the free list. + Start searching at the last block referenced; this may benefit + programs with locality of allocation. */ + i = _heapindex; + if (i > block) + while (i > block) + i = _heapinfo[i].free.prev; + else + { + do + i = _heapinfo[i].free.next; + while (i > 0 && i < block); + i = _heapinfo[i].free.prev; + } + + /* Determine how to link this block into the free list. */ + if (block == i + _heapinfo[i].free.size) + { + /* Coalesce this block with its predecessor. */ + _heapinfo[i].free.size += _heapinfo[block].busy.info.size; + block = i; + } + else + { + /* Really link this block back into the free list. */ + _heapinfo[block].free.size = _heapinfo[block].busy.info.size; + _heapinfo[block].free.next = _heapinfo[i].free.next; + _heapinfo[block].free.prev = i; + _heapinfo[i].free.next = block; + _heapinfo[_heapinfo[block].free.next].free.prev = block; + ++_chunks_free; + } + + /* Now that the block is linked in, see if we can coalesce it + with its successor (by deleting its successor from the list + and adding in its size). */ + if (block + _heapinfo[block].free.size == _heapinfo[block].free.next) + { + _heapinfo[block].free.size + += _heapinfo[_heapinfo[block].free.next].free.size; + _heapinfo[block].free.next + = _heapinfo[_heapinfo[block].free.next].free.next; + _heapinfo[_heapinfo[block].free.next].free.prev = block; + --_chunks_free; + } + + /* Now see if we can return stuff to the system. */ + blocks = _heapinfo[block].free.size; + if (blocks >= FINAL_FREE_BLOCKS && block + blocks == _heaplimit + && (*__morecore)(0) == ADDRESS(block + blocks)) + { + register size_t bytes = blocks * BLOCKSIZE; + _heaplimit -= blocks; + (*__morecore)(- bytes); + _heapinfo[_heapinfo[block].free.prev].free.next + = _heapinfo[block].free.next; + _heapinfo[_heapinfo[block].free.next].free.prev + = _heapinfo[block].free.prev; + block = _heapinfo[block].free.prev; + --_chunks_free; + _bytes_free -= bytes; + } + + /* Set the next search to begin at this block. */ + _heapindex = block; + break; + + default: + /* Do some of the statistics. */ + --_chunks_used; + _bytes_used -= 1 << type; + ++_chunks_free; + _bytes_free += 1 << type; + + /* Get the address of the first free fragment in this block. */ + prev = (struct list *) ((char *) ADDRESS(block) + + (_heapinfo[block].busy.info.frag.first << type)); + + if (_heapinfo[block].busy.info.frag.nfree == (BLOCKSIZE >> type) - 1) + { + /* If all fragments of this block are free, remove them + from the fragment list and free the whole block. */ + next = prev; + for (i = 1; i < BLOCKSIZE >> type; ++i) + next = next->next; + prev->prev->next = next; + if (next != NULL) + next->prev = prev->prev; + _heapinfo[block].busy.type = 0; + _heapinfo[block].busy.info.size = 1; + + /* Keep the statistics accurate. */ + ++_chunks_used; + _bytes_used += BLOCKSIZE; + _chunks_free -= BLOCKSIZE >> type; + _bytes_free -= BLOCKSIZE; + + free(ADDRESS(block)); + } + else if (_heapinfo[block].busy.info.frag.nfree != 0) + { + /* If some fragments of this block are free, link this + fragment into the fragment list after the first free + fragment of this block. */ + next = (struct list *) ptr; + next->next = prev->next; + next->prev = prev; + prev->next = next; + if (next->next != NULL) + next->next->prev = next; + ++_heapinfo[block].busy.info.frag.nfree; + } + else + { + /* No fragments of this block are free, so link this + fragment into the fragment list and announce that + it is the first free fragment of this block. */ + prev = (struct list *) ptr; + _heapinfo[block].busy.info.frag.nfree = 1; + _heapinfo[block].busy.info.frag.first = (unsigned int) + (((char *) ptr - (char *) NULL) % BLOCKSIZE >> type); + prev->next = _fraghead[type].next; + prev->prev = &_fraghead[type]; + prev->prev->next = prev; + if (prev->next != NULL) + prev->next->prev = prev; + } + break; + } +} diff --git a/linux-0.11-lab/newlibc/malloc/gmalloc.c b/linux-0.11-lab/newlibc/malloc/gmalloc.c new file mode 100644 index 0000000..71db4e1 --- /dev/null +++ b/linux-0.11-lab/newlibc/malloc/gmalloc.c @@ -0,0 +1,1130 @@ + +/* gmalloc.c - THIS FILE IS AUTOMAGICALLY GENERATED SO DON'T EDIT IT. */ + +/* Single-file skeleton for GNU malloc. + Copyright 1989 Free Software Foundation + Written May 1989 by Mike Haertel. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 1, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + + The author may be reached (Email) at the address mike@ai.mit.edu, + or (US mail) as Mike Haertel c/o Free Software Foundation. */ + +#define __ONEFILE + +/* DO NOT DELETE THIS LINE -- ansidecl.h INSERTED HERE. */ +/* Copyright (C) 1989 Free Software Foundation, Inc. +This file is part of the GNU C Library. + +The GNU C Library is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 1, or (at your option) +any later version. + +The GNU C Library is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with the GNU C Library; see the file COPYING. If not, write to +the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ + +/* ANSI and traditional C compatibility macros + + ANSI C is assumed if __STDC__ is #defined. + + Macros + PTR - Generic pointer type + LONG_DOUBLE - `long double' type + CONST - `const' keyword + VOLATILE - `volatile' keyword + SIGNED - `signed' keyword + PTRCONST - Generic const pointer (void *const) + + EXFUN(name, prototype) - declare external function NAME + with prototype PROTOTYPE + DEFUN(name, arglist, args) - define function NAME with + args ARGLIST of types in ARGS + DEFUN_VOID(name) - define function NAME with no args + AND - argument separator for ARGS + NOARGS - null arglist + DOTS - `...' in args + + For example: + extern int EXFUN(printf, (CONST char *format DOTS)); + int DEFUN(fprintf, (stream, format), + FILE *stream AND CONST char *format DOTS) { ... } + void DEFUN_VOID(abort) { ... } +*/ + +#ifndef _ANSIDECL_H + +#define _ANSIDECL_H 1 + + +/* Every source file includes this file, + so they will all get the switch for lint. */ +/* LINTLIBRARY */ + + +#ifdef __STDC__ + +#define PTR void * +#define PTRCONST void *CONST +#define LONG_DOUBLE long double + +#define AND , +#define NOARGS void +#define CONST const +#define VOLATILE volatile +#define SIGNED signed +#define DOTS , ... + +#define EXFUN(name, proto) name proto +#define DEFUN(name, arglist, args) name(args) +#define DEFUN_VOID(name) name(NOARGS) + +#else /* Not ANSI C. */ + +#define PTR char * +#define PTRCONST PTR +#define LONG_DOUBLE double + +#define AND ; +#define NOARGS +#define CONST +#define VOLATILE +#define SIGNED +#define DOTS + +#define EXFUN(name, proto) name() +#define DEFUN(name, arglist, args) name arglist args; +#define DEFUN_VOID(name) name() + +#endif /* ANSI C. */ + + +#endif /* ansidecl.h */ + +#ifdef __STDC__ +#include +#else +/* DO NOT DELETE THIS LINE -- limits.h INSERTED HERE. */ +/* Number of bits in a `char'. */ +#define CHAR_BIT 8 + +/* No multibyte characters supported yet. */ +#define MB_LEN_MAX 1 + +/* Minimum and maximum values a `signed char' can hold. */ +#define SCHAR_MIN -128 +#define SCHAR_MAX 127 + +/* Maximum value an `unsigned char' can hold. (Minimum is 0). */ +#define UCHAR_MAX 255U + +/* Minimum and maximum values a `char' can hold. */ +#ifdef __CHAR_UNSIGNED__ +#define CHAR_MIN 0 +#define CHAR_MAX 255U +#else +#define CHAR_MIN -128 +#define CHAR_MAX 127 +#endif + +/* Minimum and maximum values a `signed short int' can hold. */ +#define SHRT_MIN -32768 +#define SHRT_MAX 32767 + +/* Maximum value an `unsigned short int' can hold. (Minimum is 0). */ +#define USHRT_MAX 65535U + +/* Minimum and maximum values a `signed int' can hold. */ +#define INT_MIN -2147483648 +#define INT_MAX 2147483647 + +/* Maximum value an `unsigned int' can hold. (Minimum is 0). */ +#define UINT_MAX 4294967295U + +/* Minimum and maximum values a `signed long int' can hold. + (Same as `int'). */ +#define LONG_MIN (-LONG_MAX-1) +#define LONG_MAX 2147483647 + +/* Maximum value an `unsigned long int' can hold. (Minimum is 0). */ +#define ULONG_MAX 4294967295U +#endif + +#ifdef __STDC__ +#include +#else +/* DO NOT DELETE THIS LINE -- stddef.h INSERTED HERE. */ +#ifndef _STDDEF_H +#define _STDDEF_H + +/* Signed type of difference of two pointers. */ + +typedef long ptrdiff_t; + +/* Unsigned type of `sizeof' something. */ + +#ifndef _SIZE_T /* in case has defined it. */ +#define _SIZE_T +typedef unsigned long size_t; +#endif /* _SIZE_T */ + +/* A null pointer constant. */ + +#undef NULL /* in case has defined it. */ +#define NULL 0 + +/* Offset of member MEMBER in a struct of type TYPE. */ + +#define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER) + +#endif /* _STDDEF_H */ +#endif + +/* DO NOT DELETE THIS LINE -- stdlib.h INSERTED HERE. */ +/* Fake stdlib.h supplying the stuff needed by malloc. */ + +#ifndef __ONEFILE +#include +#endif + +extern void EXFUN(abort, (void)); +extern void EXFUN(free, (PTR)); +extern PTR EXFUN(malloc, (size_t)); +extern PTR EXFUN(realloc, (PTR, size_t)); + +/* DO NOT DELETE THIS LINE -- string.h INSERTED HERE. */ +/* Fake string.h supplying stuff used by malloc. */ +#ifndef __ONEFILE +#include +#endif + +extern PTR EXFUN(memcpy, (PTR, PTR, size_t)); +extern PTR EXFUN(memset, (PTR, int, size_t)); +#define memmove memcpy + +#define _MALLOC_INTERNAL +/* DO NOT DELETE THIS LINE -- malloc.h INSERTED HERE. */ +/* Declarations for `malloc' and friends. + Copyright 1990 Free Software Foundation + Written May 1989 by Mike Haertel. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 1, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + + The author may be reached (Email) at the address mike@@ai.mit.edu, + or (US mail) as Mike Haertel c/o Free Software Foundation. */ + +#ifndef _MALLOC_H + +#define _MALLOC_H 1 + +#ifndef __ONEFILE +#define __need_NULL +#define __need_size_t +#define __need_ptrdiff_t +#include +#endif + +#ifdef _MALLOC_INTERNAL + +#ifndef __ONEFILE +#include +#endif + +/* The allocator divides the heap into blocks of fixed size; large + requests receive one or more whole blocks, and small requests + receive a fragment of a block. Fragment sizes are powers of two, + and all fragments of a block are the same size. When all the + fragments in a block have been freed, the block itself is freed. */ +#define INT_BIT (CHAR_BIT * sizeof(int)) +#define BLOCKLOG (INT_BIT > 16 ? 12 : 9) +#define BLOCKSIZE (1 << BLOCKLOG) +#define BLOCKIFY(SIZE) (((SIZE) + BLOCKSIZE - 1) / BLOCKSIZE) + +/* Determine the amount of memory spanned by the initial heap table + (not an absolute limit). */ +#define HEAP (INT_BIT > 16 ? 4194304 : 65536) + +/* Number of contiguous free blocks allowed to build up at the end of + memory before they will be returned to the system. */ +#define FINAL_FREE_BLOCKS 8 + +/* Where to start searching the free list when looking for new memory. + The two possible values are 0 and _heapindex. Starting at 0 seems + to reduce total memory usage, while starting at _heapindex seems to + run faster. */ +#define MALLOC_SEARCH_START _heapindex + +/* Data structure giving per-block information. */ +typedef union + { + /* Heap information for a busy block. */ + struct + { + /* Zero for a large block, or positive giving the + logarithm to the base two of the fragment size. */ + int type; + union + { + struct + { + size_t nfree; /* Free fragments in a fragmented block. */ + size_t first; /* First free fragment of the block. */ + } frag; + /* Size (in blocks) of a large cluster. */ + size_t size; + } info; + } busy; + /* Heap information for a free block (that may be the first of + a free cluster). */ + struct + { + size_t size; /* Size (in blocks) of a free cluster. */ + size_t next; /* Index of next free cluster. */ + size_t prev; /* Index of previous free cluster. */ + } free; + } malloc_info; + +/* Pointer to first block of the heap. */ +extern char *_heapbase; + +/* Table indexed by block number giving per-block information. */ +extern malloc_info *_heapinfo; + +/* Address to block number and vice versa. */ +#define BLOCK(A) (((char *) (A) - _heapbase) / BLOCKSIZE + 1) +#define ADDRESS(B) ((PTR) (((B) - 1) * BLOCKSIZE + _heapbase)) + +/* Current search index for the heap table. */ +extern size_t _heapindex; + +/* Limit of valid info table indices. */ +extern size_t _heaplimit; + +/* Doubly linked lists of free fragments. */ +struct list + { + struct list *next; + struct list *prev; + }; + +/* Free list headers for each fragment size. */ +extern struct list _fraghead[]; + +/* Instrumentation. */ +extern size_t _chunks_used; +extern size_t _bytes_used; +extern size_t _chunks_free; +extern size_t _bytes_free; + +/* Internal version of free() used in morecore(). */ +extern void EXFUN(__free, (PTR __ptr)); + +#endif /* _MALLOC_INTERNAL. */ + +/* Underlying allocation function; successive calls should + return contiguous pieces of memory. */ +extern PTR EXFUN((*__morecore), (ptrdiff_t __size)); + +/* Default value of previous. */ +extern PTR EXFUN(__default_morecore, (ptrdiff_t __size)); + +/* Flag whether malloc has been called. */ +extern int __malloc_initialized; + +/* Hooks for debugging versions. */ +extern void EXFUN((*__free_hook), (PTR __ptr)); +extern PTR EXFUN((*__malloc_hook), (size_t __size)); +extern PTR EXFUN((*__realloc_hook), (PTR __ptr, size_t __size)); + +/* Activate a standard collection of debugging hooks. */ +extern void EXFUN(mcheck, (void EXFUN((*func), (void)))); + +/* Statistics available to the user. */ +struct mstats + { + size_t bytes_total; /* Total size of the heap. */ + size_t chunks_used; /* Chunks allocated by the user. */ + size_t bytes_used; /* Byte total of user-allocated chunks. */ + size_t chunks_free; /* Chunks in the free list. */ + size_t bytes_free; /* Byte total of chunks in the free list. */ + }; + +/* Pick up the current statistics. */ +extern struct mstats EXFUN(mstats, (NOARGS)); + +#endif /* malloc.h */ + +/* DO NOT DELETE THIS LINE -- free.c INSERTED HERE. */ +/* Free a block of memory allocated by `malloc'. + Copyright 1990 Free Software Foundation + Written May 1989 by Mike Haertel. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 1, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + + The author may be reached (Email) at the address mike@ai.mit.edu, + or (US mail) as Mike Haertel c/o Free Software Foundation. */ + +#ifndef __ONEFILE +#include "ansidecl.h" +#include +#include + +#define _MALLOC_INTERNAL +#include "malloc.h" +#endif /* __ONEFILE */ + +/* Debugging hook for free. */ +void EXFUN((*__free_hook), (PTR __ptr)); + +/* Return memory to the heap. Like free() but don't call a __free_hook + if there is one. */ +void +DEFUN(__free, (ptr), PTR ptr) +{ + int type; + size_t block, blocks; + register size_t i; + struct list *prev, *next; + + block = BLOCK(ptr); + + type = _heapinfo[block].busy.type; + switch (type) + { + case 0: + /* Get as many statistics as early as we can. */ + --_chunks_used; + _bytes_used -= _heapinfo[block].busy.info.size * BLOCKSIZE; + _bytes_free += _heapinfo[block].busy.info.size * BLOCKSIZE; + + /* Find the free cluster previous to this one in the free list. + Start searching at the last block referenced; this may benefit + programs with locality of allocation. */ + i = _heapindex; + if (i > block) + while (i > block) + i = _heapinfo[i].free.prev; + else + { + do + i = _heapinfo[i].free.next; + while (i > 0 && i < block); + i = _heapinfo[i].free.prev; + } + + /* Determine how to link this block into the free list. */ + if (block == i + _heapinfo[i].free.size) + { + /* Coalesce this block with its predecessor. */ + _heapinfo[i].free.size += _heapinfo[block].busy.info.size; + block = i; + } + else + { + /* Really link this block back into the free list. */ + _heapinfo[block].free.size = _heapinfo[block].busy.info.size; + _heapinfo[block].free.next = _heapinfo[i].free.next; + _heapinfo[block].free.prev = i; + _heapinfo[i].free.next = block; + _heapinfo[_heapinfo[block].free.next].free.prev = block; + ++_chunks_free; + } + + /* Now that the block is linked in, see if we can coalesce it + with its successor (by deleting its successor from the list + and adding in its size). */ + if (block + _heapinfo[block].free.size == _heapinfo[block].free.next) + { + _heapinfo[block].free.size + += _heapinfo[_heapinfo[block].free.next].free.size; + _heapinfo[block].free.next + = _heapinfo[_heapinfo[block].free.next].free.next; + _heapinfo[_heapinfo[block].free.next].free.prev = block; + --_chunks_free; + } + + /* Now see if we can return stuff to the system. */ + blocks = _heapinfo[block].free.size; + if (blocks >= FINAL_FREE_BLOCKS && block + blocks == _heaplimit + && (*__morecore)(0) == ADDRESS(block + blocks)) + { + register size_t bytes = blocks * BLOCKSIZE; + _heaplimit -= blocks; + (*__morecore)(- bytes); + _heapinfo[_heapinfo[block].free.prev].free.next + = _heapinfo[block].free.next; + _heapinfo[_heapinfo[block].free.next].free.prev + = _heapinfo[block].free.prev; + block = _heapinfo[block].free.prev; + --_chunks_free; + _bytes_free -= bytes; + } + + /* Set the next search to begin at this block. */ + _heapindex = block; + break; + + default: + /* Do some of the statistics. */ + --_chunks_used; + _bytes_used -= 1 << type; + ++_chunks_free; + _bytes_free += 1 << type; + + /* Get the address of the first free fragment in this block. */ + prev = (struct list *) ((char *) ADDRESS(block) + + (_heapinfo[block].busy.info.frag.first << type)); + + if (_heapinfo[block].busy.info.frag.nfree == (BLOCKSIZE >> type) - 1) + { + /* If all fragments of this block are free, remove them + from the fragment list and free the whole block. */ + next = prev; + for (i = 1; i < BLOCKSIZE >> type; ++i) + next = next->next; + prev->prev->next = next; + if (next != NULL) + next->prev = prev->prev; + _heapinfo[block].busy.type = 0; + _heapinfo[block].busy.info.size = 1; + + /* Keep the statistics accurate. */ + ++_chunks_used; + _bytes_used += BLOCKSIZE; + _chunks_free -= BLOCKSIZE >> type; + _bytes_free -= BLOCKSIZE; + + free(ADDRESS(block)); + } + else if (_heapinfo[block].busy.info.frag.nfree != 0) + { + /* If some fragments of this block are free, link this + fragment into the fragment list after the first free + fragment of this block. */ + next = (struct list *) ptr; + next->next = prev->next; + next->prev = prev; + prev->next = next; + if (next->next != NULL) + next->next->prev = next; + ++_heapinfo[block].busy.info.frag.nfree; + } + else + { + /* No fragments of this block are free, so link this + fragment into the fragment list and announce that + it is the first free fragment of this block. */ + prev = (struct list *) ptr; + _heapinfo[block].busy.info.frag.nfree = 1; + _heapinfo[block].busy.info.frag.first = (unsigned int) + (((char *) ptr - (char *) NULL) % BLOCKSIZE >> type); + prev->next = _fraghead[type].next; + prev->prev = &_fraghead[type]; + prev->prev->next = prev; + if (prev->next != NULL) + prev->next->prev = prev; + } + break; + } +} + +/* Return memory to the heap. */ +void +DEFUN(free, (ptr), PTR ptr) +{ + if (ptr == NULL) + return; + + if (__free_hook != NULL) + (*__free_hook)(ptr); + else + __free (ptr); +} + +/* DO NOT DELETE THIS LINE -- malloc.c INSERTED HERE. */ +/* Memory allocator `malloc'. + Copyright 1990 Free Software Foundation + Written May 1989 by Mike Haertel. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 1, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + + The author may be reached (Email) at the address mike@ai.mit.edu, + or (US mail) as Mike Haertel c/o Free Software Foundation. */ + +#ifndef __ONEFILE +#include "ansidecl.h" +#include +#include +#include + +#define _MALLOC_INTERNAL +#include "malloc.h" +#endif /* __ONEFILE */ + +/* How to really get more memory. */ +PTR EXFUN((*__morecore), (ptrdiff_t __size)) = __default_morecore; + +/* Debugging hook for `malloc'. */ +PTR EXFUN((*__malloc_hook), (size_t __size)); + +/* Pointer to the base of the first block. */ +char *_heapbase; + +/* Block information table. Allocated with align/__free (not malloc/free). */ +malloc_info *_heapinfo; + +/* Number of info entries. */ +static size_t heapsize; + +/* Search index in the info table. */ +size_t _heapindex; + +/* Limit of valid info table indices. */ +size_t _heaplimit; + +/* Free lists for each fragment size. */ +struct list _fraghead[BLOCKLOG]; + +/* Instrumentation. */ +size_t _chunks_used; +size_t _bytes_used; +size_t _chunks_free; +size_t _bytes_free; + +/* Are you experienced? */ +int __malloc_initialized; + +/* Aligned allocation. */ +static PTR +DEFUN(align, (size), size_t size) +{ + PTR result; + unsigned int adj; + + result = (*__morecore)(size); + adj = (unsigned int) ((char *) result - (char *) NULL) % BLOCKSIZE; + if (adj != 0) + { + adj = BLOCKSIZE - adj; + (void) (*__morecore)(adj); + result = (char *) result + adj; + } + return result; +} + +/* Set everything up and remember that we have. */ +static int +DEFUN_VOID(initialize) +{ + heapsize = HEAP / BLOCKSIZE; + _heapinfo = (malloc_info *) align(heapsize * sizeof(malloc_info)); + if (_heapinfo == NULL) + return 0; + memset(_heapinfo, 0, heapsize * sizeof(malloc_info)); + _heapinfo[0].free.size = 0; + _heapinfo[0].free.next = _heapinfo[0].free.prev = 0; + _heapindex = 0; + _heapbase = (char *) _heapinfo; + __malloc_initialized = 1; + return 1; +} + +/* Get neatly aligned memory, initializing or + growing the heap info table as necessary. */ +static PTR +DEFUN(morecore, (size), size_t size) +{ + PTR result; + malloc_info *newinfo, *oldinfo; + size_t newsize; + + result = align(size); + if (result == NULL) + return NULL; + + /* Check if we need to grow the info table. */ + if (BLOCK((char *) result + size) > heapsize) + { + newsize = heapsize; + while (BLOCK((char *) result + size) > newsize) + newsize *= 2; + newinfo = (malloc_info *) align(newsize * sizeof(malloc_info)); + if (newinfo == NULL) + { + (*__morecore)(- size); + return NULL; + } + memset(newinfo, 0, newsize * sizeof(malloc_info)); + memcpy(newinfo, _heapinfo, heapsize * sizeof(malloc_info)); + oldinfo = _heapinfo; + newinfo[BLOCK(oldinfo)].busy.type = 0; + newinfo[BLOCK(oldinfo)].busy.info.size + = BLOCKIFY(heapsize * sizeof(malloc_info)); + _heapinfo = newinfo; + __free(oldinfo); + heapsize = newsize; + } + + _heaplimit = BLOCK((char *) result + size); + return result; +} + +void * calloc(size_t n, size_t size) +{ + void * tmp; + size_t total = n*size; + + if (tmp=malloc(total)) + memset(tmp,0,total); + return tmp; +} + +/* Allocate memory from the heap. */ +PTR +DEFUN(malloc, (size), size_t size) +{ + PTR result; + size_t block, blocks, lastblocks, start; + register size_t i; + struct list *next; + + if (size == 0) + return NULL; + + if (__malloc_hook != NULL) + return (*__malloc_hook)(size); + + if (!__malloc_initialized) + if (!initialize()) + return NULL; + + if (size < sizeof(struct list)) + size = sizeof(struct list); + + /* Determine the allocation policy based on the request size. */ + if (size <= BLOCKSIZE / 2) + { + /* Small allocation to receive a fragment of a block. + Determine the logarithm to base two of the fragment size. */ + register size_t log = 1; + --size; + while ((size /= 2) != 0) + ++log; + + /* Look in the fragment lists for a + free fragment of the desired size. */ + next = _fraghead[log].next; + if (next != NULL) + { + /* There are free fragments of this size. + Pop a fragment out of the fragment list and return it. + Update the block's nfree and first counters. */ + result = (PTR) next; + next->prev->next = next->next; + if (next->next != NULL) + next->next->prev = next->prev; + block = BLOCK(result); + if (--_heapinfo[block].busy.info.frag.nfree != 0) + _heapinfo[block].busy.info.frag.first = (unsigned int) + (((char *) next->next - (char *) NULL) % BLOCKSIZE) >> log; + + /* Update the statistics. */ + ++_chunks_used; + _bytes_used += 1 << log; + --_chunks_free; + _bytes_free -= 1 << log; + } + else + { + /* No free fragments of the desired size, so get a new block + and break it into fragments, returning the first. */ + result = malloc(BLOCKSIZE); + if (result == NULL) + return NULL; + + /* Link all fragments but the first into the free list. */ + for (i = 1; i < BLOCKSIZE >> log; ++i) + { + next = (struct list *) ((char *) result + (i << log)); + next->next = _fraghead[log].next; + next->prev = &_fraghead[log]; + next->prev->next = next; + if (next->next != NULL) + next->next->prev = next; + } + + /* Initialize the nfree and first counters for this block. */ + block = BLOCK(result); + _heapinfo[block].busy.type = log; + _heapinfo[block].busy.info.frag.nfree = i - 1; + _heapinfo[block].busy.info.frag.first = i - 1; + + _chunks_free += (BLOCKSIZE >> log) - 1; + _bytes_free += BLOCKSIZE - (1 << log); + } + } + else + { + /* Large allocation to receive one or more blocks. + Search the free list in a circle starting at the last place visited. + If we loop completely around without finding a large enough + space we will have to get more memory from the system. */ + blocks = BLOCKIFY(size); + start = block = MALLOC_SEARCH_START; + while (_heapinfo[block].free.size < blocks) + { + block = _heapinfo[block].free.next; + if (block == start) + { + /* Need to get more from the system. Check to see if + the new core will be contiguous with the final free + block; if so we don't need to get as much. */ + block = _heapinfo[0].free.prev; + lastblocks = _heapinfo[block].free.size; + if (_heaplimit != 0 && block + lastblocks == _heaplimit && + (*__morecore)(0) == ADDRESS(block + lastblocks) && + (morecore((blocks - lastblocks) * BLOCKSIZE)) != NULL) + { + _heapinfo[block].free.size = blocks; + _bytes_free += (blocks - lastblocks) * BLOCKSIZE; + continue; + } + result = morecore(blocks * BLOCKSIZE); + if (result == NULL) + return NULL; + block = BLOCK(result); + _heapinfo[block].busy.type = 0; + _heapinfo[block].busy.info.size = blocks; + ++_chunks_used; + _bytes_used += blocks * BLOCKSIZE; + return result; + } + } + + /* At this point we have found a suitable free list entry. + Figure out how to remove what we need from the list. */ + result = ADDRESS(block); + if (_heapinfo[block].free.size > blocks) + { + /* The block we found has a bit left over, + so relink the tail end back into the free list. */ + _heapinfo[block + blocks].free.size + = _heapinfo[block].free.size - blocks; + _heapinfo[block + blocks].free.next + = _heapinfo[block].free.next; + _heapinfo[block + blocks].free.prev + = _heapinfo[block].free.prev; + _heapinfo[_heapinfo[block].free.prev].free.next + = _heapinfo[_heapinfo[block].free.next].free.prev + = _heapindex = block + blocks; + } + else + { + /* The block exactly matches our requirements, + so just remove it from the list. */ + _heapinfo[_heapinfo[block].free.next].free.prev + = _heapinfo[block].free.prev; + _heapinfo[_heapinfo[block].free.prev].free.next + = _heapindex = _heapinfo[block].free.next; + --_chunks_free; + } + + _heapinfo[block].busy.type = 0; + _heapinfo[block].busy.info.size = blocks; + ++_chunks_used; + _bytes_used += blocks * BLOCKSIZE; + _bytes_free -= blocks * BLOCKSIZE; + } + + return result; +} + +/* DO NOT DELETE THIS LINE -- realloc.c INSERTED HERE. */ +/* Change the size of a block allocated by `malloc'. + Copyright 1990 Free Software Foundation + Written May 1989 by Mike Haertel. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 1, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + + The author may be reached (Email) at the address mike@ai.mit.edu, + or (US mail) as Mike Haertel c/o Free Software Foundation. */ + +#ifndef __ONEFILE +#include "ansidecl.h" +#include +#include + +#define _MALLOC_INTERNAL +#include "malloc.h" +#endif /* __ONEFILE */ + +#define MIN(A, B) ((A) < (B) ? (A) : (B)) + +/* Debugging hook for realloc. */ +PTR EXFUN((*__realloc_hook), (PTR __ptr, size_t __size)); + +/* Resize the given region to the new size, returning a pointer + to the (possibly moved) region. This is optimized for speed; + some benchmarks seem to indicate that greater compactness is + achieved by unconditionally allocating and copying to a + new region. This module has incestuous knowledge of the + internals of both free and malloc. */ +PTR +DEFUN(realloc, (ptr, size), PTR ptr AND size_t size) +{ + PTR result; + int type; + size_t block, blocks, oldlimit; + + if (size == 0) + { + free(ptr); + return NULL; + } + else if (ptr == NULL) + return malloc(size); + + if (__realloc_hook != NULL) + return (*__realloc_hook)(ptr, size); + + block = BLOCK(ptr); + + type = _heapinfo[block].busy.type; + switch (type) + { + case 0: + /* Maybe reallocate a large block to a small fragment. */ + if (size <= BLOCKSIZE / 2) + { + result = malloc(size); + if (result != NULL) + { + memcpy(result, ptr, size); + free(ptr); + return result; + } + } + + /* The new size is a large allocation as well; + see if we can hold it in place. */ + blocks = BLOCKIFY(size); + if (blocks < _heapinfo[block].busy.info.size) + { + /* The new size is smaller; return + excess memory to the free list. */ + _heapinfo[block + blocks].busy.type = 0; + _heapinfo[block + blocks].busy.info.size + = _heapinfo[block].busy.info.size - blocks; + _heapinfo[block].busy.info.size = blocks; + free(ADDRESS(block + blocks)); + result = ptr; + } + else if (blocks == _heapinfo[block].busy.info.size) + /* No size change necessary. */ + result = ptr; + else + { + /* Won't fit, so allocate a new region that will. + Free the old region first in case there is sufficient + adjacent free space to grow without moving. */ + blocks = _heapinfo[block].busy.info.size; + /* Prevent free from actually returning memory to the system. */ + oldlimit = _heaplimit; + _heaplimit = 0; + free(ptr); + _heaplimit = oldlimit; + result = malloc(size); + if (result == NULL) + { + (void) malloc(blocks * BLOCKSIZE); + return NULL; + } + if (ptr != result) + memmove(result, ptr, blocks * BLOCKSIZE); + } + break; + + default: + /* Old size is a fragment; type is logarithm + to base two of the fragment size. */ + if (size > 1 << (type - 1) && size <= 1 << type) + /* The new size is the same kind of fragment. */ + result = ptr; + else + { + /* The new size is different; allocate a new space, + and copy the lesser of the new size and the old. */ + result = malloc(size); + if (result == NULL) + return NULL; + memcpy(result, ptr, MIN(size, 1 << type)); + free(ptr); + } + break; + } + + return result; +} + +/* DO NOT DELETE THIS LINE -- unix.c INSERTED HERE. */ +/* unix.c - get more memory with a UNIX system call. + Copyright 1990 Free Software Foundation + Written May 1989 by Mike Haertel. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 1, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + + The author may be reached (Email) at the address mike@ai.mit.edu, + or (US mail) as Mike Haertel c/o Free Software Foundation. */ + +#ifndef __ONEFILE +#include "ansidecl.h" +#include + +#define _MALLOC_INTERNAL +#include "malloc.h" +#endif /* __ONEFILE */ + +extern PTR EXFUN(sbrk, (ptrdiff_t size)); + +PTR +DEFUN(__default_morecore, (size), ptrdiff_t size) +{ + PTR result; + + result = sbrk(size); + if (result == (PTR) -1) + return NULL; + return result; +} + +#define __getpagesize getpagesize +/* DO NOT DELETE THIS LINE -- valloc.c INSERTED HERE. */ +/* Allocate memory on a page boundary. + Copyright 1990 Free Software Foundation + Written May 1989 by Mike Haertel. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 1, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + + The author may be reached (Email) at the address mike@ai.mit.edu, + or (US mail) as Mike Haertel c/o Free Software Foundation. */ + +#ifndef __ONEFILE +#include "ansidecl.h" +#include +#endif /* __ONEFILE */ + +#ifdef linux +#define getpagesize() 4096 +#else +extern size_t EXFUN(__getpagesize, (NOARGS)); +#endif + +static size_t pagesize; + +PTR +DEFUN(valloc, (size), size_t size) +{ + PTR result; + unsigned int adj; + + if (pagesize == 0) + pagesize = __getpagesize(); + + result = malloc(size + pagesize); + if (result == NULL) + return NULL; + adj = (unsigned int) ((char *) result - (char *) NULL) % pagesize; + if (adj != 0) + result = (char *) result + pagesize - adj; + return result; +} diff --git a/linux-0.11-lab/newlibc/malloc/gmalloc.c.old b/linux-0.11-lab/newlibc/malloc/gmalloc.c.old new file mode 100644 index 0000000..3e96215 --- /dev/null +++ b/linux-0.11-lab/newlibc/malloc/gmalloc.c.old @@ -0,0 +1,1111 @@ + +/* gmalloc.c - THIS FILE IS AUTOMAGICALLY GENERATED SO DON'T EDIT IT. */ + +/* Single-file skeleton for GNU malloc. + Copyright 1989 Free Software Foundation + Written May 1989 by Mike Haertel. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 1, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + + The author may be reached (Email) at the address mike@ai.mit.edu, + or (US mail) as Mike Haertel c/o Free Software Foundation. */ + +#define __ONEFILE + +/* DO NOT DELETE THIS LINE -- ansidecl.h INSERTED HERE. */ +/* Copyright (C) 1989 Free Software Foundation, Inc. +This file is part of the GNU C Library. + +The GNU C Library is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 1, or (at your option) +any later version. + +The GNU C Library is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with the GNU C Library; see the file COPYING. If not, write to +the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ + +/* ANSI and traditional C compatibility macros + + ANSI C is assumed if __STDC__ is #defined. + + Macros + PTR - Generic pointer type + LONG_DOUBLE - `long double' type + CONST - `const' keyword + VOLATILE - `volatile' keyword + SIGNED - `signed' keyword + PTRCONST - Generic const pointer (void *const) + + EXFUN(name, prototype) - declare external function NAME + with prototype PROTOTYPE + DEFUN(name, arglist, args) - define function NAME with + args ARGLIST of types in ARGS + DEFUN_VOID(name) - define function NAME with no args + AND - argument separator for ARGS + NOARGS - null arglist + DOTS - `...' in args + + For example: + extern int EXFUN(printf, (CONST char *format DOTS)); + int DEFUN(fprintf, (stream, format), + FILE *stream AND CONST char *format DOTS) { ... } + void DEFUN_VOID(abort) { ... } +*/ + +#ifndef _ANSIDECL_H + +#define _ANSIDECL_H 1 + + +/* Every source file includes this file, + so they will all get the switch for lint. */ +/* LINTLIBRARY */ + + +#ifdef __STDC__ + +#define PTR void * +#define PTRCONST void *CONST +#define LONG_DOUBLE long double + +#define AND , +#define NOARGS void +#define CONST const +#define VOLATILE volatile +#define SIGNED signed +#define DOTS , ... + +#define EXFUN(name, proto) name proto +#define DEFUN(name, arglist, args) name(args) +#define DEFUN_VOID(name) name(NOARGS) + +#else /* Not ANSI C. */ + +#define PTR char * +#define PTRCONST PTR +#define LONG_DOUBLE double + +#define AND ; +#define NOARGS +#define CONST +#define VOLATILE +#define SIGNED +#define DOTS + +#define EXFUN(name, proto) name() +#define DEFUN(name, arglist, args) name arglist args; +#define DEFUN_VOID(name) name() + +#endif /* ANSI C. */ + + +#endif /* ansidecl.h */ + +#ifdef __STDC__ +#include +#else +/* DO NOT DELETE THIS LINE -- limits.h INSERTED HERE. */ +/* Number of bits in a `char'. */ +#define CHAR_BIT 8 + +/* No multibyte characters supported yet. */ +#define MB_LEN_MAX 1 + +/* Minimum and maximum values a `signed char' can hold. */ +#define SCHAR_MIN -128 +#define SCHAR_MAX 127 + +/* Maximum value an `unsigned char' can hold. (Minimum is 0). */ +#define UCHAR_MAX 255U + +/* Minimum and maximum values a `char' can hold. */ +#ifdef __CHAR_UNSIGNED__ +#define CHAR_MIN 0 +#define CHAR_MAX 255U +#else +#define CHAR_MIN -128 +#define CHAR_MAX 127 +#endif + +/* Minimum and maximum values a `signed short int' can hold. */ +#define SHRT_MIN -32768 +#define SHRT_MAX 32767 + +/* Maximum value an `unsigned short int' can hold. (Minimum is 0). */ +#define USHRT_MAX 65535U + +/* Minimum and maximum values a `signed int' can hold. */ +#define INT_MIN -2147483648 +#define INT_MAX 2147483647 + +/* Maximum value an `unsigned int' can hold. (Minimum is 0). */ +#define UINT_MAX 4294967295U + +/* Minimum and maximum values a `signed long int' can hold. + (Same as `int'). */ +#define LONG_MIN (-LONG_MAX-1) +#define LONG_MAX 2147483647 + +/* Maximum value an `unsigned long int' can hold. (Minimum is 0). */ +#define ULONG_MAX 4294967295U +#endif + +#ifdef __STDC__ +#include +#else +/* DO NOT DELETE THIS LINE -- stddef.h INSERTED HERE. */ +#ifndef _STDDEF_H +#define _STDDEF_H + +/* Signed type of difference of two pointers. */ + +typedef long ptrdiff_t; + +/* Unsigned type of `sizeof' something. */ + +#ifndef _SIZE_T /* in case has defined it. */ +#define _SIZE_T +typedef unsigned long size_t; +#endif /* _SIZE_T */ + +/* A null pointer constant. */ + +#undef NULL /* in case has defined it. */ +#define NULL 0 + +/* Offset of member MEMBER in a struct of type TYPE. */ + +#define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER) + +#endif /* _STDDEF_H */ +#endif + +/* DO NOT DELETE THIS LINE -- stdlib.h INSERTED HERE. */ +/* Fake stdlib.h supplying the stuff needed by malloc. */ + +#ifndef __ONEFILE +#include +#endif + +extern void EXFUN(abort, (void)); +extern void EXFUN(free, (PTR)); +extern PTR EXFUN(malloc, (size_t)); +extern PTR EXFUN(realloc, (PTR, size_t)); + +/* DO NOT DELETE THIS LINE -- string.h INSERTED HERE. */ +/* Fake string.h supplying stuff used by malloc. */ +#ifndef __ONEFILE +#include +#endif + +extern PTR EXFUN(memcpy, (PTR, PTR, size_t)); +extern PTR EXFUN(memset, (PTR, int, size_t)); +#define memmove memcpy + +#define _MALLOC_INTERNAL +/* DO NOT DELETE THIS LINE -- malloc.h INSERTED HERE. */ +/* Declarations for `malloc' and friends. + Copyright 1989 Free Software Foundation + Written May 1989 by Mike Haertel. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 1, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + + The author may be reached (Email) at the address mike@@ai.mit.edu, + or (US mail) as Mike Haertel c/o Free Software Foundation. */ + +#ifndef _MALLOC_H + +#define _MALLOC_H 1 + +#ifndef __ONEFILE +#define __need_NULL +#define __need_size_t +#define __need_ptrdiff_t +#include +#endif + +#ifdef _MALLOC_INTERNAL + +#ifndef __ONEFILE +#include +#endif + +/* The allocator divides the heap into blocks of fixed size; large + requests receive one or more whole blocks, and small requests + receive a fragment of a block. Fragment sizes are powers of two, + and all fragments of a block are the same size. When all the + fragments in a block have been freed, the block itself is freed. */ +#define INT_BIT (CHAR_BIT * sizeof(int)) +#define BLOCKLOG (INT_BIT > 16 ? 12 : 9) +#define BLOCKSIZE (1 << BLOCKLOG) +#define BLOCKIFY(SIZE) (((SIZE) + BLOCKSIZE - 1) / BLOCKSIZE) + +/* Determine the amount of memory spanned by the initial heap table + (not an absolute limit). */ +#define HEAP (INT_BIT > 16 ? 4194304 : 65536) + +/* Number of contiguous free blocks allowed to build up at the end of + memory before they will be returned to the system. */ +#define FINAL_FREE_BLOCKS 8 + +/* Where to start searching the free list when looking for new memory. + The two possible values are 0 and _heapindex. Starting at 0 seems + to reduce total memory usage, while starting at _heapindex seems to + run faster. */ +#define MALLOC_SEARCH_START _heapindex + +/* Data structure giving per-block information. */ +typedef union + { + struct + { + /* Zero for a large block, or positive giving the + logarithm to the base two of the fragment size. */ + int type; + + union + { + struct + { + size_t nfree; /* Free fragments in a fragmented block. */ + size_t first; /* First free fragment of the block. */ + } frag; + /* Size (in blocks) of a large cluster. */ + size_t size; + } info; + } busy; + struct + { + size_t size; /* Size (in blocks) of a free cluster. */ + size_t next; /* Index of next free cluster. */ + size_t prev; /* Index of previous free cluster. */ + } free; + } malloc_info; + +/* Pointer to first block of the heap. */ +extern char *_heapbase; + +/* Table indexed by block number giving per-block information. */ +extern malloc_info *_heapinfo; + +/* Address to block number and vice versa. */ +#define BLOCK(A) (((char *) (A) - _heapbase) / BLOCKSIZE + 1) +#define ADDRESS(B) ((PTR) (((B) - 1) * BLOCKSIZE + _heapbase)) + +/* Current search index for the heap table. */ +extern size_t _heapindex; + +/* Limit of valid info table indices. */ +extern size_t _heaplimit; + +/* Doubly linked lists of free fragments. */ +struct list + { + struct list *next; + struct list *prev; + }; + +/* Free list headers for each fragment size. */ +extern struct list _fraghead[]; + +/* Instrumentation. */ +extern size_t _chunks_used; +extern size_t _bytes_used; +extern size_t _chunks_free; +extern size_t _bytes_free; + +#endif /* _MALLOC_INTERNAL. */ + +/* Underlying allocation function; successive calls should + return contiguous pieces of memory. */ +extern PTR EXFUN((*__morecore), (ptrdiff_t __size)); + +/* Default value of previous. */ +extern PTR EXFUN(__default_morecore, (ptrdiff_t __size)); + +/* Flag whether malloc has been called. */ +extern int __malloc_initialized; + +/* Hooks for debugging versions. */ +extern void EXFUN((*__free_hook), (PTR __ptr)); +extern PTR EXFUN((*__malloc_hook), (size_t __size)); +extern PTR EXFUN((*__realloc_hook), (PTR __ptr, size_t __size)); + +/* Activate a standard collection of debugging hooks. */ +extern void EXFUN(mcheck, (NOARGS)); + +/* Statistics available to the user. */ +struct mstats + { + size_t bytes_total; /* Total size of the heap. */ + size_t chunks_used; /* Chunks allocated by the user. */ + size_t bytes_used; /* Byte total of user-allocated chunks. */ + size_t chunks_free; /* Chunks in the free list. */ + size_t bytes_free; /* Byte total of chunks in the free list. */ + }; + +/* Pick up the current statistics. */ +extern struct mstats EXFUN(mstats, (NOARGS)); + +#endif /* malloc.h */ + +/* DO NOT DELETE THIS LINE -- free.c INSERTED HERE. */ +/* Free a block of memory allocated by `malloc'. + Copyright 1989 Free Software Foundation + Written May 1989 by Mike Haertel. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 1, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + + The author may be reached (Email) at the address mike@ai.mit.edu, + or (US mail) as Mike Haertel c/o Free Software Foundation. */ + +#ifndef __ONEFILE +#include "ansidecl.h" +#include +#include + +#define _MALLOC_INTERNAL +#include "malloc.h" +#endif /* __ONEFILE */ + +/* Debugging hook for free. */ +void EXFUN((*__free_hook), (PTR __ptr)); + +/* Return memory to the heap. */ +void +DEFUN(free, (ptr), PTR ptr) +{ + int type; + size_t block, blocks; + register size_t i; + struct list *prev, *next; + + if (ptr == NULL) + return; + + if (__free_hook != NULL) + { + (*__free_hook)(ptr); + return; + } + + block = BLOCK(ptr); + + type = _heapinfo[block].busy.type; + switch (type) + { + case 0: + /* Get as many statistics as early as we can. */ + --_chunks_used; + _bytes_used -= _heapinfo[block].busy.info.size * BLOCKSIZE; + _bytes_free += _heapinfo[block].busy.info.size * BLOCKSIZE; + + /* Find the free cluster previous to this one in the free list. + Start searching at the last block referenced; this may benefit + programs with locality of allocation. */ + i = _heapindex; + if (i > block) + while (i > block) + i = _heapinfo[i].free.prev; + else + { + do + i = _heapinfo[i].free.next; + while (i > 0 && i < block); + i = _heapinfo[i].free.prev; + } + + /* Determine how to link this block into the free list. */ + if (block == i + _heapinfo[i].free.size) + { + /* Coalesce this block with its predecessor. */ + _heapinfo[i].free.size += _heapinfo[block].busy.info.size; + block = i; + } + else + { + /* Really link this block back into the free list. */ + _heapinfo[block].free.size = _heapinfo[block].busy.info.size; + _heapinfo[block].free.next = _heapinfo[i].free.next; + _heapinfo[block].free.prev = i; + _heapinfo[i].free.next = block; + _heapinfo[_heapinfo[block].free.next].free.prev = block; + ++_chunks_free; + } + + /* Now that the block is linked in, see if we can coalesce it + with its successor (by deleting its successor from the list + and adding in its size). */ + if (block + _heapinfo[block].free.size == _heapinfo[block].free.next) + { + _heapinfo[block].free.size + += _heapinfo[_heapinfo[block].free.next].free.size; + _heapinfo[block].free.next + = _heapinfo[_heapinfo[block].free.next].free.next; + _heapinfo[_heapinfo[block].free.next].free.prev = block; + --_chunks_free; + } + + /* Now see if we can return stuff to the system. */ + blocks = _heapinfo[block].free.size; + if (blocks >= FINAL_FREE_BLOCKS && block + blocks == _heaplimit + && (*__morecore)(0) == ADDRESS(block + blocks)) + { + register size_t bytes = blocks * BLOCKSIZE; + _heaplimit -= blocks; + (*__morecore)(- bytes); + _heapinfo[_heapinfo[block].free.prev].free.next + = _heapinfo[block].free.next; + _heapinfo[_heapinfo[block].free.next].free.prev + = _heapinfo[block].free.prev; + block = _heapinfo[block].free.prev; + --_chunks_free; + _bytes_free -= bytes; + } + + /* Set the next search to begin at this block. */ + _heapindex = block; + break; + + default: + /* Do some of the statistics. */ + --_chunks_used; + _bytes_used -= 1 << type; + ++_chunks_free; + _bytes_free += 1 << type; + + /* Get the address of the first free fragment in this block. */ + prev = (struct list *) ((char *) ADDRESS(block) + + (_heapinfo[block].busy.info.frag.first << type)); + + if (_heapinfo[block].busy.info.frag.nfree == (BLOCKSIZE >> type) - 1) + { + /* If all fragments of this block are free, remove them + from the fragment list and free the whole block. */ + next = prev; + for (i = 1; i < BLOCKSIZE >> type; ++i) + next = next->next; + prev->prev->next = next; + if (next != NULL) + next->prev = prev->prev; + _heapinfo[block].busy.type = 0; + _heapinfo[block].busy.info.size = 1; + + /* Keep the statistics accurate. */ + ++_chunks_used; + _bytes_used += BLOCKSIZE; + _chunks_free -= BLOCKSIZE >> type; + _bytes_free -= BLOCKSIZE; + + free(ADDRESS(block)); + } + else if (_heapinfo[block].busy.info.frag.nfree != 0) + { + /* If some fragments of this block are free, link this + fragment into the fragment list after the first free + fragment of this block. */ + next = (struct list *) ptr; + next->next = prev->next; + next->prev = prev; + prev->next = next; + if (next->next != NULL) + next->next->prev = next; + ++_heapinfo[block].busy.info.frag.nfree; + } + else + { + /* No fragments of this block are free, so link this + fragment into the fragment list and announce that + it is the first free fragment of this block. */ + prev = (struct list *) ptr; + _heapinfo[block].busy.info.frag.nfree = 1; + _heapinfo[block].busy.info.frag.first = (unsigned int) + (((char *) ptr - (char *) NULL) % BLOCKSIZE >> type); + prev->next = _fraghead[type].next; + prev->prev = &_fraghead[type]; + prev->prev->next = prev; + if (prev->next != NULL) + prev->next->prev = prev; + } + break; + } +} + +/* DO NOT DELETE THIS LINE -- malloc.c INSERTED HERE. */ +/* Memory allocator `malloc'. + Copyright 1989 Free Software Foundation + Written May 1989 by Mike Haertel. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 1, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + + The author may be reached (Email) at the address mike@ai.mit.edu, + or (US mail) as Mike Haertel c/o Free Software Foundation. */ + +#ifndef __ONEFILE +#include "ansidecl.h" +#include +#include +#include + +#define _MALLOC_INTERNAL +#include "malloc.h" +#endif /* __ONEFILE */ + +/* How to really get more memory. */ +PTR EXFUN((*__morecore), (ptrdiff_t __size)) = __default_morecore; + +/* Debugging hook for `malloc'. */ +PTR EXFUN((*__malloc_hook), (size_t __size)); + +/* Pointer to the base of the first block. */ +char *_heapbase; + +/* Block information table. */ +malloc_info *_heapinfo; + +/* Number of info entries. */ +static size_t heapsize; + +/* Search index in the info table. */ +size_t _heapindex; + +/* Limit of valid info table indices. */ +size_t _heaplimit; + +/* Free lists for each fragment size. */ +struct list _fraghead[BLOCKLOG]; + +/* Instrumentation. */ +size_t _chunks_used; +size_t _bytes_used; +size_t _chunks_free; +size_t _bytes_free; + +/* Are you experienced? */ +int __malloc_initialized; + +/* Aligned allocation. */ +static PTR +DEFUN(align, (size), size_t size) +{ + PTR result; + unsigned int adj; + + result = (*__morecore)(size); + adj = (unsigned int) ((char *) result - (char *) NULL) % BLOCKSIZE; + if (adj != 0) + { + adj = BLOCKSIZE - adj; + (void) (*__morecore)(adj); + result = (char *) result + adj; + } + return result; +} + +/* Set everything up and remember that we have. */ +static int +DEFUN_VOID(initialize) +{ + heapsize = HEAP / BLOCKSIZE; + _heapinfo = (malloc_info *) align(heapsize * sizeof(malloc_info)); + if (_heapinfo == NULL) + return 0; + memset(_heapinfo, 0, heapsize * sizeof(malloc_info)); + _heapinfo[0].free.size = 0; + _heapinfo[0].free.next = _heapinfo[0].free.prev = 0; + _heapindex = 0; + _heapbase = (char *) _heapinfo; + __malloc_initialized = 1; + return 1; +} + +/* Get neatly aligned memory, initializing or + growing the heap info table as necessary. */ +static PTR +DEFUN(morecore, (size), size_t size) +{ + PTR result; + malloc_info *newinfo, *oldinfo; + size_t newsize; + + result = align(size); + if (result == NULL) + return NULL; + + /* Check if we need to grow the info table. */ + if (BLOCK((char *) result + size) > heapsize) + { + newsize = heapsize; + while (BLOCK((char *) result + size) > newsize) + newsize *= 2; + newinfo = (malloc_info *) align(newsize * sizeof(malloc_info)); + if (newinfo == NULL) + { + (*__morecore)(- size); + return NULL; + } + memset(newinfo, 0, newsize * sizeof(malloc_info)); + memcpy(newinfo, _heapinfo, heapsize * sizeof(malloc_info)); + oldinfo = _heapinfo; + newinfo[BLOCK(oldinfo)].busy.type = 0; + newinfo[BLOCK(oldinfo)].busy.info.size + = BLOCKIFY(heapsize * sizeof(malloc_info)); + _heapinfo = newinfo; + free(oldinfo); + heapsize = newsize; + } + + _heaplimit = BLOCK((char *) result + size); + return result; +} + +void * calloc(size_t n, size_t size) +{ + void * tmp; + size_t total = n*size; + + if (tmp=malloc(total)) + memset(tmp,0,total); + return tmp; +} + +/* Allocate memory from the heap. */ +PTR +DEFUN(malloc, (size), size_t size) +{ + PTR result; + size_t block, blocks, lastblocks, start; + register size_t i; + struct list *next; + + if (size == 0) + return NULL; + + if (__malloc_hook != NULL) + return (*__malloc_hook)(size); + + if (!__malloc_initialized) + if (!initialize()) + return NULL; + + if (size < sizeof(struct list)) + size = sizeof(struct list); + + /* Determine the allocation policy based on the request size. */ + if (size <= BLOCKSIZE / 2) + { + /* Small allocation to receive a fragment of a block. + Determine the logarithm to base two of the fragment size. */ + register size_t log = 1; + --size; + while ((size /= 2) != 0) + ++log; + + /* Look in the fragment lists for a + free fragment of the desired size. */ + next = _fraghead[log].next; + if (next != NULL) + { + /* There are free fragments of this size. + Pop a fragment out of the fragment list and return it. + Update the block's nfree and first counters. */ + result = (PTR) next; + next->prev->next = next->next; + if (next->next != NULL) + next->next->prev = next->prev; + block = BLOCK(result); + if (--_heapinfo[block].busy.info.frag.nfree != 0) + _heapinfo[block].busy.info.frag.first = (unsigned int) + (((char *) next->next - (char *) NULL) % BLOCKSIZE) >> log; + + /* Update the statistics. */ + ++_chunks_used; + _bytes_used += 1 << log; + --_chunks_free; + _bytes_free -= 1 << log; + } + else + { + /* No free fragments of the desired size, so get a new block + and break it into fragments, returning the first. */ + result = malloc(BLOCKSIZE); + if (result == NULL) + return NULL; + + /* Link all fragments but the first into the free list. */ + for (i = 1; i < BLOCKSIZE >> log; ++i) + { + next = (struct list *) ((char *) result + (i << log)); + next->next = _fraghead[log].next; + next->prev = &_fraghead[log]; + next->prev->next = next; + if (next->next != NULL) + next->next->prev = next; + } + + /* Initialize the nfree and first counters for this block. */ + block = BLOCK(result); + _heapinfo[block].busy.type = log; + _heapinfo[block].busy.info.frag.nfree = i - 1; + _heapinfo[block].busy.info.frag.first = i - 1; + + _chunks_free += (BLOCKSIZE >> log) - 1; + _bytes_free += BLOCKSIZE - (1 << log); + } + } + else + { + /* Large allocation to receive one or more blocks. + Search the free list in a circle starting at the last place visited. + If we loop completely around without finding a large enough + space we will have to get more memory from the system. */ + blocks = BLOCKIFY(size); + start = block = MALLOC_SEARCH_START; + while (_heapinfo[block].free.size < blocks) + { + block = _heapinfo[block].free.next; + if (block == start) + { + /* Need to get more from the system. Check to see if + the new core will be contiguous with the final free + block; if so we don't need to get as much. */ + block = _heapinfo[0].free.prev; + lastblocks = _heapinfo[block].free.size; + if (_heaplimit != 0 && block + lastblocks == _heaplimit && + (*__morecore)(0) == ADDRESS(block + lastblocks) && + (morecore((blocks - lastblocks) * BLOCKSIZE)) != NULL) + { + _heapinfo[block].free.size = blocks; + _bytes_free += (blocks - lastblocks) * BLOCKSIZE; + continue; + } + result = morecore(blocks * BLOCKSIZE); + if (result == NULL) + return NULL; + block = BLOCK(result); + _heapinfo[block].busy.type = 0; + _heapinfo[block].busy.info.size = blocks; + ++_chunks_used; + _bytes_used += blocks * BLOCKSIZE; + return result; + } + } + + /* At this point we have found a suitable free list entry. + Figure out how to remove what we need from the list. */ + result = ADDRESS(block); + if (_heapinfo[block].free.size > blocks) + { + /* The block we found has a bit left over, + so relink the tail end back into the free list. */ + _heapinfo[block + blocks].free.size + = _heapinfo[block].free.size - blocks; + _heapinfo[block + blocks].free.next + = _heapinfo[block].free.next; + _heapinfo[block + blocks].free.prev + = _heapinfo[block].free.prev; + _heapinfo[_heapinfo[block].free.prev].free.next + = _heapinfo[_heapinfo[block].free.next].free.prev + = _heapindex = block + blocks; + } + else + { + /* The block exactly matches our requirements, + so just remove it from the list. */ + _heapinfo[_heapinfo[block].free.next].free.prev + = _heapinfo[block].free.prev; + _heapinfo[_heapinfo[block].free.prev].free.next + = _heapindex = _heapinfo[block].free.next; + --_chunks_free; + } + + _heapinfo[block].busy.type = 0; + _heapinfo[block].busy.info.size = blocks; + ++_chunks_used; + _bytes_used += blocks * BLOCKSIZE; + _bytes_free -= blocks * BLOCKSIZE; + } + + return result; +} + +/* DO NOT DELETE THIS LINE -- realloc.c INSERTED HERE. */ +/* Change the size of a block allocated by `malloc'. + Copyright 1989 Free Software Foundation + Written May 1989 by Mike Haertel. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 1, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + + The author may be reached (Email) at the address mike@ai.mit.edu, + or (US mail) as Mike Haertel c/o Free Software Foundation. */ + +#ifndef __ONEFILE +#include "ansidecl.h" +#include +#include + +#define _MALLOC_INTERNAL +#include "malloc.h" +#endif /* __ONEFILE */ + +#define MIN(A, B) ((A) < (B) ? (A) : (B)) + +/* Debugging hook for realloc. */ +PTR EXFUN((*__realloc_hook), (PTR __ptr, size_t __size)); + +/* Resize the given region to the new size, returning a pointer + to the (possibly moved) region. This is optimized for speed; + some benchmarks seem to indicate that greater compactness is + achieved by unconditionally allocating and copying to a + new region. This module has incestuous knowledge of the + internals of both free and malloc. */ +PTR +DEFUN(realloc, (ptr, size), PTR ptr AND size_t size) +{ + PTR result; + int type; + size_t block, blocks, oldlimit; + + if (size == 0) + { + free(ptr); + return NULL; + } + else if (ptr == NULL) + return malloc(size); + + if (__realloc_hook != NULL) + return (*__realloc_hook)(ptr, size); + + block = BLOCK(ptr); + + type = _heapinfo[block].busy.type; + switch (type) + { + case 0: + /* Maybe reallocate a large block to a small fragment. */ + if (size <= BLOCKSIZE / 2) + { + result = malloc(size); + if (result != NULL) + { + memcpy(result, ptr, size); + free(ptr); + return result; + } + } + + /* The new size is a large allocation as well; + see if we can hold it in place. */ + blocks = BLOCKIFY(size); + if (blocks < _heapinfo[block].busy.info.size) + { + /* The new size is smaller; return + excess memory to the free list. */ + _heapinfo[block + blocks].busy.type = 0; + _heapinfo[block + blocks].busy.info.size + = _heapinfo[block].busy.info.size - blocks; + _heapinfo[block].busy.info.size = blocks; + free(ADDRESS(block + blocks)); + result = ptr; + } + else if (blocks == _heapinfo[block].busy.info.size) + /* No size change necessary. */ + result = ptr; + else + { + /* Won't fit, so allocate a new region that will. + Free the old region first in case there is sufficient + adjacent free space to grow without moving. */ + blocks = _heapinfo[block].busy.info.size; + /* Prevent free from actually returning memory to the system. */ + oldlimit = _heaplimit; + _heaplimit = 0; + free(ptr); + _heaplimit = oldlimit; + result = malloc(size); + if (result == NULL) + { + (void) malloc(blocks * BLOCKSIZE); + return NULL; + } + if (ptr != result) + memmove(result, ptr, blocks * BLOCKSIZE); + } + break; + + default: + /* Old size is a fragment; type is logarithm + to base two of the fragment size. */ + if (size > 1 << (type - 1) && size <= 1 << type) + /* The new size is the same kind of fragment. */ + result = ptr; + else + { + /* The new size is different; allocate a new space, + and copy the lesser of the new size and the old. */ + result = malloc(size); + if (result == NULL) + return NULL; + memcpy(result, ptr, MIN(size, 1 << type)); + free(ptr); + } + break; + } + + return result; +} + +/* DO NOT DELETE THIS LINE -- unix.c INSERTED HERE. */ +/* unix.c - get more memory with a UNIX system call. + Copyright 1989 Free Software Foundation + Written May 1989 by Mike Haertel. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 1, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + + The author may be reached (Email) at the address mike@ai.mit.edu, + or (US mail) as Mike Haertel c/o Free Software Foundation. */ + +#ifndef __ONEFILE +#include "ansidecl.h" +#include + +#define _MALLOC_INTERNAL +#include "malloc.h" +#endif /* __ONEFILE */ + +extern PTR EXFUN(sbrk, (ptrdiff_t size)); + +PTR +DEFUN(__default_morecore, (size), ptrdiff_t size) +{ + PTR result; + + result = sbrk(size); + if (result == (PTR) -1) + return NULL; + return result; +} + +#define __getpagesize getpagesize +/* DO NOT DELETE THIS LINE -- valloc.c INSERTED HERE. */ +/* Allocate memory on a page boundary. + Copyright 1989 Free Software Foundation + Written May 1989 by Mike Haertel. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 1, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + + The author may be reached (Email) at the address mike@ai.mit.edu, + or (US mail) as Mike Haertel c/o Free Software Foundation. */ + +#ifndef __ONEFILE +#include "ansidecl.h" +#include +#endif /* __ONEFILE */ + +#define pagesize 4096 + +PTR +DEFUN(valloc, (size), size_t size) +{ + PTR result; + unsigned int adj; + + result = malloc(size + pagesize); + if (result == NULL) + return NULL; + adj = (unsigned int) ((char *) result - (char *) NULL) % pagesize; + if (adj != 0) + result = (char *) result + pagesize - adj; + return result; +} diff --git a/linux-0.11-lab/newlibc/malloc/gmalloc.sed b/linux-0.11-lab/newlibc/malloc/gmalloc.sed new file mode 100644 index 0000000..f9892a4 --- /dev/null +++ b/linux-0.11-lab/newlibc/malloc/gmalloc.sed @@ -0,0 +1,15 @@ +1i\ +\ +/* gmalloc.c - THIS FILE IS AUTOMAGICALLY GENERATED SO DON'T EDIT IT. */\ + +/DO NOT DELETE THIS LINE -- ansidecl.h INSERTED HERE/r ansidecl.h +/DO NOT DELETE THIS LINE -- limits.h INSERTED HERE/r limits.h +/DO NOT DELETE THIS LINE -- stddef.h INSERTED HERE/r stddef.h +/DO NOT DELETE THIS LINE -- stdlib.h INSERTED HERE/r stdlib.h +/DO NOT DELETE THIS LINE -- string.h INSERTED HERE/r string.h +/DO NOT DELETE THIS LINE -- malloc.h INSERTED HERE/r malloc.h +/DO NOT DELETE THIS LINE -- free.c INSERTED HERE/r free.c +/DO NOT DELETE THIS LINE -- malloc.c INSERTED HERE/r malloc.c +/DO NOT DELETE THIS LINE -- realloc.c INSERTED HERE/r realloc.c +/DO NOT DELETE THIS LINE -- unix.c INSERTED HERE/r unix.c +/DO NOT DELETE THIS LINE -- valloc.c INSERTED HERE/r valloc.c diff --git a/linux-0.11-lab/newlibc/malloc/gmalloc.skel b/linux-0.11-lab/newlibc/malloc/gmalloc.skel new file mode 100644 index 0000000..3312bcc --- /dev/null +++ b/linux-0.11-lab/newlibc/malloc/gmalloc.skel @@ -0,0 +1,54 @@ +/* Single-file skeleton for GNU malloc. + Copyright 1989 Free Software Foundation + Written May 1989 by Mike Haertel. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 1, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + + The author may be reached (Email) at the address mike@ai.mit.edu, + or (US mail) as Mike Haertel c/o Free Software Foundation. */ + +#define __ONEFILE + +/* DO NOT DELETE THIS LINE -- ansidecl.h INSERTED HERE. */ + +#ifdef __STDC__ +#include +#else +/* DO NOT DELETE THIS LINE -- limits.h INSERTED HERE. */ +#endif + +#ifdef __STDC__ +#include +#else +/* DO NOT DELETE THIS LINE -- stddef.h INSERTED HERE. */ +#endif + +/* DO NOT DELETE THIS LINE -- stdlib.h INSERTED HERE. */ + +/* DO NOT DELETE THIS LINE -- string.h INSERTED HERE. */ + +#define _MALLOC_INTERNAL +/* DO NOT DELETE THIS LINE -- malloc.h INSERTED HERE. */ + +/* DO NOT DELETE THIS LINE -- free.c INSERTED HERE. */ + +/* DO NOT DELETE THIS LINE -- malloc.c INSERTED HERE. */ + +/* DO NOT DELETE THIS LINE -- realloc.c INSERTED HERE. */ + +/* DO NOT DELETE THIS LINE -- unix.c INSERTED HERE. */ + +#define __getpagesize getpagesize +/* DO NOT DELETE THIS LINE -- valloc.c INSERTED HERE. */ diff --git a/linux-0.11-lab/newlibc/malloc/limits.h b/linux-0.11-lab/newlibc/malloc/limits.h new file mode 100644 index 0000000..74ae1fb --- /dev/null +++ b/linux-0.11-lab/newlibc/malloc/limits.h @@ -0,0 +1,43 @@ +/* Number of bits in a `char'. */ +#define CHAR_BIT 8 + +/* No multibyte characters supported yet. */ +#define MB_LEN_MAX 1 + +/* Minimum and maximum values a `signed char' can hold. */ +#define SCHAR_MIN -128 +#define SCHAR_MAX 127 + +/* Maximum value an `unsigned char' can hold. (Minimum is 0). */ +#define UCHAR_MAX 255U + +/* Minimum and maximum values a `char' can hold. */ +#ifdef __CHAR_UNSIGNED__ +#define CHAR_MIN 0 +#define CHAR_MAX 255U +#else +#define CHAR_MIN -128 +#define CHAR_MAX 127 +#endif + +/* Minimum and maximum values a `signed short int' can hold. */ +#define SHRT_MIN -32768 +#define SHRT_MAX 32767 + +/* Maximum value an `unsigned short int' can hold. (Minimum is 0). */ +#define USHRT_MAX 65535U + +/* Minimum and maximum values a `signed int' can hold. */ +#define INT_MIN -2147483648 +#define INT_MAX 2147483647 + +/* Maximum value an `unsigned int' can hold. (Minimum is 0). */ +#define UINT_MAX 4294967295U + +/* Minimum and maximum values a `signed long int' can hold. + (Same as `int'). */ +#define LONG_MIN (-LONG_MAX-1) +#define LONG_MAX 2147483647 + +/* Maximum value an `unsigned long int' can hold. (Minimum is 0). */ +#define ULONG_MAX 4294967295U diff --git a/linux-0.11-lab/newlibc/malloc/malloc.c.1 b/linux-0.11-lab/newlibc/malloc/malloc.c.1 new file mode 100644 index 0000000..545728c --- /dev/null +++ b/linux-0.11-lab/newlibc/malloc/malloc.c.1 @@ -0,0 +1,308 @@ +/* Memory allocator `malloc'. + Copyright 1989 Free Software Foundation + Written May 1989 by Mike Haertel. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 1, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + + The author may be reached (Email) at the address mike@ai.mit.edu, + or (US mail) as Mike Haertel c/o Free Software Foundation. */ + +#ifndef __ONEFILE +#include "ansidecl.h" +#include +#include +#include + +#define _MALLOC_INTERNAL +#include "malloc.h" +#endif /* __ONEFILE */ + +/* How to really get more memory. */ +PTR EXFUN((*__morecore), (ptrdiff_t __size)) = __default_morecore; + +/* Debugging hook for `malloc'. */ +PTR EXFUN((*__malloc_hook), (size_t __size)); + +/* Pointer to the base of the first block. */ +char *_heapbase; + +/* Block information table. */ +malloc_info *_heapinfo; + +/* Number of info entries. */ +static size_t heapsize; + +/* Search index in the info table. */ +size_t _heapindex; + +/* Limit of valid info table indices. */ +size_t _heaplimit; + +/* Free lists for each fragment size. */ +struct list _fraghead[BLOCKLOG]; + +/* Instrumentation. */ +size_t _chunks_used; +size_t _bytes_used; +size_t _chunks_free; +size_t _bytes_free; + +/* Are you experienced? */ +int __malloc_initialized; + +/* Aligned allocation. */ +static PTR +DEFUN(align, (size), size_t size) +{ + PTR result; + unsigned int adj; + + result = (*__morecore)(size); + adj = (unsigned int) ((char *) result - (char *) NULL) % BLOCKSIZE; + if (adj != 0) + { + adj = BLOCKSIZE - adj; + (void) (*__morecore)(adj); + result = (char *) result + adj; + } + return result; +} + +/* Set everything up and remember that we have. */ +static int +DEFUN_VOID(initialize) +{ + heapsize = HEAP / BLOCKSIZE; + _heapinfo = (malloc_info *) align(heapsize * sizeof(malloc_info)); + if (_heapinfo == NULL) + return 0; + memset(_heapinfo, 0, heapsize * sizeof(malloc_info)); + _heapinfo[0].free.size = 0; + _heapinfo[0].free.next = _heapinfo[0].free.prev = 0; + _heapindex = 0; + _heapbase = (char *) _heapinfo; + __malloc_initialized = 1; + return 1; +} + +/* Get neatly aligned memory, initializing or + growing the heap info table as necessary. */ +static PTR +DEFUN(morecore, (size), size_t size) +{ + PTR result; + malloc_info *newinfo, *oldinfo; + size_t newsize; + + result = align(size); + if (result == NULL) + return NULL; + + /* Check if we need to grow the info table. */ + if (BLOCK((char *) result + size) > heapsize) + { + newsize = heapsize; + while (BLOCK((char *) result + size) > newsize) + newsize *= 2; + newinfo = (malloc_info *) align(newsize * sizeof(malloc_info)); + if (newinfo == NULL) + { + (*__morecore)(- size); + return NULL; + } + memset(newinfo, 0, newsize * sizeof(malloc_info)); + memcpy(newinfo, _heapinfo, heapsize * sizeof(malloc_info)); + oldinfo = _heapinfo; + newinfo[BLOCK(oldinfo)].busy.type = 0; + newinfo[BLOCK(oldinfo)].busy.info.size + = BLOCKIFY(heapsize * sizeof(malloc_info)); + _heapinfo = newinfo; + free(oldinfo); + heapsize = newsize; + } + + _heaplimit = BLOCK((char *) result + size); + return result; +} + +void * calloc(size_t n, size_t size) +{ + void * tmp; + size_t total = n*size; + + if (tmp=malloc(total)) + memset(tmp,0,total); + return tmp; +} + +/* Allocate memory from the heap. */ +PTR +DEFUN(malloc, (size), size_t size) +{ + PTR result; + size_t block, blocks, lastblocks, start; + register size_t i; + struct list *next; + + if (size == 0) + return NULL; + + if (__malloc_hook != NULL) + return (*__malloc_hook)(size); + + if (!__malloc_initialized) + if (!initialize()) + return NULL; + + if (size < sizeof(struct list)) + size = sizeof(struct list); + + /* Determine the allocation policy based on the request size. */ + if (size <= BLOCKSIZE / 2) + { + /* Small allocation to receive a fragment of a block. + Determine the logarithm to base two of the fragment size. */ + register size_t log = 1; + --size; + while ((size /= 2) != 0) + ++log; + + /* Look in the fragment lists for a + free fragment of the desired size. */ + next = _fraghead[log].next; + if (next != NULL) + { + /* There are free fragments of this size. + Pop a fragment out of the fragment list and return it. + Update the block's nfree and first counters. */ + result = (PTR) next; + next->prev->next = next->next; + if (next->next != NULL) + next->next->prev = next->prev; + block = BLOCK(result); + if (--_heapinfo[block].busy.info.frag.nfree != 0) + _heapinfo[block].busy.info.frag.first = (unsigned int) + (((char *) next->next - (char *) NULL) % BLOCKSIZE) >> log; + + /* Update the statistics. */ + ++_chunks_used; + _bytes_used += 1 << log; + --_chunks_free; + _bytes_free -= 1 << log; + } + else + { + /* No free fragments of the desired size, so get a new block + and break it into fragments, returning the first. */ + result = malloc(BLOCKSIZE); + if (result == NULL) + return NULL; + + /* Link all fragments but the first into the free list. */ + for (i = 1; i < BLOCKSIZE >> log; ++i) + { + next = (struct list *) ((char *) result + (i << log)); + next->next = _fraghead[log].next; + next->prev = &_fraghead[log]; + next->prev->next = next; + if (next->next != NULL) + next->next->prev = next; + } + + /* Initialize the nfree and first counters for this block. */ + block = BLOCK(result); + _heapinfo[block].busy.type = log; + _heapinfo[block].busy.info.frag.nfree = i - 1; + _heapinfo[block].busy.info.frag.first = i - 1; + + _chunks_free += (BLOCKSIZE >> log) - 1; + _bytes_free += BLOCKSIZE - (1 << log); + } + } + else + { + /* Large allocation to receive one or more blocks. + Search the free list in a circle starting at the last place visited. + If we loop completely around without finding a large enough + space we will have to get more memory from the system. */ + blocks = BLOCKIFY(size); + start = block = MALLOC_SEARCH_START; + while (_heapinfo[block].free.size < blocks) + { + block = _heapinfo[block].free.next; + if (block == start) + { + /* Need to get more from the system. Check to see if + the new core will be contiguous with the final free + block; if so we don't need to get as much. */ + block = _heapinfo[0].free.prev; + lastblocks = _heapinfo[block].free.size; + if (_heaplimit != 0 && block + lastblocks == _heaplimit && + (*__morecore)(0) == ADDRESS(block + lastblocks) && + (morecore((blocks - lastblocks) * BLOCKSIZE)) != NULL) + { + _heapinfo[block].free.size = blocks; + _bytes_free += (blocks - lastblocks) * BLOCKSIZE; + continue; + } + result = morecore(blocks * BLOCKSIZE); + if (result == NULL) + return NULL; + block = BLOCK(result); + _heapinfo[block].busy.type = 0; + _heapinfo[block].busy.info.size = blocks; + ++_chunks_used; + _bytes_used += blocks * BLOCKSIZE; + return result; + } + } + + /* At this point we have found a suitable free list entry. + Figure out how to remove what we need from the list. */ + result = ADDRESS(block); + if (_heapinfo[block].free.size > blocks) + { + /* The block we found has a bit left over, + so relink the tail end back into the free list. */ + _heapinfo[block + blocks].free.size + = _heapinfo[block].free.size - blocks; + _heapinfo[block + blocks].free.next + = _heapinfo[block].free.next; + _heapinfo[block + blocks].free.prev + = _heapinfo[block].free.prev; + _heapinfo[_heapinfo[block].free.prev].free.next + = _heapinfo[_heapinfo[block].free.next].free.prev + = _heapindex = block + blocks; + } + else + { + /* The block exactly matches our requirements, + so just remove it from the list. */ + _heapinfo[_heapinfo[block].free.next].free.prev + = _heapinfo[block].free.prev; + _heapinfo[_heapinfo[block].free.prev].free.next + = _heapindex = _heapinfo[block].free.next; + --_chunks_free; + } + + _heapinfo[block].busy.type = 0; + _heapinfo[block].busy.info.size = blocks; + ++_chunks_used; + _bytes_used += blocks * BLOCKSIZE; + _bytes_free -= blocks * BLOCKSIZE; + } + + return result; +} diff --git a/linux-0.11-lab/newlibc/malloc/malloc.h b/linux-0.11-lab/newlibc/malloc/malloc.h new file mode 100644 index 0000000..6c77f73 --- /dev/null +++ b/linux-0.11-lab/newlibc/malloc/malloc.h @@ -0,0 +1,156 @@ +/* Declarations for `malloc' and friends. + Copyright 1989 Free Software Foundation + Written May 1989 by Mike Haertel. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 1, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + + The author may be reached (Email) at the address mike@@ai.mit.edu, + or (US mail) as Mike Haertel c/o Free Software Foundation. */ + +#ifndef _MALLOC_H + +#define _MALLOC_H 1 + +#ifndef __ONEFILE +#define __need_NULL +#define __need_size_t +#define __need_ptrdiff_t +#include +#endif + +#ifdef _MALLOC_INTERNAL + +#ifndef __ONEFILE +#include +#endif + +/* The allocator divides the heap into blocks of fixed size; large + requests receive one or more whole blocks, and small requests + receive a fragment of a block. Fragment sizes are powers of two, + and all fragments of a block are the same size. When all the + fragments in a block have been freed, the block itself is freed. */ +#define INT_BIT (CHAR_BIT * sizeof(int)) +#define BLOCKLOG (INT_BIT > 16 ? 12 : 9) +#define BLOCKSIZE (1 << BLOCKLOG) +#define BLOCKIFY(SIZE) (((SIZE) + BLOCKSIZE - 1) / BLOCKSIZE) + +/* Determine the amount of memory spanned by the initial heap table + (not an absolute limit). */ +#define HEAP (INT_BIT > 16 ? 4194304 : 65536) + +/* Number of contiguous free blocks allowed to build up at the end of + memory before they will be returned to the system. */ +#define FINAL_FREE_BLOCKS 8 + +/* Where to start searching the free list when looking for new memory. + The two possible values are 0 and _heapindex. Starting at 0 seems + to reduce total memory usage, while starting at _heapindex seems to + run faster. */ +#define MALLOC_SEARCH_START _heapindex + +/* Data structure giving per-block information. */ +typedef union + { + struct + { + /* Zero for a large block, or positive giving the + logarithm to the base two of the fragment size. */ + int type; + + union + { + struct + { + size_t nfree; /* Free fragments in a fragmented block. */ + size_t first; /* First free fragment of the block. */ + } frag; + /* Size (in blocks) of a large cluster. */ + size_t size; + } info; + } busy; + struct + { + size_t size; /* Size (in blocks) of a free cluster. */ + size_t next; /* Index of next free cluster. */ + size_t prev; /* Index of previous free cluster. */ + } free; + } malloc_info; + +/* Pointer to first block of the heap. */ +extern char *_heapbase; + +/* Table indexed by block number giving per-block information. */ +extern malloc_info *_heapinfo; + +/* Address to block number and vice versa. */ +#define BLOCK(A) (((char *) (A) - _heapbase) / BLOCKSIZE + 1) +#define ADDRESS(B) ((PTR) (((B) - 1) * BLOCKSIZE + _heapbase)) + +/* Current search index for the heap table. */ +extern size_t _heapindex; + +/* Limit of valid info table indices. */ +extern size_t _heaplimit; + +/* Doubly linked lists of free fragments. */ +struct list + { + struct list *next; + struct list *prev; + }; + +/* Free list headers for each fragment size. */ +extern struct list _fraghead[]; + +/* Instrumentation. */ +extern size_t _chunks_used; +extern size_t _bytes_used; +extern size_t _chunks_free; +extern size_t _bytes_free; + +#endif /* _MALLOC_INTERNAL. */ + +/* Underlying allocation function; successive calls should + return contiguous pieces of memory. */ +extern PTR EXFUN((*__morecore), (ptrdiff_t __size)); + +/* Default value of previous. */ +extern PTR EXFUN(__default_morecore, (ptrdiff_t __size)); + +/* Flag whether malloc has been called. */ +extern int __malloc_initialized; + +/* Hooks for debugging versions. */ +extern void EXFUN((*__free_hook), (PTR __ptr)); +extern PTR EXFUN((*__malloc_hook), (size_t __size)); +extern PTR EXFUN((*__realloc_hook), (PTR __ptr, size_t __size)); + +/* Activate a standard collection of debugging hooks. */ +extern void EXFUN(mcheck, (NOARGS)); + +/* Statistics available to the user. */ +struct mstats + { + size_t bytes_total; /* Total size of the heap. */ + size_t chunks_used; /* Chunks allocated by the user. */ + size_t bytes_used; /* Byte total of user-allocated chunks. */ + size_t chunks_free; /* Chunks in the free list. */ + size_t bytes_free; /* Byte total of chunks in the free list. */ + }; + +/* Pick up the current statistics. */ +extern struct mstats EXFUN(mstats, (NOARGS)); + +#endif /* malloc.h */ diff --git a/linux-0.11-lab/newlibc/malloc/mcheck.c b/linux-0.11-lab/newlibc/malloc/mcheck.c new file mode 100644 index 0000000..72f3360 --- /dev/null +++ b/linux-0.11-lab/newlibc/malloc/mcheck.c @@ -0,0 +1,113 @@ +/* Standard debugging hooks for `malloc'. + Copyright 1989 Free Software Foundation + Written May 1989 by Mike Haertel. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 1, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + + The author may be reached (Email) at the address mike@ai.mit.edu, + or (US mail) as Mike Haertel c/o Free Software Foundation. */ + +#include "ansidecl.h" +#include +#include "malloc.h" + +/* Old hook values. */ +static void EXFUN((*old_free_hook), (PTR ptr)); +static PTR EXFUN((*old_malloc_hook), (size_t size)); +static PTR EXFUN((*old_realloc_hook), (PTR ptr, size_t size)); + +/* Arbitrary magical numbers. */ +#define MAGICWORD 0xfedabeeb +#define MAGICBYTE ((char) 0xd7) + +struct hdr + { + size_t size; /* Exact size requested by user. */ + unsigned int magic; /* Magic number to check header integrity. */ + }; + +static void +DEFUN(checkhdr, (hdr), CONST struct hdr *hdr) +{ + if (hdr->magic != MAGICWORD || ((char *) &hdr[1])[hdr->size] != MAGICBYTE) + abort(); +} + +static void +DEFUN(freehook, (ptr), PTR ptr) +{ + struct hdr *hdr = ((struct hdr *) ptr) - 1; + checkhdr(hdr); + hdr->magic = 0; + __free_hook = old_free_hook; + free(hdr); + __free_hook = freehook; +} + +static PTR +DEFUN(mallochook, (size), size_t size) +{ + struct hdr *hdr; + + __malloc_hook = old_malloc_hook; + hdr = (struct hdr *) malloc(sizeof(struct hdr) + size + 1); + __malloc_hook = mallochook; + if (hdr == NULL) + return NULL; + + hdr->size = size; + hdr->magic = MAGICWORD; + ((char *) &hdr[1])[size] = MAGICBYTE; + return (PTR) (hdr + 1); +} + +static PTR +DEFUN(reallochook, (ptr, size), PTR ptr AND size_t size) +{ + struct hdr *hdr = ((struct hdr *) ptr) - 1; + + checkhdr(hdr); + __free_hook = old_free_hook; + __malloc_hook = old_malloc_hook; + __realloc_hook = old_realloc_hook; + hdr = (struct hdr *) realloc((PTR) hdr, sizeof(struct hdr) + size + 1); + __free_hook = freehook; + __malloc_hook = mallochook; + __realloc_hook = reallochook; + if (hdr == NULL) + return NULL; + + hdr->size = size; + ((char *) &hdr[1])[size] = MAGICBYTE; + return (PTR) (hdr + 1); +} + +void +DEFUN_VOID(mcheck) +{ + static int mcheck_used = 0; + + /* These hooks may not be safely inserted if malloc is already in use. */ + if (!__malloc_initialized && !mcheck_used) + { + old_free_hook = __free_hook; + __free_hook = freehook; + old_malloc_hook = __malloc_hook; + __malloc_hook = mallochook; + old_realloc_hook = __realloc_hook; + __realloc_hook = reallochook; + mcheck_used = 1; + } +} diff --git a/linux-0.11-lab/newlibc/malloc/mstats.c b/linux-0.11-lab/newlibc/malloc/mstats.c new file mode 100644 index 0000000..1561526 --- /dev/null +++ b/linux-0.11-lab/newlibc/malloc/mstats.c @@ -0,0 +1,38 @@ +/* Access the statistics maintained by `malloc'. + Copyright 1989 Free Software Foundation + Written May 1989 by Mike Haertel. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 1, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + + The author may be reached (Email) at the address mike@ai.mit.edu, + or (US mail) as Mike Haertel c/o Free Software Foundation. */ + +#include "ansidecl.h" + +#define _MALLOC_INTERNAL +#include "malloc.h" + +struct mstats +DEFUN_VOID(mstats) +{ + struct mstats result; + + result.bytes_total = (char *) (*__morecore)(0) - _heapbase; + result.chunks_used = _chunks_used; + result.bytes_used = _bytes_used; + result.chunks_free = _chunks_free; + result.bytes_free = _bytes_free; + return result; +} diff --git a/linux-0.11-lab/newlibc/malloc/realloc.c b/linux-0.11-lab/newlibc/malloc/realloc.c new file mode 100644 index 0000000..2ee58c2 --- /dev/null +++ b/linux-0.11-lab/newlibc/malloc/realloc.c @@ -0,0 +1,137 @@ +/* Change the size of a block allocated by `malloc'. + Copyright 1989 Free Software Foundation + Written May 1989 by Mike Haertel. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 1, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + + The author may be reached (Email) at the address mike@ai.mit.edu, + or (US mail) as Mike Haertel c/o Free Software Foundation. */ + +#ifndef __ONEFILE +#include "ansidecl.h" +#include +#include + +#define _MALLOC_INTERNAL +#include "malloc.h" +#endif /* __ONEFILE */ + +#define MIN(A, B) ((A) < (B) ? (A) : (B)) + +/* Debugging hook for realloc. */ +PTR EXFUN((*__realloc_hook), (PTR __ptr, size_t __size)); + +/* Resize the given region to the new size, returning a pointer + to the (possibly moved) region. This is optimized for speed; + some benchmarks seem to indicate that greater compactness is + achieved by unconditionally allocating and copying to a + new region. This module has incestuous knowledge of the + internals of both free and malloc. */ +PTR +DEFUN(realloc, (ptr, size), PTR ptr AND size_t size) +{ + PTR result; + int type; + size_t block, blocks, oldlimit; + + if (size == 0) + { + free(ptr); + return NULL; + } + else if (ptr == NULL) + return malloc(size); + + if (__realloc_hook != NULL) + return (*__realloc_hook)(ptr, size); + + block = BLOCK(ptr); + + type = _heapinfo[block].busy.type; + switch (type) + { + case 0: + /* Maybe reallocate a large block to a small fragment. */ + if (size <= BLOCKSIZE / 2) + { + result = malloc(size); + if (result != NULL) + { + memcpy(result, ptr, size); + free(ptr); + return result; + } + } + + /* The new size is a large allocation as well; + see if we can hold it in place. */ + blocks = BLOCKIFY(size); + if (blocks < _heapinfo[block].busy.info.size) + { + /* The new size is smaller; return + excess memory to the free list. */ + _heapinfo[block + blocks].busy.type = 0; + _heapinfo[block + blocks].busy.info.size + = _heapinfo[block].busy.info.size - blocks; + _heapinfo[block].busy.info.size = blocks; + free(ADDRESS(block + blocks)); + result = ptr; + } + else if (blocks == _heapinfo[block].busy.info.size) + /* No size change necessary. */ + result = ptr; + else + { + /* Won't fit, so allocate a new region that will. + Free the old region first in case there is sufficient + adjacent free space to grow without moving. */ + blocks = _heapinfo[block].busy.info.size; + /* Prevent free from actually returning memory to the system. */ + oldlimit = _heaplimit; + _heaplimit = 0; + free(ptr); + _heaplimit = oldlimit; + result = malloc(size); + if (result == NULL) + { + (void) malloc(blocks * BLOCKSIZE); + return NULL; + } + if (ptr != result) + memmove(result, ptr, blocks * BLOCKSIZE); + } + break; + + default: + /* Old size is a fragment; type is logarithm + to base two of the fragment size. */ + if (size > 1 << (type - 1) && size <= 1 << type) + /* The new size is the same kind of fragment. */ + result = ptr; + else + { + /* The new size is different; allocate a new space, + and copy the lesser of the new size and the old. */ + result = malloc(size); + if (result == NULL) + return NULL; + memcpy(result, ptr, MIN(size, 1 << type)); + free(ptr); + } + break; + } + + return result; +} diff --git a/linux-0.11-lab/newlibc/malloc/stddef.h b/linux-0.11-lab/newlibc/malloc/stddef.h new file mode 100644 index 0000000..d95a815 --- /dev/null +++ b/linux-0.11-lab/newlibc/malloc/stddef.h @@ -0,0 +1,24 @@ +#ifndef _STDDEF_H +#define _STDDEF_H + +/* Signed type of difference of two pointers. */ + +typedef long ptrdiff_t; + +/* Unsigned type of `sizeof' something. */ + +#ifndef _SIZE_T /* in case has defined it. */ +#define _SIZE_T +typedef unsigned long size_t; +#endif /* _SIZE_T */ + +/* A null pointer constant. */ + +#undef NULL /* in case has defined it. */ +#define NULL 0 + +/* Offset of member MEMBER in a struct of type TYPE. */ + +#define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER) + +#endif /* _STDDEF_H */ diff --git a/linux-0.11-lab/newlibc/malloc/stdlib.h b/linux-0.11-lab/newlibc/malloc/stdlib.h new file mode 100644 index 0000000..40ce167 --- /dev/null +++ b/linux-0.11-lab/newlibc/malloc/stdlib.h @@ -0,0 +1,10 @@ +/* Fake stdlib.h supplying the stuff needed by malloc. */ + +#ifndef __ONEFILE +#include +#endif + +extern void EXFUN(abort, (void)); +extern void EXFUN(free, (PTR)); +extern PTR EXFUN(malloc, (size_t)); +extern PTR EXFUN(realloc, (PTR, size_t)); diff --git a/linux-0.11-lab/newlibc/malloc/string.h b/linux-0.11-lab/newlibc/malloc/string.h new file mode 100644 index 0000000..c7014c5 --- /dev/null +++ b/linux-0.11-lab/newlibc/malloc/string.h @@ -0,0 +1,8 @@ +/* Fake string.h supplying stuff used by malloc. */ +#ifndef __ONEFILE +#include +#endif + +extern PTR EXFUN(memcpy, (PTR, PTR, size_t)); +extern PTR EXFUN(memset, (PTR, int, size_t)); +#define memmove memcpy diff --git a/linux-0.11-lab/newlibc/malloc/unix.c b/linux-0.11-lab/newlibc/malloc/unix.c new file mode 100644 index 0000000..5b08897 --- /dev/null +++ b/linux-0.11-lab/newlibc/malloc/unix.c @@ -0,0 +1,41 @@ +/* unix.c - get more memory with a UNIX system call. + Copyright 1989 Free Software Foundation + Written May 1989 by Mike Haertel. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 1, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + + The author may be reached (Email) at the address mike@ai.mit.edu, + or (US mail) as Mike Haertel c/o Free Software Foundation. */ + +#ifndef __ONEFILE +#include "ansidecl.h" +#include + +#define _MALLOC_INTERNAL +#include "malloc.h" +#endif /* __ONEFILE */ + +extern PTR EXFUN(sbrk, (ptrdiff_t size)); + +PTR +DEFUN(__default_morecore, (size), ptrdiff_t size) +{ + PTR result; + + result = sbrk(size); + if (result == (PTR) -1) + return NULL; + return result; +} diff --git a/linux-0.11-lab/newlibc/malloc/valloc.c b/linux-0.11-lab/newlibc/malloc/valloc.c new file mode 100644 index 0000000..2a93ed1 --- /dev/null +++ b/linux-0.11-lab/newlibc/malloc/valloc.c @@ -0,0 +1,42 @@ +/* Allocate memory on a page boundary. + Copyright 1989 Free Software Foundation + Written May 1989 by Mike Haertel. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 1, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + + The author may be reached (Email) at the address mike@ai.mit.edu, + or (US mail) as Mike Haertel c/o Free Software Foundation. */ + +#ifndef __ONEFILE +#include "ansidecl.h" +#include +#endif /* __ONEFILE */ + +#define pagesize 4096 + +PTR +DEFUN(valloc, (size), size_t size) +{ + PTR result; + unsigned int adj; + + result = malloc(size + pagesize); + if (result == NULL) + return NULL; + adj = (unsigned int) ((char *) result - (char *) NULL) % pagesize; + if (adj != 0) + result = (char *) result + pagesize - adj; + return result; +} diff --git a/linux-0.11-lab/newlibc/math/Makefile b/linux-0.11-lab/newlibc/math/Makefile new file mode 100644 index 0000000..19f82c8 --- /dev/null +++ b/linux-0.11-lab/newlibc/math/Makefile @@ -0,0 +1,44 @@ +# This is file Makefile +# +# Copyright (C) 1991 DJ Delorie, 24 Kirsten Ave, Rochester NH 03867-2954 +# +# This file is distributed under the terms listed in the document +# "copying.dj", available from DJ Delorie at the address above. +# A copy of "copying.dj" should accompany this file; if not, a copy +# should be available from where this file was obtained. This file +# may not be distributed without a verbatim copy of "copying.dj". +# +# This file is distributed WITHOUT ANY WARRANTY; without even the implied +# warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# +LIB=../Libm.a +CC= gcc +CFLAGS = -Wall -O -fstrength-reduce -fomit-frame-pointer $(INC) +CPP=$(CC) -E $(INC) + +.s.o : + $(CC) $(CFLAGS) -c $*.s + +.c.o : + $(CC) $(CFLAGS) -c $*.c + +OBJS = acos.o acosh.o asin.o asinh.o atan.o atan2.o atanh.o ceil.o \ + cos.o cosh.o exp.o fabs.o floor.o fmod.o frexp.o hypot.o \ + log.o log10.o sin.o sinh.o sqrt.o tan.o tanh.o \ + erf.o j0.o j1.o jn.o lgamma.o + +library: $(OBJS) + $(AR) uvc $(LIB) $(OBJS) + sync + +clean: + $(RM) -f core *.o *.a tmp_make + for i in *.c;do $(RM) -f `basename $$i .c`.s;done + +dep: + sed '/\#\#\# Dependencies/q' < Makefile > tmp_make + (for i in *.c;do echo -n `echo $$i | sed 's,\.c,\.s,'`" "; \ + $(CPP) -M $$i;done) >> tmp_make + cp tmp_make Makefile + +### Dependencies: diff --git a/linux-0.11-lab/newlibc/math/acos.s b/linux-0.11-lab/newlibc/math/acos.s new file mode 100644 index 0000000..a7ea1e3 --- /dev/null +++ b/linux-0.11-lab/newlibc/math/acos.s @@ -0,0 +1,35 @@ +/* This is file ACOS.S */ +/* +** Copyright (C) 1991 DJ Delorie, 24 Kirsten Ave, Rochester NH 03867-2954 +** +** This file is distributed under the terms listed in the document +** "copying.dj", available from DJ Delorie at the address above. +** A copy of "copying.dj" should accompany this file; if not, a copy +** should be available from where this file was obtained. This file +** may not be distributed without a verbatim copy of "copying.dj". +** +** This file is distributed WITHOUT ANY WARRANTY; without even the implied +** warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +*/ + + .text +LC0: + .double 0d1.00000000000000000000e+00 + + .globl _acos +_acos: + fldl 4(%esp) + fld1 + fsubp %st(0),%st(1) + fsqrt + + fldl 4(%esp) + fld1 + faddp %st(0),%st(1) + fsqrt + + fpatan + + fld %st(0) + faddp + ret diff --git a/linux-0.11-lab/newlibc/math/acosh.c b/linux-0.11-lab/newlibc/math/acosh.c new file mode 100644 index 0000000..6a33989 --- /dev/null +++ b/linux-0.11-lab/newlibc/math/acosh.c @@ -0,0 +1,6 @@ +#include + +double acosh(double x) +{ + return log(x + sqrt(x*x - 1)); +} diff --git a/linux-0.11-lab/newlibc/math/asin.s b/linux-0.11-lab/newlibc/math/asin.s new file mode 100644 index 0000000..4240d72 --- /dev/null +++ b/linux-0.11-lab/newlibc/math/asin.s @@ -0,0 +1,28 @@ +/* This is file ASIN.S */ +/* +** Copyright (C) 1991 DJ Delorie, 24 Kirsten Ave, Rochester NH 03867-2954 +** +** This file is distributed under the terms listed in the document +** "copying.dj", available from DJ Delorie at the address above. +** A copy of "copying.dj" should accompany this file; if not, a copy +** should be available from where this file was obtained. This file +** may not be distributed without a verbatim copy of "copying.dj". +** +** This file is distributed WITHOUT ANY WARRANTY; without even the implied +** warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +*/ + +/* History:11,23 */ + .globl _asin +_asin: + fldl 4(%esp) + fld %st(0) + fmulp + fld1 + fsubp + fsqrt + fldl 4(%esp) + fxch %st(1) + fpatan + ret + diff --git a/linux-0.11-lab/newlibc/math/asinh.c b/linux-0.11-lab/newlibc/math/asinh.c new file mode 100644 index 0000000..fffa8fa --- /dev/null +++ b/linux-0.11-lab/newlibc/math/asinh.c @@ -0,0 +1,7 @@ +#include + +double asinh(double x) +{ + return log(x + sqrt(x*x + 1)); +} + diff --git a/linux-0.11-lab/newlibc/math/atan.s b/linux-0.11-lab/newlibc/math/atan.s new file mode 100644 index 0000000..d11ebf2 --- /dev/null +++ b/linux-0.11-lab/newlibc/math/atan.s @@ -0,0 +1,21 @@ +/* This is file ATAN.S */ +/* +** Copyright (C) 1991 DJ Delorie, 24 Kirsten Ave, Rochester NH 03867-2954 +** +** This file is distributed under the terms listed in the document +** "copying.dj", available from DJ Delorie at the address above. +** A copy of "copying.dj" should accompany this file; if not, a copy +** should be available from where this file was obtained. This file +** may not be distributed without a verbatim copy of "copying.dj". +** +** This file is distributed WITHOUT ANY WARRANTY; without even the implied +** warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +*/ + + .globl _atan +_atan: + fldl 4(%esp) + fld1 + fpatan + ret + diff --git a/linux-0.11-lab/newlibc/math/atan2.s b/linux-0.11-lab/newlibc/math/atan2.s new file mode 100644 index 0000000..803fbd5 --- /dev/null +++ b/linux-0.11-lab/newlibc/math/atan2.s @@ -0,0 +1,21 @@ +/* This is file ATAN2.S */ +/* +** Copyright (C) 1991 DJ Delorie, 24 Kirsten Ave, Rochester NH 03867-2954 +** +** This file is distributed under the terms listed in the document +** "copying.dj", available from DJ Delorie at the address above. +** A copy of "copying.dj" should accompany this file; if not, a copy +** should be available from where this file was obtained. This file +** may not be distributed without a verbatim copy of "copying.dj". +** +** This file is distributed WITHOUT ANY WARRANTY; without even the implied +** warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +*/ + + .globl _atan2 +_atan2: + fldl 4(%esp) + fldl 12(%esp) + fpatan + ret + diff --git a/linux-0.11-lab/newlibc/math/atanh.c b/linux-0.11-lab/newlibc/math/atanh.c new file mode 100644 index 0000000..40df2c1 --- /dev/null +++ b/linux-0.11-lab/newlibc/math/atanh.c @@ -0,0 +1,6 @@ +#include + +double atanh(double x) +{ + return log((1+x)/(1-x)) / 2.0; +} diff --git a/linux-0.11-lab/newlibc/math/ceil.s b/linux-0.11-lab/newlibc/math/ceil.s new file mode 100644 index 0000000..f6a2bf6 --- /dev/null +++ b/linux-0.11-lab/newlibc/math/ceil.s @@ -0,0 +1,37 @@ +/* This is file CEIL.S */ +/* +** Copyright (C) 1991 DJ Delorie, 24 Kirsten Ave, Rochester NH 03867-2954 +** +** This file is distributed under the terms listed in the document +** "copying.dj", available from DJ Delorie at the address above. +** A copy of "copying.dj" should accompany this file; if not, a copy +** should be available from where this file was obtained. This file +** may not be distributed without a verbatim copy of "copying.dj". +** +** This file is distributed WITHOUT ANY WARRANTY; without even the implied +** warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +*/ + + .globl _ceil +_ceil: + pushl %ebp + movl %esp,%ebp + sub $8,%esp /* -4 = old CW, -2 = new CW */ + + fstcw -4(%ebp) + fwait + movw -4(%ebp),%ax + andw $0xf3ff,%ax + orw $0x0800,%ax + movw %ax,-2(%ebp) + fldcww -2(%ebp) + + fldl 8(%ebp) + frndint + + fldcww -4(%ebp) + + movl %ebp,%esp + popl %ebp + ret + diff --git a/linux-0.11-lab/newlibc/math/cos.s b/linux-0.11-lab/newlibc/math/cos.s new file mode 100644 index 0000000..f5e5fa3 --- /dev/null +++ b/linux-0.11-lab/newlibc/math/cos.s @@ -0,0 +1,29 @@ +/* This is file COS.S */ +/* +** Copyright (C) 1991 DJ Delorie, 24 Kirsten Ave, Rochester NH 03867-2954 +** +** This file is distributed under the terms listed in the document +** "copying.dj", available from DJ Delorie at the address above. +** A copy of "copying.dj" should accompany this file; if not, a copy +** should be available from where this file was obtained. This file +** may not be distributed without a verbatim copy of "copying.dj". +** +** This file is distributed WITHOUT ANY WARRANTY; without even the implied +** warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +*/ + +L0: + .quad 0xffffffffffffffff + + .globl _cos +_cos: + fldl 4(%esp) + fcos + fstsw + sahf + jnp L1 + fstp %st(0) + fldl L0 +L1: + ret + diff --git a/linux-0.11-lab/newlibc/math/cosh.c b/linux-0.11-lab/newlibc/math/cosh.c new file mode 100644 index 0000000..c88cbf0 --- /dev/null +++ b/linux-0.11-lab/newlibc/math/cosh.c @@ -0,0 +1,6 @@ +#include + +double cosh(double x) +{ + return (exp(x) + exp(-x)) / 2.0; +} diff --git a/linux-0.11-lab/newlibc/math/erf.c b/linux-0.11-lab/newlibc/math/erf.c new file mode 100644 index 0000000..a3fe575 --- /dev/null +++ b/linux-0.11-lab/newlibc/math/erf.c @@ -0,0 +1,124 @@ +/* + * Copyright (c) 1985 Regents of the University of California. + * All rights reserved. The Berkeley software License Agreement + * specifies the terms and conditions for redistribution. + */ + +#ifndef lint +static char sccsid[] = "@(#)erf.c 5.2 (Berkeley) 4/29/88"; +#endif /* not lint */ + +/* + C program for floating point error function + + erf(x) returns the error function of its argument + erfc(x) returns 1.0-erf(x) + + erf(x) is defined by + ${2 over sqrt(pi)} int from 0 to x e sup {-t sup 2} dt$ + + the entry for erfc is provided because of the + extreme loss of relative accuracy if erf(x) is + called for large x and the result subtracted + from 1. (e.g. for x= 10, 12 places are lost). + + There are no error returns. + + Calls exp. + + Coefficients for large x are #5667 from Hart & Cheney (18.72D). +*/ + +#include + +#define M 7 +#define N 9 +static double torp = 1.1283791670955125738961589031; +static double p1[] = { + 0.804373630960840172832162e5, + 0.740407142710151470082064e4, + 0.301782788536507577809226e4, + 0.380140318123903008244444e2, + 0.143383842191748205576712e2, + -.288805137207594084924010e0, + 0.007547728033418631287834e0, +}; +static double q1[] = { + 0.804373630960840172826266e5, + 0.342165257924628539769006e5, + 0.637960017324428279487120e4, + 0.658070155459240506326937e3, + 0.380190713951939403753468e2, + 0.100000000000000000000000e1, + 0.0, +}; +static double p2[] = { + 0.18263348842295112592168999e4, + 0.28980293292167655611275846e4, + 0.2320439590251635247384768711e4, + 0.1143262070703886173606073338e4, + 0.3685196154710010637133875746e3, + 0.7708161730368428609781633646e2, + 0.9675807882987265400604202961e1, + 0.5641877825507397413087057563e0, + 0.0, +}; +static double q2[] = { + 0.18263348842295112595576438e4, + 0.495882756472114071495438422e4, + 0.60895424232724435504633068e4, + 0.4429612803883682726711528526e4, + 0.2094384367789539593790281779e4, + 0.6617361207107653469211984771e3, + 0.1371255960500622202878443578e3, + 0.1714980943627607849376131193e2, + 1.0, +}; + +double +erf(double arg) +{ + int sign; + double argsq; + double d, n; + int i; + + sign = 1; + if(arg < 0.){ + arg = -arg; + sign = -1; + } + if(arg < 0.5){ + argsq = arg*arg; + for(n=0,d=0,i=M-1; i>=0; i--){ + n = n*argsq + p1[i]; + d = d*argsq + q1[i]; + } + return(sign*torp*arg*n/d); + } + if(arg >= 10.) + return(sign*1.); + return(sign*(1. - erfc(arg))); +} + +double +erfc(double arg) +{ + double n, d; + int i; + + if(arg < 0.) + return(2. - erfc(-arg)); +/* + if(arg < 0.5) + return(1. - erf(arg)); +*/ + if(arg >= 10.) + return(0.); + + for(n=0,d=0,i=N-1; i>=0; i--){ + n = n*arg + p2[i]; + d = d*arg + q2[i]; + } + return(exp(-arg*arg)*n/d); +} diff --git a/linux-0.11-lab/newlibc/math/exp.s b/linux-0.11-lab/newlibc/math/exp.s new file mode 100644 index 0000000..70b1280 --- /dev/null +++ b/linux-0.11-lab/newlibc/math/exp.s @@ -0,0 +1,92 @@ +/* This is file EXP.S */ +/* +** Copyright (C) 1991 DJ Delorie, 24 Kirsten Ave, Rochester NH 03867-2954 +** +** Modified O.ROBERT 24, Avenue de Verdun 92170 VANVES, FRANCE +** +** E-mail: roberto@germinal.ibp.fr +** +** This file is distributed under the terms listed in the document +** "copying.dj", available from DJ Delorie at the address above. +** A copy of "copying.dj" should accompany this file; if not, a copy +** should be available from where this file was obtained. This file +** may not be distributed without a verbatim copy of "copying.dj". +** +** This file is distributed WITHOUT ANY WARRANTY; without even the implied +** warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +** +** or 03-Apr-1991 corrected bug about argument zero to pow +** fyl2x didn't like it +*/ + +/* History:15,24 */ + .data +LCW1: + .word 0 +LCW2: + .word 0 + + .text + +LC0: + .double 0d1.0e+00 + + .globl _pow2 +_pow2: + fldl 4(%esp) +Lpow2: + fstcww LCW1 + fstcww LCW2 + fwait + andl $0xf3ff,LCW2 + orl $0x0400,LCW2 + fldcww LCW2 + fldl %st(0) + frndint + fldcww LCW1 + fxch %st(1) + fsub %st(1),%st + f2xm1 + faddl LC0 + fscale + fstp %st(1) + ret + + .globl _exp +_exp: + fldl 4(%esp) + fldl2e + fmulp + jmp Lpow2 + + .globl _pow10 +_pow10: + fldl 4(%esp) + fldl2t + fmulp + jmp Lpow2 + + .globl _pow +_pow: + fldl 4(%esp) + ftst + fnstsww %ax + sahf + je zero1 + fldl 12(%esp) + ftst + fnstsww %ax + sahf + je zero2 + fxch %st(1) + fyl2x + jmp Lpow2 +zero1: + fstpl 4(%esp) + fldzl + ret +zero2: + fstpl 4(%esp) + fstpl 4(%esp) + fld1l + ret diff --git a/linux-0.11-lab/newlibc/math/fabs.s b/linux-0.11-lab/newlibc/math/fabs.s new file mode 100644 index 0000000..e098501 --- /dev/null +++ b/linux-0.11-lab/newlibc/math/fabs.s @@ -0,0 +1,5 @@ + .globl _fabs +_fabs: + fldl 4(%esp) + fabs + ret diff --git a/linux-0.11-lab/newlibc/math/floor.s b/linux-0.11-lab/newlibc/math/floor.s new file mode 100644 index 0000000..179c278 --- /dev/null +++ b/linux-0.11-lab/newlibc/math/floor.s @@ -0,0 +1,37 @@ +/* This is file FLOOR.S */ +/* +** Copyright (C) 1991 DJ Delorie, 24 Kirsten Ave, Rochester NH 03867-2954 +** +** This file is distributed under the terms listed in the document +** "copying.dj", available from DJ Delorie at the address above. +** A copy of "copying.dj" should accompany this file; if not, a copy +** should be available from where this file was obtained. This file +** may not be distributed without a verbatim copy of "copying.dj". +** +** This file is distributed WITHOUT ANY WARRANTY; without even the implied +** warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +*/ + + .globl _floor +_floor: + pushl %ebp + movl %esp,%ebp + sub $8,%esp /* -4 = old CW, -2 = new CW */ + + fstcw -4(%ebp) + fwait + movw -4(%ebp),%ax + andw $0xf3ff,%ax + orw $0x0400,%ax + movw %ax,-2(%ebp) + fldcww -2(%ebp) + + fldl 8(%ebp) + frndint + + fldcww -4(%ebp) + + movl %ebp,%esp + popl %ebp + ret + diff --git a/linux-0.11-lab/newlibc/math/fmod.s b/linux-0.11-lab/newlibc/math/fmod.s new file mode 100644 index 0000000..dae8d53 --- /dev/null +++ b/linux-0.11-lab/newlibc/math/fmod.s @@ -0,0 +1,43 @@ +/* This is file FMOD.S */ +/* +** Copyright (C) 1991 O. ROBERT, 24, Avenue de Verdun, 92170 VANVES, FRANCE +** +** Internet: roberto@germinal.ibp.fr +** +** This file is distributed under the terms listed in the document +** "copying.dj", available from DJ Delorie at the address above. +** A copy of "copying.dj" should accompany this file; if not, a copy +** should be available from where this file was obtained. This file +** may not be distributed without a verbatim copy of "copying.dj". +** +** This file is distributed WITHOUT ANY WARRANTY; without even the implied +** warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +*/ + .data +LCW1: + .word 0 + .align 4 + + .text + + .globl _fmod +_fmod: + fldl 4(%esp) + fldl 12(%esp) + ftst + fnstsw %ax + fxch %st(1) + sahf + jnz next + fstpl %st(0) + jmp out +next: + fpreml + fnstsw %ax + sahf + jpe next + fstpl %st(1) +out: + ret + + diff --git a/linux-0.11-lab/newlibc/math/frexp.c b/linux-0.11-lab/newlibc/math/frexp.c new file mode 100644 index 0000000..d833426 --- /dev/null +++ b/linux-0.11-lab/newlibc/math/frexp.c @@ -0,0 +1,17 @@ +#include + +/* Stores binary exponent of d in e, and returns whole fraction of d + * (with binary exponent of 0) (special case for d=0) + */ +double frexp(double d, int *e) +{ + struct bitdouble *dp = (struct bitdouble *)&d; + + if (dp->exp == 0) /* value is zero, return exponent of 0 */ + *e = 0; + else { + *e = dp->exp - BIAS + 1; + dp->exp = BIAS - 1; + } + return d; +} diff --git a/linux-0.11-lab/newlibc/math/hypot.c b/linux-0.11-lab/newlibc/math/hypot.c new file mode 100644 index 0000000..95e1728 --- /dev/null +++ b/linux-0.11-lab/newlibc/math/hypot.c @@ -0,0 +1,6 @@ +#include + +double hypot(double x, double y) +{ + return sqrt(x*x + y*y); +} diff --git a/linux-0.11-lab/newlibc/math/j0.c b/linux-0.11-lab/newlibc/math/j0.c new file mode 100644 index 0000000..159b8a7 --- /dev/null +++ b/linux-0.11-lab/newlibc/math/j0.c @@ -0,0 +1,208 @@ +/* + * Copyright (c) 1985 Regents of the University of California. + * All rights reserved. The Berkeley software License Agreement + * specifies the terms and conditions for redistribution. + */ + +#ifndef lint +static char sccsid[] = "@(#)j0.c 5.3 (Berkeley) 9/22/88"; +#endif /* not lint */ + +/* + floating point Bessel's function + of the first and second kinds + of order zero + + j0(x) returns the value of J0(x) + for all real values of x. + + There are no error returns. + Calls sin, cos, sqrt. + + There is a niggling bug in J0 which + causes errors up to 2e-16 for x in the + interval [-8,8]. + The bug is caused by an inappropriate order + of summation of the series. rhm will fix it + someday. + + Coefficients are from Hart & Cheney. + #5849 (19.22D) + #6549 (19.25D) + #6949 (19.41D) + + y0(x) returns the value of Y0(x) + for positive real values of x. + For x<=0, if on the VAX, error number EDOM is set and + the reserved operand fault is generated; + otherwise (an IEEE machine) an invalid operation is performed. + + Calls sin, cos, sqrt, log, j0. + + The values of Y0 have not been checked + to more than ten places. + + Coefficients are from Hart & Cheney. + #6245 (18.78D) + #6549 (19.25D) + #6949 (19.41D) +*/ + +#include + +#if defined(vax)||defined(tahoe) +#include +#else /* defined(vax)||defined(tahoe) */ +static const double zero = 0.e0; +#endif /* defined(vax)||defined(tahoe) */ + +static double pzero, qzero; + +static const double tpi = .6366197723675813430755350535e0; +static const double pio4 = .7853981633974483096156608458e0; +static const double p1[] = { + 0.4933787251794133561816813446e21, + -.1179157629107610536038440800e21, + 0.6382059341072356562289432465e19, + -.1367620353088171386865416609e18, + 0.1434354939140344111664316553e16, + -.8085222034853793871199468171e13, + 0.2507158285536881945555156435e11, + -.4050412371833132706360663322e8, + 0.2685786856980014981415848441e5, +}; +static const double q1[] = { + 0.4933787251794133562113278438e21, + 0.5428918384092285160200195092e19, + 0.3024635616709462698627330784e17, + 0.1127756739679798507056031594e15, + 0.3123043114941213172572469442e12, + 0.6699987672982239671814028660e9, + 0.1114636098462985378182402543e7, + 0.1363063652328970604442810507e4, + 1.0 +}; +static const double p2[] = { + 0.5393485083869438325262122897e7, + 0.1233238476817638145232406055e8, + 0.8413041456550439208464315611e7, + 0.2016135283049983642487182349e7, + 0.1539826532623911470917825993e6, + 0.2485271928957404011288128951e4, + 0.0, +}; +static const double q2[] = { + 0.5393485083869438325560444960e7, + 0.1233831022786324960844856182e8, + 0.8426449050629797331554404810e7, + 0.2025066801570134013891035236e7, + 0.1560017276940030940592769933e6, + 0.2615700736920839685159081813e4, + 1.0, +}; +static const double p3[] = { + -.3984617357595222463506790588e4, + -.1038141698748464093880530341e5, + -.8239066313485606568803548860e4, + -.2365956170779108192723612816e4, + -.2262630641933704113967255053e3, + -.4887199395841261531199129300e1, + 0.0, +}; +static const double q3[] = { + 0.2550155108860942382983170882e6, + 0.6667454239319826986004038103e6, + 0.5332913634216897168722255057e6, + 0.1560213206679291652539287109e6, + 0.1570489191515395519392882766e5, + 0.4087714673983499223402830260e3, + 1.0, +}; +static const double p4[] = { + -.2750286678629109583701933175e20, + 0.6587473275719554925999402049e20, + -.5247065581112764941297350814e19, + 0.1375624316399344078571335453e18, + -.1648605817185729473122082537e16, + 0.1025520859686394284509167421e14, + -.3436371222979040378171030138e11, + 0.5915213465686889654273830069e8, + -.4137035497933148554125235152e5, +}; +static const double q4[] = { + 0.3726458838986165881989980e21, + 0.4192417043410839973904769661e19, + 0.2392883043499781857439356652e17, + 0.9162038034075185262489147968e14, + 0.2613065755041081249568482092e12, + 0.5795122640700729537480087915e9, + 0.1001702641288906265666651753e7, + 0.1282452772478993804176329391e4, + 1.0, +}; + +static void asympt(double); + +double +j0(double arg) +{ + double argsq, n, d; + int i; + + if(arg < 0.) arg = -arg; + if(arg > 8.){ + asympt(arg); + n = arg - pio4; + return(sqrt(tpi/arg)*(pzero*cos(n) - qzero*sin(n))); + } + argsq = arg*arg; + for(n=0,d=0,i=8;i>=0;i--){ + n = n*argsq + p1[i]; + d = d*argsq + q1[i]; + } + return(n/d); +} + +double +y0(double arg) +{ + double argsq, n, d; + int i; + + if(arg <= 0.){ +#if defined(vax)||defined(tahoe) + return(infnan(EDOM)); /* NaN */ +#else /* defined(vax)||defined(tahoe) */ + return(zero/zero); /* IEEE machines: invalid operation */ +#endif /* defined(vax)||defined(tahoe) */ + } + if(arg > 8.){ + asympt(arg); + n = arg - pio4; + return(sqrt(tpi/arg)*(pzero*sin(n) + qzero*cos(n))); + } + argsq = arg*arg; + for(n=0,d=0,i=8;i>=0;i--){ + n = n*argsq + p4[i]; + d = d*argsq + q4[i]; + } + return(n/d + tpi*j0(arg)*log(arg)); +} + +static void +asympt(double arg) +{ + double zsq, n, d; + int i; + zsq = 64./(arg*arg); + for(n=0,d=0,i=6;i>=0;i--){ + n = n*zsq + p2[i]; + d = d*zsq + q2[i]; + } + pzero = n/d; + for(n=0,d=0,i=6;i>=0;i--){ + n = n*zsq + p3[i]; + d = d*zsq + q3[i]; + } + qzero = (8./arg)*(n/d); +} diff --git a/linux-0.11-lab/newlibc/math/j1.c b/linux-0.11-lab/newlibc/math/j1.c new file mode 100644 index 0000000..8ca1042 --- /dev/null +++ b/linux-0.11-lab/newlibc/math/j1.c @@ -0,0 +1,214 @@ +/* + * Copyright (c) 1985 Regents of the University of California. + * All rights reserved. The Berkeley software License Agreement + * specifies the terms and conditions for redistribution. + */ + +#ifndef lint +static char sccsid[] = "@(#)j1.c 5.3 (Berkeley) 9/22/88"; +#endif /* not lint */ + +/* + floating point Bessel's function + of the first and second kinds + of order one + + j1(x) returns the value of J1(x) + for all real values of x. + + There are no error returns. + Calls sin, cos, sqrt. + + There is a niggling bug in J1 which + causes errors up to 2e-16 for x in the + interval [-8,8]. + The bug is caused by an inappropriate order + of summation of the series. rhm will fix it + someday. + + Coefficients are from Hart & Cheney. + #6050 (20.98D) + #6750 (19.19D) + #7150 (19.35D) + + y1(x) returns the value of Y1(x) + for positive real values of x. + For x<=0, if on the VAX, error number EDOM is set and + the reserved operand fault is generated; + otherwise (an IEEE machine) an invalid operation is performed. + + Calls sin, cos, sqrt, log, j1. + + The values of Y1 have not been checked + to more than ten places. + + Coefficients are from Hart & Cheney. + #6447 (22.18D) + #6750 (19.19D) + #7150 (19.35D) +*/ + +#include + +#if defined(vax)||defined(tahoe) +#include +#else /* defined(vax)||defined(tahoe) */ +static const double zero = 0.e0; +#endif /* defined(vax)||defined(tahoe) */ + +static double pzero, qzero; + +static const double tpi = .6366197723675813430755350535e0; +static const double pio4 = .7853981633974483096156608458e0; +static const double p1[] = { + 0.581199354001606143928050809e21, + -.6672106568924916298020941484e20, + 0.2316433580634002297931815435e19, + -.3588817569910106050743641413e17, + 0.2908795263834775409737601689e15, + -.1322983480332126453125473247e13, + 0.3413234182301700539091292655e10, + -.4695753530642995859767162166e7, + 0.2701122710892323414856790990e4, +}; +static const double q1[] = { + 0.1162398708003212287858529400e22, + 0.1185770712190320999837113348e20, + 0.6092061398917521746105196863e17, + 0.2081661221307607351240184229e15, + 0.5243710262167649715406728642e12, + 0.1013863514358673989967045588e10, + 0.1501793594998585505921097578e7, + 0.1606931573481487801970916749e4, + 1.0, +}; +static const double p2[] = { + -.4435757816794127857114720794e7, + -.9942246505077641195658377899e7, + -.6603373248364939109255245434e7, + -.1523529351181137383255105722e7, + -.1098240554345934672737413139e6, + -.1611616644324610116477412898e4, + 0.0, +}; +static const double q2[] = { + -.4435757816794127856828016962e7, + -.9934124389934585658967556309e7, + -.6585339479723087072826915069e7, + -.1511809506634160881644546358e7, + -.1072638599110382011903063867e6, + -.1455009440190496182453565068e4, + 1.0, +}; +static const double p3[] = { + 0.3322091340985722351859704442e5, + 0.8514516067533570196555001171e5, + 0.6617883658127083517939992166e5, + 0.1849426287322386679652009819e5, + 0.1706375429020768002061283546e4, + 0.3526513384663603218592175580e2, + 0.0, +}; +static const double q3[] = { + 0.7087128194102874357377502472e6, + 0.1819458042243997298924553839e7, + 0.1419460669603720892855755253e7, + 0.4002944358226697511708610813e6, + 0.3789022974577220264142952256e5, + 0.8638367769604990967475517183e3, + 1.0, +}; +static const double p4[] = { + -.9963753424306922225996744354e23, + 0.2655473831434854326894248968e23, + -.1212297555414509577913561535e22, + 0.2193107339917797592111427556e20, + -.1965887462722140658820322248e18, + 0.9569930239921683481121552788e15, + -.2580681702194450950541426399e13, + 0.3639488548124002058278999428e10, + -.2108847540133123652824139923e7, + 0.0, +}; +static const double q4[] = { + 0.5082067366941243245314424152e24, + 0.5435310377188854170800653097e22, + 0.2954987935897148674290758119e20, + 0.1082258259408819552553850180e18, + 0.2976632125647276729292742282e15, + 0.6465340881265275571961681500e12, + 0.1128686837169442121732366891e10, + 0.1563282754899580604737366452e7, + 0.1612361029677000859332072312e4, + 1.0, +}; + +static void asympt(double); + +double +j1(double arg) +{ + double xsq, n, d, x; + int i; + + x = arg; + if(x < 0.) x = -x; + if(x > 8.){ + asympt(x); + n = x - 3.*pio4; + n = sqrt(tpi/x)*(pzero*cos(n) - qzero*sin(n)); + if(arg <0.) n = -n; + return(n); + } + xsq = x*x; + for(n=0,d=0,i=8;i>=0;i--){ + n = n*xsq + p1[i]; + d = d*xsq + q1[i]; + } + return(arg*n/d); +} + +double +y1(double arg) +{ + double xsq, n, d, x; + int i; + + x = arg; + if(x <= 0.){ +#if defined(vax)||defined(tahoe) + return(infnan(EDOM)); /* NaN */ +#else /* defined(vax)||defined(tahoe) */ + return(zero/zero); /* IEEE machines: invalid operation */ +#endif /* defined(vax)||defined(tahoe) */ + } + if(x > 8.){ + asympt(x); + n = x - 3*pio4; + return(sqrt(tpi/x)*(pzero*sin(n) + qzero*cos(n))); + } + xsq = x*x; + for(n=0,d=0,i=9;i>=0;i--){ + n = n*xsq + p4[i]; + d = d*xsq + q4[i]; + } + return(x*n/d + tpi*(j1(x)*log(x)-1./x)); +} + +static void +asympt(double arg) +{ + double zsq, n, d; + int i; + zsq = 64./(arg*arg); + for(n=0,d=0,i=6;i>=0;i--){ + n = n*zsq + p2[i]; + d = d*zsq + q2[i]; + } + pzero = n/d; + for(n=0,d=0,i=6;i>=0;i--){ + n = n*zsq + p3[i]; + d = d*zsq + q3[i]; + } + qzero = (8./arg)*(n/d); +} diff --git a/linux-0.11-lab/newlibc/math/jn.c b/linux-0.11-lab/newlibc/math/jn.c new file mode 100644 index 0000000..aa5597a --- /dev/null +++ b/linux-0.11-lab/newlibc/math/jn.c @@ -0,0 +1,122 @@ +/* + * Copyright (c) 1985 Regents of the University of California. + * All rights reserved. The Berkeley software License Agreement + * specifies the terms and conditions for redistribution. + */ + +#ifndef lint +static char sccsid[] = "@(#)jn.c 5.3 (Berkeley) 9/22/88"; +#endif /* not lint */ + +/* + floating point Bessel's function of + the first and second kinds and of + integer order. + + int n; + double x; + jn(n,x); + + returns the value of Jn(x) for all + integer values of n and all real values + of x. + + There are no error returns. + Calls j0, j1. + + For n=0, j0(x) is called, + for n=1, j1(x) is called, + for nx, a continued fraction approximation to + j(n,x)/j(n-1,x) is evaluated and then backward + recursion is used starting from a supposed value + for j(n,x). The resulting value of j(0,x) is + compared with the actual value to correct the + supposed value of j(n,x). + + yn(n,x) is similar in all respects, except + that forward recursion is used for all + values of n>1. +*/ + +#include +#if defined(vax)||defined(tahoe) +#include +#else /* defined(vax)||defined(tahoe) */ +static double zero = 0.e0; +#endif /* defined(vax)||defined(tahoe) */ + +double +jn(int n, double x) +{ + int i; + double a, b, temp; + double xsq, t; + + if(n<0){ + n = -n; + x = -x; + } + if(n==0) return(j0(x)); + if(n==1) return(j1(x)); + if(x == 0.) return(0.); + if(n>x) goto recurs; + + a = j0(x); + b = j1(x); + for(i=1;in;i--){ + t = xsq/(2.*i - t); + } + t = x/(2.*n-t); + + a = t; + b = 1; + for(i=n-1;i>0;i--){ + temp = b; + b = (2.*i/x)*b - a; + a = temp; + } + return(t*j0(x)/b); +} + +double +yn(int n, double x) +{ + int i; + int sign; + double a, b, temp; + + if (x <= 0.0) { +#if defined(vax)||defined(tahoe) + return(infnan(EDOM)); /* NaN */ +#else /* defined(vax)||defined(tahoe) */ + return(zero/zero); /* IEEE machines: invalid operation */ +#endif /* defined(vax)||defined(tahoe) */ + } + sign = 1; + if(n<0){ + n = -n; + if(n%2 == 1) sign = -1; + } + if(n==0) return(y0(x)); + if(n==1) return(sign*y1(x)); + + a = y0(x); + b = y1(x); + for(i=1;i + +#if defined(vax)||defined(tahoe) +#include +#endif /* defined(vax)||defined(tahoe) */ + +int signgam = 0; +static const double goobie = 0.9189385332046727417803297; /* log(2*pi)/2 */ +static const double pi = 3.1415926535897932384626434; + +#define M 6 +#define N 8 +static const double p1[] = { + 0.83333333333333101837e-1, + -.277777777735865004e-2, + 0.793650576493454e-3, + -.5951896861197e-3, + 0.83645878922e-3, + -.1633436431e-2, +}; +static const double p2[] = { + -.42353689509744089647e5, + -.20886861789269887364e5, + -.87627102978521489560e4, + -.20085274013072791214e4, + -.43933044406002567613e3, + -.50108693752970953015e2, + -.67449507245925289918e1, + 0.0, +}; +static const double q2[] = { + -.42353689509744090010e5, + -.29803853309256649932e4, + 0.99403074150827709015e4, + -.15286072737795220248e4, + -.49902852662143904834e3, + 0.18949823415702801641e3, + -.23081551524580124562e2, + 0.10000000000000000000e1, +}; + +static double pos(double), neg(double), asym(double); + +double +lgamma(double arg) +{ + + signgam = 1.; + if(arg <= 0.) return(neg(arg)); + if(arg > 8.) return(asym(arg)); + return(log(pos(arg))); +} + +static double +asym(double arg) +{ + double n, argsq; + int i; + + argsq = 1./(arg*arg); + for(n=0,i=M-1; i>=0; i--){ + n = n*argsq + p1[i]; + } + return((arg-.5)*log(arg) - arg + goobie + n/arg); +} + +static double +neg(double arg) +{ + double t; + + arg = -arg; + /* + * to see if arg were a true integer, the old code used the + * mathematically correct observation: + * sin(n*pi) = 0 <=> n is an integer. + * but in finite precision arithmetic, sin(n*PI) will NEVER + * be zero simply because n*PI is a rational number. hence + * it failed to work with our newer, more accurate sin() + * which uses true pi to do the argument reduction... + * temp = sin(pi*arg); + */ + t = floor(arg); + if (arg - t > 0.5e0) + t += 1.e0; /* t := integer nearest arg */ +#if defined(vax)||defined(tahoe) + if (arg == t) { + return(infnan(ERANGE)); /* +INF */ + } +#endif /* defined(vax)||defined(tahoe) */ + signgam = (int) (t - 2*floor(t/2)); /* signgam = 1 if t was odd, */ + /* 0 if t was even */ + signgam = signgam - 1 + signgam; /* signgam = 1 if t was odd, */ + /* -1 if t was even */ + t = arg - t; /* -0.5 <= t <= 0.5 */ + if (t < 0.e0) { + t = -t; + signgam = -signgam; + } + return(-log(arg*pos(arg)*sin(pi*t)/pi)); +} + +static double +pos(double arg) +{ + double n, d, s; + register i; + + if(arg < 2.) return(pos(arg+1.)/arg); + if(arg > 3.) return((arg-1.)*pos(arg-1.)); + + s = arg - 2.; + for(n=0,d=0,i=N-1; i>=0; i--){ + n = n*s + p2[i]; + d = d*s + q2[i]; + } + return(n/d); +} diff --git a/linux-0.11-lab/newlibc/math/log.s b/linux-0.11-lab/newlibc/math/log.s new file mode 100644 index 0000000..ea2dcc0 --- /dev/null +++ b/linux-0.11-lab/newlibc/math/log.s @@ -0,0 +1,20 @@ +/* This is file LOG.S */ +/* +** Copyright (C) 1991 DJ Delorie, 24 Kirsten Ave, Rochester NH 03867-2954 +** +** This file is distributed under the terms listed in the document +** "copying.dj", available from DJ Delorie at the address above. +** A copy of "copying.dj" should accompany this file; if not, a copy +** should be available from where this file was obtained. This file +** may not be distributed without a verbatim copy of "copying.dj". +** +** This file is distributed WITHOUT ANY WARRANTY; without even the implied +** warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +*/ + + .globl _log +_log: + fldln2 + fldl 4(%esp) + fyl2x + ret diff --git a/linux-0.11-lab/newlibc/math/log10.s b/linux-0.11-lab/newlibc/math/log10.s new file mode 100644 index 0000000..2e889be --- /dev/null +++ b/linux-0.11-lab/newlibc/math/log10.s @@ -0,0 +1,20 @@ +/* This is file LOG10.S */ +/* +** Copyright (C) 1991 DJ Delorie, 24 Kirsten Ave, Rochester NH 03867-2954 +** +** This file is distributed under the terms listed in the document +** "copying.dj", available from DJ Delorie at the address above. +** A copy of "copying.dj" should accompany this file; if not, a copy +** should be available from where this file was obtained. This file +** may not be distributed without a verbatim copy of "copying.dj". +** +** This file is distributed WITHOUT ANY WARRANTY; without even the implied +** warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +*/ + + .globl _log10 +_log10: + fldlg2 + fldl 4(%esp) + fyl2x + ret diff --git a/linux-0.11-lab/newlibc/math/sin.s b/linux-0.11-lab/newlibc/math/sin.s new file mode 100644 index 0000000..2761475 --- /dev/null +++ b/linux-0.11-lab/newlibc/math/sin.s @@ -0,0 +1,29 @@ +/* This is file SIN.S */ +/* +** Copyright (C) 1991 DJ Delorie, 24 Kirsten Ave, Rochester NH 03867-2954 +** +** This file is distributed under the terms listed in the document +** "copying.dj", available from DJ Delorie at the address above. +** A copy of "copying.dj" should accompany this file; if not, a copy +** should be available from where this file was obtained. This file +** may not be distributed without a verbatim copy of "copying.dj". +** +** This file is distributed WITHOUT ANY WARRANTY; without even the implied +** warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +*/ + +L0: + .quad 0xffffffffffffffff + + .globl _sin +_sin: + fldl 4(%esp) + fsin + fstsw + sahf + jnp L1 + fstp %st(0) + fldl L0 +L1: + ret + diff --git a/linux-0.11-lab/newlibc/math/sinh.c b/linux-0.11-lab/newlibc/math/sinh.c new file mode 100644 index 0000000..4f9f09d --- /dev/null +++ b/linux-0.11-lab/newlibc/math/sinh.c @@ -0,0 +1,7 @@ +#include + +double sinh(double x) +{ + return (exp(x) - exp(-x)) / 2.0; +} + diff --git a/linux-0.11-lab/newlibc/math/sqrt.s b/linux-0.11-lab/newlibc/math/sqrt.s new file mode 100644 index 0000000..73b1137 --- /dev/null +++ b/linux-0.11-lab/newlibc/math/sqrt.s @@ -0,0 +1,19 @@ +/* This is file SQRT.S */ +/* +** Copyright (C) 1991 DJ Delorie, 24 Kirsten Ave, Rochester NH 03867-2954 +** +** This file is distributed under the terms listed in the document +** "copying.dj", available from DJ Delorie at the address above. +** A copy of "copying.dj" should accompany this file; if not, a copy +** should be available from where this file was obtained. This file +** may not be distributed without a verbatim copy of "copying.dj". +** +** This file is distributed WITHOUT ANY WARRANTY; without even the implied +** warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +*/ + + .globl _sqrt +_sqrt: + fldl 4(%esp) + fsqrt + ret diff --git a/linux-0.11-lab/newlibc/math/tan.s b/linux-0.11-lab/newlibc/math/tan.s new file mode 100644 index 0000000..eef28be --- /dev/null +++ b/linux-0.11-lab/newlibc/math/tan.s @@ -0,0 +1,30 @@ +/* This is file TAN.S */ +/* +** Copyright (C) 1991 DJ Delorie, 24 Kirsten Ave, Rochester NH 03867-2954 +** +** This file is distributed under the terms listed in the document +** "copying.dj", available from DJ Delorie at the address above. +** A copy of "copying.dj" should accompany this file; if not, a copy +** should be available from where this file was obtained. This file +** may not be distributed without a verbatim copy of "copying.dj". +** +** This file is distributed WITHOUT ANY WARRANTY; without even the implied +** warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +*/ + +L0: + .quad 0xffffffffffffffff + + .globl _tan +_tan: + fldl 4(%esp) + fptan + fstsw + fstp %st(0) + sahf + jnp L1 + fstp %st(0) + fldl L0 +L1: + ret + diff --git a/linux-0.11-lab/newlibc/math/tanh.c b/linux-0.11-lab/newlibc/math/tanh.c new file mode 100644 index 0000000..1ffb6ce --- /dev/null +++ b/linux-0.11-lab/newlibc/math/tanh.c @@ -0,0 +1,7 @@ +#include + +double tanh(double x) +{ + return (exp(x) - exp(-x)) / (exp(x) + exp(-x)); +} + diff --git a/linux-0.11-lab/newlibc/misc/Makefile b/linux-0.11-lab/newlibc/misc/Makefile new file mode 100644 index 0000000..e68eea0 --- /dev/null +++ b/linux-0.11-lab/newlibc/misc/Makefile @@ -0,0 +1,52 @@ +# +# Makefile for some odd library functions +# + +XCFLAGS =-DSOFT_387 +LIB =../Libc.a +AR =/usr/local/bin/ar +AS =/usr/local/bin/as +LD =/usr/local/bin/ld +LDFLAGS =-s -x +CC =/usr/local/bin/gcc -B/usr/local/bin/ +INC =-nostdinc -I. -I../include +CFLAGS =-Wall -O -fstrength-reduce -fomit-frame-pointer $(INC) \ + $(XCFLAGS) +CPP =$(CC) -E $(INC) $(XCFLAGS) + +.SUFFIXES: .S .o + +.S.o: + $(CPP) -c -o $*.s $< + $(AS) -c -o $*.o $*.s + $(RM) -f $*.s +.c.s: + $(CC) $(CFLAGS) -S -o $*.s $< +.s.o: + $(CC) -c -o $*.o $< +.c.o: + $(CC) $(CFLAGS) -c -o $*.o $< + +OBJS = bcopy.o ldexp.o modf.o tmpnam.o \ + readv.o writev.o values.o perror.o +#atexit.o exit.o +#OBJS = bcopy.o ldexp.o modf.o perror.o tmpnam.o readv.o writev.o +#OBJS = bcopy.o frexp.o ldexp.o modf.o + +all: library + +library: $(OBJS) + $(AR) uvc $(LIB) $(OBJS) + sync + +clean: + $(RM) -f core *.o *.a tmp_make + for i in *.c;do $(RM) -f `basename $$i .c`.s;done + +dep: + sed '/\#\#\# Dependencies/q' < Makefile > tmp_make + (for i in *.c;do echo -n `echo $$i | sed 's,\.c,\.s,'`" "; \ + $(CPP) -M $$i;done) >> tmp_make + cp tmp_make Makefile + +### Dependencies: diff --git a/linux-0.11-lab/newlibc/misc/README b/linux-0.11-lab/newlibc/misc/README new file mode 100644 index 0000000..b39206a --- /dev/null +++ b/linux-0.11-lab/newlibc/misc/README @@ -0,0 +1,7 @@ +These files are from all over the places. I didn't put readv () in +libc.a. You can add it your self. It will be in libc.a when gcc 2.0 +is released. + +H.J. Lu +hlu@eecs.wsu.edu +02/18/92 diff --git a/linux-0.11-lab/newlibc/misc/atexit.c b/linux-0.11-lab/newlibc/misc/atexit.c new file mode 100644 index 0000000..5be41c5 --- /dev/null +++ b/linux-0.11-lab/newlibc/misc/atexit.c @@ -0,0 +1,55 @@ +/* This file may have been modified by DJ Delorie (Jan 1991). If so, +** these modifications are Coyright (C) 1991 DJ Delorie, 24 Kirsten Ave, +** Rochester NH, 03867-2954, USA. +*/ + +/*- + * Copyright (c) 1990 The Regents of the University of California. + * All rights reserved. + * + * This code is derived from software contributed to Berkeley by + * Chris Torek. + * + * Redistribution and use in source and binary forms are permitted + * provided that: (1) source distributions retain this entire copyright + * notice and comment, and (2) distributions including binaries display + * the following acknowledgement: ``This product includes software + * developed by the University of California, Berkeley and its contributors'' + * in the documentation or other materials provided with the distribution + * and in all advertising materials mentioning features or use of this + * software. Neither the name of the University nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + */ + +#if defined(LIBC_SCCS) && !defined(lint) +static char sccsid[] = "@(#)atexit.c 5.1 (Berkeley) 5/15/90"; +#endif /* LIBC_SCCS and not lint */ + +#include +#include +#include + +/* + * Register a function to be performed at exit. + */ +int +atexit(void (*fn)(void)) +{ + static struct atexit __atexit0; /* one guaranteed table */ + register struct atexit *p; + + if ((p = __atexit) == NULL) + __atexit = p = &__atexit0; + if (p->ind >= ATEXIT_SIZE) { + if ((p = (struct atexit *) malloc(sizeof(*p))) == NULL) + return (-1); + __atexit->next = p; + __atexit = p; + } + p->fns[p->ind++] = fn; + return (0); +} diff --git a/linux-0.11-lab/newlibc/misc/bcopy.s b/linux-0.11-lab/newlibc/misc/bcopy.s new file mode 100644 index 0000000..3914344 --- /dev/null +++ b/linux-0.11-lab/newlibc/misc/bcopy.s @@ -0,0 +1,105 @@ +/* + * Copyright 1990,91 by Thomas Roell, Dinkelscherben, Germany. + * + * Permission to use, copy, modify, distribute, and sell this software and its + * documentation for any purpose is hereby granted without fee, provided that + * the above copyright notice appear in all copies and that both that + * copyright notice and this permission notice appear in supporting + * documentation, and that the name of Thomas Roell not be used in + * advertising or publicity pertaining to distribution of the software without + * specific, written prior permission. Thomas Roell makes no representations + * about the suitability of this software for any purpose. It is provided + * "as is" without express or implied warranty. + * + * THOMAS ROELL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, + * INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO + * EVENT SHALL THOMAS ROELL BE LIABLE FOR ANY SPECIAL, INDIRECT OR + * CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, + * DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER + * TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR + * PERFORMANCE OF THIS SOFTWARE. + * + * Author: Thomas Roell, roell@informatik.tu-muenchen.de + * + * $Header: /proj/X11/mit/server/ddx/at386/bsdemul/RCS/bcopy.s,v 1.5 91/02/10 16:23:21 root Exp $ + */ + +/* + * bcopy (b1, b2, length) + * register unsigned char *b1, *b2; + * register length; + * { + * if (b1 < b2) { + * b2 += length; + * b1 += length; + * while (length--) { + * *--b2 = *--b1; + * } + * } + * else { + * while (length--) { + * *b2++ = *b1++; + * } + * } + * } + */ + + .text + .globl _bcopy + .align 2 +_bcopy: + pushl %ebp + movl %esp,%ebp + pushl %esi /* save register */ + pushl %edi + + movl 8(%ebp),%esi /* unsigned char * b1 */ + movl 12(%ebp),%edi /* unsigned char * b2 */ + movl 16(%ebp),%ecx /* length */ + + cmpl %esi,%edi + jbe .uploop + + std + addl %ecx,%esi /* adjust pointer, so that we can move */ + addl %ecx,%edi + + movl %ecx,%edx + shrl $2,%ecx + subl $4,%esi + subl $4,%edi + rep /* move longwords */ + movsl + addl $4,%esi + addl $4,%edi + + movl %edx,%ecx + andl $3,%ecx + + decl %esi + decl %edi + rep /* move bytes */ + movsb + + cld + popl %edi + popl %esi + leave + ret + +.uploop: + movl %ecx,%edx + shrl $2,%ecx + rep /* move longwords */ + movsl + + movl %edx,%ecx + andl $3,%ecx + + rep /* move bytes */ + movsb + + popl %edi + popl %esi + leave + ret diff --git a/linux-0.11-lab/newlibc/misc/exit.c b/linux-0.11-lab/newlibc/misc/exit.c new file mode 100644 index 0000000..fc19533 --- /dev/null +++ b/linux-0.11-lab/newlibc/misc/exit.c @@ -0,0 +1,32 @@ +/* +** Copyright (C) 1991 DJ Delorie, 24 Kirsten Ave, Rochester NH 03867-2954 +** +** This file is distributed under the terms listed in the document +** "copying.dj", available from DJ Delorie at the address above. +** A copy of "copying.dj" should accompany this file; if not, a copy +** should be available from where this file was obtained. This file +** may not be distributed without a verbatim copy of "copying.dj". +** +** This file is distributed WITHOUT ANY WARRANTY; without even the implied +** warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +*/ + +#include + +extern void _cleanup (); +extern void _exit(int exit_code); + +void +exit(code) + int code; +{ + struct atexit *a = __atexit; + while (a) + { + while (a->ind) + (a->fns[--a->ind])(); + a = a->next; + } + _cleanup(); + _exit(code); +} diff --git a/linux-0.11-lab/newlibc/misc/frexp.c b/linux-0.11-lab/newlibc/misc/frexp.c new file mode 100644 index 0000000..c0b3247 --- /dev/null +++ b/linux-0.11-lab/newlibc/misc/frexp.c @@ -0,0 +1,26 @@ +#include + +double frexp(double x, int *i) +{ + double rv = x; + int sign=1; + int ri = 0; + if (rv < 0) + { + sign = -1; + rv = -rv; + } + while (rv > 1) + { + ri++; + rv /= 2.0; + } + while (rv < 0.5) + { + ri--; + rv *= 2; + } + *i = ri; + return rv*sign; +} + diff --git a/linux-0.11-lab/newlibc/misc/ldexp.c b/linux-0.11-lab/newlibc/misc/ldexp.c new file mode 100644 index 0000000..3e94415 --- /dev/null +++ b/linux-0.11-lab/newlibc/misc/ldexp.c @@ -0,0 +1,11 @@ +#include "soft.h" + +/* Adds 'e' to binary exponent of d (unless d=0), result is returned + */ +double ldexp(double d, int e) +{ + struct bitdouble *dp = (struct bitdouble *)&d; + + if (dp->exp) dp->exp += e; + return d; +} diff --git a/linux-0.11-lab/newlibc/misc/modf.c b/linux-0.11-lab/newlibc/misc/modf.c new file mode 100644 index 0000000..76e0e25 --- /dev/null +++ b/linux-0.11-lab/newlibc/misc/modf.c @@ -0,0 +1,120 @@ +/* This file has been modified by Hongjiu Lu (Feb 1992). + */ + +/* This file may have been modified by DJ Delorie (Jan 1991). If so, +** these modifications are Coyright (C) 1991 DJ Delorie, 24 Kirsten Ave, +** Rochester NH, 03867-2954, USA. +*/ + +/*- + * Copyright (c) 1990 The Regents of the University of California. + * All rights reserved. + * + * This code is derived from software contributed to Berkeley by + * Sean Eric Fagan + * + * Redistribution and use in source and binary forms are permitted + * provided that: (1) source distributions retain this entire copyright + * notice and comment, and (2) distributions including binaries display + * the following acknowledgement: ``This product includes software + * developed by the University of California, Berkeley and its contributors'' + * in the documentation or other materials provided with the distribution + * and in all advertising materials mentioning features or use of this + * software. Neither the name of the University nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + */ + +#ifndef SOFT_387 + +#if defined(LIBC_SCCS) && !defined(lint) +static char sccsid[] = "@(#)modf.c 5.1 (Berkeley) 4/23/90"; +#endif /* LIBC_SCCS and not lint */ + +/* + * modf(value, iptr): return fractional part of value, and stores the + * integral part into iptr (a pointer to double). + * + * Written by Sean Eric Fagan (sef@kithrup.COM) + * Sun Mar 11 20:27:30 PST 1990 + */ + +/* With CHOP mode on, frndint behaves as TRUNC does. Useful. */ +double +modf(double value, double *iptr) +{ + double temp; + volatile short i87flag, i87temp; + __asm ("fnstcw %0" : "=m" (i87flag) : ); + i87temp = i87flag | 0xc00 ; /* turn on chop mode [truncation] */ + __asm ("fldcw %0" : : "m" (i87temp)); +#ifdef PRE_GCC_2 + __asm ("frndint" : "=t" (temp) : "0" (value)); /* temp = int of value */ +#else + __asm ("frndint" : "=f" (temp) : "0" (value)); /* temp = int of value */ +#endif + __asm ("fldcw %0" : : "m" (i87flag)); + *iptr = temp; + return (value - temp); +} + +#else + +#include "soft.h" + +#define shiftleft(dp,n) { /* n = 0 to 32 */ \ + dp->mant1 = ((dp->mant1 << (n)) + (dp->mant2 >> (32-(n)))) \ + & 0x0FFFFF; dp->mant2 <<= (n); dp->exp -= (n); } + + +/* Returns fractional part of d, stores integer part in *integ + */ +double modf(double d, double *integ) +{ + struct bitdouble *dp = (struct bitdouble *)&d; + struct bitdouble *ip = (struct bitdouble *)integ; + int e = dp->exp - BIAS; + + if (e < 0) { /* no integer part */ + *integ = 0; + return d; + } + + /* compute integer: clear fractional part where necessary + */ + *integ = d; + if (e <= 20) { + ip->mant1 &= (-1L << (20-e)); /* split in mant1... */ + ip->mant2 = 0; + } + else + if (e <= 52) + ip->mant2 &= (-1L << (52-e)); /* split in mant2 */ + else return 0; /* no fractional part */ + + /* compute fractional part: shift left over integer part + */ + if (e) + if (e <= 32) + shiftleft(dp,e) + else { + dp->mant1 = (dp->mant2 << (e-32)) & 0x0FFFFF; + dp->mant2 = 0; + dp->exp -= e; + } + + /* adjust fractional part shifting left... + */ + if (dp->mant1==0 && dp->mant2==0) /* fraction is zero */ + return 0; + + while (!(dp->mant1 & 0x080000)) /* stack to the left */ + shiftleft(dp,1); + + shiftleft(dp,1); /* lose 'invisible bit' */ + return d; +} +#endif diff --git a/linux-0.11-lab/newlibc/misc/perror.c b/linux-0.11-lab/newlibc/misc/perror.c new file mode 100644 index 0000000..a1a1f6a --- /dev/null +++ b/linux-0.11-lab/newlibc/misc/perror.c @@ -0,0 +1,48 @@ +/* + * Copyright (c) 1980 Regents of the University of California. + * All rights reserved. The Berkeley software License Agreement + * specifies the terms and conditions for redistribution. + */ + +#if defined(LIBC_SCCS) && !defined(lint) +static char sccsid[] = "@(#)perror.c 5.2 (Berkeley) 3/9/86"; +#endif LIBC_SCCS and not lint + +/* + * Print the error indicated + * in the cerror cell. + */ +#include +#include + +#ifdef linux +#include +extern char *strerror(int n); +extern int writev(int handle, struct iovec *iov, int count); +#endif + +extern int errno; +extern int sys_nerr; +extern char *sys_errlist[]; + +void +perror(char *s) +{ + struct iovec iov[4]; + register struct iovec *v = iov; + + if (s && *s) { + v->iov_base = s; + v->iov_len = strlen(s); + v++; + v->iov_base = ": "; + v->iov_len = 2; + v++; + } + v->iov_base = strerror (errno); + v->iov_len = strlen(v->iov_base); + v++; + v->iov_base = "\n"; + v->iov_len = 1; + (void) writev(2, iov, (v - iov) + 1); +} diff --git a/linux-0.11-lab/newlibc/misc/readv.c b/linux-0.11-lab/newlibc/misc/readv.c new file mode 100644 index 0000000..d10dcb1 --- /dev/null +++ b/linux-0.11-lab/newlibc/misc/readv.c @@ -0,0 +1,40 @@ +/* This file has been modified by H.J. Lu. */ + +/* This is file READV.C */ +/* +** Copyright (C) 1991 DJ Delorie, 24 Kirsten Ave, Rochester NH 03867-2954 +** +** This file is distributed under the terms listed in the document +** "copying.dj", available from DJ Delorie at the address above. +** A copy of "copying.dj" should accompany this file; if not, a copy +** should be available from where this file was obtained. This file +** may not be distributed without a verbatim copy of "copying.dj". +** +** This file is distributed WITHOUT ANY WARRANTY; without even the implied +** warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +** +** Modified by H.J. Lu 1992 +*/ + +#include +#include + +#ifdef linux +#include +#endif + +int +readv(int handle, const struct iovec *iov, size_t count) +{ + int r, t=0; + + while (count) { + r = read(handle, iov->iov_base, iov->iov_len); + if (r < 0) + return r; + t += r; + iov++; + count--; + } + return t; +} diff --git a/linux-0.11-lab/newlibc/misc/tmpnam.c b/linux-0.11-lab/newlibc/misc/tmpnam.c new file mode 100644 index 0000000..26f8ed7 --- /dev/null +++ b/linux-0.11-lab/newlibc/misc/tmpnam.c @@ -0,0 +1,105 @@ +/* This is file TMPNAM.C */ +/* This file may have been modified by DJ Delorie (Jan 1991). If so, +** these modifications are Coyright (C) 1991 DJ Delorie, 24 Kirsten Ave, +** Rochester NH, 03867-2954, USA. +*/ + +/* + * Copyright (c) 1988 Regents of the University of California. + * All rights reserved. + * + * Redistribution and use in source and binary forms are permitted provided + * that: (1) source distributions retain this entire copyright notice and + * comment, and (2) distributions including binaries display the following + * acknowledgement: ``This product includes software developed by the + * University of California, Berkeley and its contributors'' in the + * documentation or other materials provided with the distribution and in + * all advertising materials mentioning features or use of this software. + * Neither the name of the University nor the names of its contributors may + * be used to endorse or promote products derived from this software without + * specific prior written permission. + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + */ + +#if defined(LIBC_SCCS) && !defined(lint) +static char sccsid[] = "@(#)tmpnam.c 4.8 (Berkeley) 6/22/90"; +#endif /* LIBC_SCCS and not lint */ + +#include +#include +#include + +#ifdef linux +#include +#include +#include + +#define MAXPATHLEN PATH_MAX + +extern char *mktemp(char * template); +#endif + +#ifndef P_tmpdir +#define P_tmpdir "/usr/tmp" +#endif + +char * +tmpnam(s) + char *s; +{ +#ifndef linux + char *malloc(), *mktemp(); +#endif + + if (!s && !(s = (char *) malloc((unsigned int)MAXPATHLEN))) + return(NULL); + (void)sprintf(s, "%s/XXXXXX", P_tmpdir); + return(mktemp(s)); +} + +char * +tempnam(dir, pfx) + char *dir, *pfx; +{ + char *f, *name; +#ifndef linux + char *getenv(), *malloc(), *mktemp(); +#endif + + if (!(name = (char *) malloc((unsigned int)MAXPATHLEN))) + return(NULL); + + if (f = getenv("TMPDIR")) { + (void)sprintf(name, "%s/%sXXXXXX", f, pfx ? "" : pfx); + if (f = mktemp(name)) + return(f); + } + if (dir) { + (void)sprintf(name, "%s/%sXXXXXX", dir, pfx ? "" : pfx); + if (f = mktemp(name)) + return(f); + } + (void)sprintf(name, "%s/%sXXXXXX", P_tmpdir, pfx ? "" : pfx); + if (f = mktemp(name)) + return(f); + (void)sprintf(name, "/tmp/%sXXXXXX", pfx ? "" : pfx); + if (!(f = mktemp(name))) + (void)free(name); + return(f); +} + +FILE * +tmpfile() +{ + FILE *fp; + char *f; + + if (!(f = tmpnam((char *)NULL)) || !(fp = fopen(f, "w+"))) { + fprintf(stderr, "tmpfile: cannot open %s.\n", f); + return(NULL); + } + (void)unlink(f); + return(fp); +} diff --git a/linux-0.11-lab/newlibc/misc/values.s b/linux-0.11-lab/newlibc/misc/values.s new file mode 100644 index 0000000..376a0d1 --- /dev/null +++ b/linux-0.11-lab/newlibc/misc/values.s @@ -0,0 +1,53 @@ +// +// This file is part of the alternative 80386 math library and is +// covered by the GNU General Public license with my modification +// as noted in the README file that accompanied this file. +// +// Copyright 1990 G. Geers +// +// Modified by H.J. Lu +// + + .file "values.s" + + .align 2 + .globl _isnan +_isnan: + movl 8(%esp),%eax + andl $0x7ff00000,%eax + cmpl $0x7ff00000,%eax + jne Lnotnan + movl 8(%esp),%eax + andl $0xfffff,%eax + orl 4(%esp),%eax + je Lnotnan + + xorl %eax,%eax + incl %eax + ret + +Lnotnan: + xorl %eax,%eax + ret + + .align 2 + .globl _isinf +_isinf: + movl 8(%esp),%eax + andl $0x7ff00000, %eax + cmpl $0x7ff00000, %eax + je Lcouldbeinf + +Lnotinf: + xorl %eax,%eax + ret + +Lcouldbeinf: + movl 8(%esp),%eax + andl $0xfffff,%eax + orl 4(%esp),%eax + jne Lnotinf + + xorl %eax,%eax + incl %eax + ret diff --git a/linux-0.11-lab/newlibc/misc/writev.c b/linux-0.11-lab/newlibc/misc/writev.c new file mode 100644 index 0000000..2f458b8 --- /dev/null +++ b/linux-0.11-lab/newlibc/misc/writev.c @@ -0,0 +1,38 @@ +/* This file has been modified by H.J. Lu. */ + +/* This is file WRITEV.C */ +/* +** Copyright (C) 1991 DJ Delorie, 24 Kirsten Ave, Rochester NH 03867-2954 +** +** This file is distributed under the terms listed in the document +** "copying.dj", available from DJ Delorie at the address above. +** A copy of "copying.dj" should accompany this file; if not, a copy +** should be available from where this file was obtained. This file +** may not be distributed without a verbatim copy of "copying.dj". +** +** This file is distributed WITHOUT ANY WARRANTY; without even the implied +** warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +*/ + +#include +#include + +#ifdef linux +#include +#endif + +int +writev(int handle, const struct iovec *iov, size_t count) +{ + int r, t=0; + + while (count) { + r = write(handle, iov->iov_base, iov->iov_len); + if (r < 0) + return r; + t += r; + iov++; + count--; + } + return t; +} diff --git a/linux-0.11-lab/newlibc/mlinux/Makefile b/linux-0.11-lab/newlibc/mlinux/Makefile new file mode 100644 index 0000000..57a616d --- /dev/null +++ b/linux-0.11-lab/newlibc/mlinux/Makefile @@ -0,0 +1,36 @@ +# This is Makefile of the math lib for Linux +# +LIB=../Libm.a +CC= /usr2/linux/cross/bin/gcc -B/usr2/linux/cross/lib/gcc- +CFLAGS = -Wall -O -fstrength-reduce -fomit-frame-pointer $(INC) +INC=-nostdinc -I. -I/usr2/linux/lib.new/2.0 -I/usr2/linux/usr/include +CPP=$(CC) -E $(INC) +AR=/usr2/linux/cross/bin/ar +RM=/bin/rm + +.s.o : + $(CC) $(CFLAGS) -c $*.s + +.c.o : + $(CC) $(CFLAGS) -c $*.c + +OBJS = acos.o acosh.o asin.o asinh.o atan.o atan2.o atanh.o ceil.o \ + cos.o cosh.o exp.o fabs.o floor.o fmod.o frexp.o hypot.o \ + log.o log10.o sin.o sinh.o sqrt.o tan.o tanh.o \ + erf.o j0.o j1.o jn.o lgamma.o + +library: $(OBJS) + $(AR) uvc $(LIB) $(OBJS) + sync + +clean: + $(RM) -f core *.o *.a tmp_make + for i in *.c;do $(RM) -f `basename $$i .c`.s;done + +dep: + sed '/\#\#\# Dependencies/q' < Makefile > tmp_make + (for i in *.c;do echo -n `echo $$i | sed 's,\.c,\.s,'`" "; \ + $(CPP) -M $$i;done) >> tmp_make + cp tmp_make Makefile + +### Dependencies: diff --git a/linux-0.11-lab/newlibc/mlinux/README b/linux-0.11-lab/newlibc/mlinux/README new file mode 100644 index 0000000..2dc9009 --- /dev/null +++ b/linux-0.11-lab/newlibc/mlinux/README @@ -0,0 +1,8 @@ +This is the math lib for Linux. Some of them are borrowed from DJ +Delorie and BSD 4.3 and are covered by respective copyright notices. +The rest is written by me, which is covered by the GNU General Public +license version 2, or any later version. + +H.J. Lu +02/17/92 +hlu@eecs.wsu.edu diff --git a/linux-0.11-lab/newlibc/mlinux/acos.s b/linux-0.11-lab/newlibc/mlinux/acos.s new file mode 100644 index 0000000..3e2c194 --- /dev/null +++ b/linux-0.11-lab/newlibc/mlinux/acos.s @@ -0,0 +1,33 @@ +/* This is file ACOS.S */ +/* +** Copyright (C) 1991 DJ Delorie, 24 Kirsten Ave, Rochester NH 03867-2954 +** +** This file is distributed under the terms listed in the document +** "copying.dj", available from DJ Delorie at the address above. +** A copy of "copying.dj" should accompany this file; if not, a copy +** should be available from where this file was obtained. This file +** may not be distributed without a verbatim copy of "copying.dj". +** +** This file is distributed WITHOUT ANY WARRANTY; without even the implied +** warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +*/ + + .text + .globl _acos + .align 2 +_acos: + fldl 4(%esp) + fld1 + fsubp %st(0),%st(1) + fsqrt + + fldl 4(%esp) + fld1 + faddp %st(0),%st(1) + fsqrt + + fpatan + + fld %st(0) + faddp + ret diff --git a/linux-0.11-lab/newlibc/mlinux/acosh.s b/linux-0.11-lab/newlibc/mlinux/acosh.s new file mode 100644 index 0000000..ddfac1b --- /dev/null +++ b/linux-0.11-lab/newlibc/mlinux/acosh.s @@ -0,0 +1,30 @@ +// +// This file is part of the alternative 80386 math library and is +// covered by the GNU General Public license with my modification +// as noted in the README file that accompanied this file. +// +// Copyright 1990 G. Geers +// +// Modified by H.J. Lu for Linux 1992 +// + + .file "acosh.s" + + .align 2 + .globl _acosh +_acosh: + fldl 4(%esp) + fmull 4(%esp) + + fld1 + fsubrp + fsqrt + + faddl 4(%esp) + + fldln2 + + fxch %st(1) + fyl2x + + ret diff --git a/linux-0.11-lab/newlibc/mlinux/asin.s b/linux-0.11-lab/newlibc/mlinux/asin.s new file mode 100644 index 0000000..f2e518a --- /dev/null +++ b/linux-0.11-lab/newlibc/mlinux/asin.s @@ -0,0 +1,29 @@ +/* This is file ASIN.S */ +/* +** Copyright (C) 1991 DJ Delorie, 24 Kirsten Ave, Rochester NH 03867-2954 +** +** This file is distributed under the terms listed in the document +** "copying.dj", available from DJ Delorie at the address above. +** A copy of "copying.dj" should accompany this file; if not, a copy +** should be available from where this file was obtained. This file +** may not be distributed without a verbatim copy of "copying.dj". +** +** This file is distributed WITHOUT ANY WARRANTY; without even the implied +** warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +*/ + +/* History:11,23 */ + .text + .align 2 + .globl _asin +_asin: + fldl 4(%esp) + fld %st(0) + fmulp + fld1 + fsubp + fsqrt + fldl 4(%esp) + fxch %st(1) + fpatan + ret diff --git a/linux-0.11-lab/newlibc/mlinux/asinh.s b/linux-0.11-lab/newlibc/mlinux/asinh.s new file mode 100644 index 0000000..b59e3c4 --- /dev/null +++ b/linux-0.11-lab/newlibc/mlinux/asinh.s @@ -0,0 +1,27 @@ +// +// This file is part of the alternative 80386 math library and is +// covered by the GNU General Public license with my modification +// as noted in the README file that accompanied this file. +// +// Copyright 1990 G. Geers +// +// Modified by H.J. Lu for Linux 1992 +// + + .file "asinh.s" + + .align 2 + .globl _asinh +_asinh: + fldl 4(%esp) + + fmull 4(%esp) + fld1 + faddp + fsqrt + faddl 4(%esp) + fldln2 + fxch %st(1) + fyl2x + + ret diff --git a/linux-0.11-lab/newlibc/mlinux/atan.s b/linux-0.11-lab/newlibc/mlinux/atan.s new file mode 100644 index 0000000..e65bcd6 --- /dev/null +++ b/linux-0.11-lab/newlibc/mlinux/atan.s @@ -0,0 +1,21 @@ +/* This is file ATAN.S */ +/* +** Copyright (C) 1991 DJ Delorie, 24 Kirsten Ave, Rochester NH 03867-2954 +** +** This file is distributed under the terms listed in the document +** "copying.dj", available from DJ Delorie at the address above. +** A copy of "copying.dj" should accompany this file; if not, a copy +** should be available from where this file was obtained. This file +** may not be distributed without a verbatim copy of "copying.dj". +** +** This file is distributed WITHOUT ANY WARRANTY; without even the implied +** warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +*/ + .text + .align 2 + .globl _atan +_atan: + fldl 4(%esp) + fld1 + fpatan + ret diff --git a/linux-0.11-lab/newlibc/mlinux/atan2.s b/linux-0.11-lab/newlibc/mlinux/atan2.s new file mode 100644 index 0000000..6f72f40 --- /dev/null +++ b/linux-0.11-lab/newlibc/mlinux/atan2.s @@ -0,0 +1,22 @@ +/* This is file ATAN2.S */ +/* +** Copyright (C) 1991 DJ Delorie, 24 Kirsten Ave, Rochester NH 03867-2954 +** +** This file is distributed under the terms listed in the document +** "copying.dj", available from DJ Delorie at the address above. +** A copy of "copying.dj" should accompany this file; if not, a copy +** should be available from where this file was obtained. This file +** may not be distributed without a verbatim copy of "copying.dj". +** +** This file is distributed WITHOUT ANY WARRANTY; without even the implied +** warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +*/ + + .text + .align 2 + .globl _atan2 +_atan2: + fldl 4(%esp) + fldl 12(%esp) + fpatan + ret diff --git a/linux-0.11-lab/newlibc/mlinux/atanh.s b/linux-0.11-lab/newlibc/mlinux/atanh.s new file mode 100644 index 0000000..e4d6a84 --- /dev/null +++ b/linux-0.11-lab/newlibc/mlinux/atanh.s @@ -0,0 +1,35 @@ +// +// This file is part of the alternative 80386 math library and is +// covered by the GNU General Public license with my modification +// as noted in the README file that accompanied this file. +// +// Copyright 1990 G. Geers +// +// Modified by H.J. Lu for Linux 1992 +// +// + + .file "atanh.s" + + .text + .align 2 +Lhalf: + .double 0d5.0000000000000000000000e-01 + + .align 2 + .globl _atanh +_atanh: + fld1 + faddl 4(%esp) + fld1 + fsubl 4(%esp) + fdivrp + + fldln2 + fxch %st(1) + fyl2x + + fldl Lhalf + fmulp + + ret diff --git a/linux-0.11-lab/newlibc/mlinux/ceil.s b/linux-0.11-lab/newlibc/mlinux/ceil.s new file mode 100644 index 0000000..2913b9f --- /dev/null +++ b/linux-0.11-lab/newlibc/mlinux/ceil.s @@ -0,0 +1,38 @@ +/* This is file CEIL.S */ +/* +** Copyright (C) 1991 DJ Delorie, 24 Kirsten Ave, Rochester NH 03867-2954 +** +** This file is distributed under the terms listed in the document +** "copying.dj", available from DJ Delorie at the address above. +** A copy of "copying.dj" should accompany this file; if not, a copy +** should be available from where this file was obtained. This file +** may not be distributed without a verbatim copy of "copying.dj". +** +** This file is distributed WITHOUT ANY WARRANTY; without even the implied +** warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +*/ + + .text + .align 2 + .globl _ceil +_ceil: + pushl %ebp + movl %esp,%ebp + sub $8,%esp /* -4 = old CW, -2 = new CW */ + + fstcw -4(%ebp) + fwait + movw -4(%ebp),%ax + andw $0xf3ff,%ax + orw $0x0800,%ax + movw %ax,-2(%ebp) + fldcww -2(%ebp) + + fldl 8(%ebp) + frndint + + fldcww -4(%ebp) + + movl %ebp,%esp + popl %ebp + ret diff --git a/linux-0.11-lab/newlibc/mlinux/cos.s b/linux-0.11-lab/newlibc/mlinux/cos.s new file mode 100644 index 0000000..8058809 --- /dev/null +++ b/linux-0.11-lab/newlibc/mlinux/cos.s @@ -0,0 +1,32 @@ +// +// This file is part of the math library for Linux and is +// covered by the GNU General Public license version 2, or +// any later version. +// +// Copyright 1992 by H.J. Lu +// + .file "cos.s" + .text + .align 2 + .globl _cos +_cos: + fldl 4(%esp) + jmp L3 +L1: + fldpi + fld %st(0) + faddp %st,%st(1) + fxch %st(1) +L2: + fprem1 + fstsw %ax + sahf + jp L2 + fxch %st(1) + fstp %st(0) +L3: + fcos + fstsw %ax + sahf + jp L1 + ret diff --git a/linux-0.11-lab/newlibc/mlinux/cosh.s b/linux-0.11-lab/newlibc/mlinux/cosh.s new file mode 100644 index 0000000..669c38b --- /dev/null +++ b/linux-0.11-lab/newlibc/mlinux/cosh.s @@ -0,0 +1,50 @@ +// +// This file is part of the math library for Linux and is +// covered by the GNU General Public license version 2, or +// any later version. +// +// Copyright 1992 by H.J. Lu +// + .file "cosh.s" + .data + .align 2 +LCW1: + .word 0 +LCW2: + .word 0 + + .text + .align 2 +LC2: + .double 0d5.0000000000000000000000e-01 + + .align 2 + .globl _cosh +_cosh: + fldl 4(%esp) + fldl2e + fmulp %st,%st(1) + fst %st(1) + fstcw LCW1 + fstcw LCW2 + fwait + andw $0xf3ff,LCW1 + fldcw LCW1 + frndint + fldcw LCW2 + fst %st(2) + fsubrp %st,%st(1) + f2xm1 + fld1 + faddp %st,%st(1) + fscale + fst %st(1) + + fld1 + fdivp %st,%st(1) + faddp %st,%st(1) + + fldl LC2 + fmulp %st,%st(1) + + ret diff --git a/linux-0.11-lab/newlibc/mlinux/erf.c b/linux-0.11-lab/newlibc/mlinux/erf.c new file mode 100644 index 0000000..a3fe575 --- /dev/null +++ b/linux-0.11-lab/newlibc/mlinux/erf.c @@ -0,0 +1,124 @@ +/* + * Copyright (c) 1985 Regents of the University of California. + * All rights reserved. The Berkeley software License Agreement + * specifies the terms and conditions for redistribution. + */ + +#ifndef lint +static char sccsid[] = "@(#)erf.c 5.2 (Berkeley) 4/29/88"; +#endif /* not lint */ + +/* + C program for floating point error function + + erf(x) returns the error function of its argument + erfc(x) returns 1.0-erf(x) + + erf(x) is defined by + ${2 over sqrt(pi)} int from 0 to x e sup {-t sup 2} dt$ + + the entry for erfc is provided because of the + extreme loss of relative accuracy if erf(x) is + called for large x and the result subtracted + from 1. (e.g. for x= 10, 12 places are lost). + + There are no error returns. + + Calls exp. + + Coefficients for large x are #5667 from Hart & Cheney (18.72D). +*/ + +#include + +#define M 7 +#define N 9 +static double torp = 1.1283791670955125738961589031; +static double p1[] = { + 0.804373630960840172832162e5, + 0.740407142710151470082064e4, + 0.301782788536507577809226e4, + 0.380140318123903008244444e2, + 0.143383842191748205576712e2, + -.288805137207594084924010e0, + 0.007547728033418631287834e0, +}; +static double q1[] = { + 0.804373630960840172826266e5, + 0.342165257924628539769006e5, + 0.637960017324428279487120e4, + 0.658070155459240506326937e3, + 0.380190713951939403753468e2, + 0.100000000000000000000000e1, + 0.0, +}; +static double p2[] = { + 0.18263348842295112592168999e4, + 0.28980293292167655611275846e4, + 0.2320439590251635247384768711e4, + 0.1143262070703886173606073338e4, + 0.3685196154710010637133875746e3, + 0.7708161730368428609781633646e2, + 0.9675807882987265400604202961e1, + 0.5641877825507397413087057563e0, + 0.0, +}; +static double q2[] = { + 0.18263348842295112595576438e4, + 0.495882756472114071495438422e4, + 0.60895424232724435504633068e4, + 0.4429612803883682726711528526e4, + 0.2094384367789539593790281779e4, + 0.6617361207107653469211984771e3, + 0.1371255960500622202878443578e3, + 0.1714980943627607849376131193e2, + 1.0, +}; + +double +erf(double arg) +{ + int sign; + double argsq; + double d, n; + int i; + + sign = 1; + if(arg < 0.){ + arg = -arg; + sign = -1; + } + if(arg < 0.5){ + argsq = arg*arg; + for(n=0,d=0,i=M-1; i>=0; i--){ + n = n*argsq + p1[i]; + d = d*argsq + q1[i]; + } + return(sign*torp*arg*n/d); + } + if(arg >= 10.) + return(sign*1.); + return(sign*(1. - erfc(arg))); +} + +double +erfc(double arg) +{ + double n, d; + int i; + + if(arg < 0.) + return(2. - erfc(-arg)); +/* + if(arg < 0.5) + return(1. - erf(arg)); +*/ + if(arg >= 10.) + return(0.); + + for(n=0,d=0,i=N-1; i>=0; i--){ + n = n*arg + p2[i]; + d = d*arg + q2[i]; + } + return(exp(-arg*arg)*n/d); +} diff --git a/linux-0.11-lab/newlibc/mlinux/exp.s b/linux-0.11-lab/newlibc/mlinux/exp.s new file mode 100644 index 0000000..5581fe8 --- /dev/null +++ b/linux-0.11-lab/newlibc/mlinux/exp.s @@ -0,0 +1,92 @@ +/* This is file EXP.S */ +/* +** Copyright (C) 1991 DJ Delorie, 24 Kirsten Ave, Rochester NH 03867-2954 +** +** Modified O.ROBERT 24, Avenue de Verdun 92170 VANVES, FRANCE +** +** E-mail: roberto@germinal.ibp.fr +** +** This file is distributed under the terms listed in the document +** "copying.dj", available from DJ Delorie at the address above. +** A copy of "copying.dj" should accompany this file; if not, a copy +** should be available from where this file was obtained. This file +** may not be distributed without a verbatim copy of "copying.dj". +** +** This file is distributed WITHOUT ANY WARRANTY; without even the implied +** warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +** +** or 03-Apr-1991 corrected bug about argument zero to pow +** fyl2x didn't like it +*/ + +/* History:15,24 */ + .data +LCW1: + .word 0 +LCW2: + .word 0 + + .text + .align 2 +LC0: + .double 0d1.0e+00 + + .globl _pow2 + .align 2 +_pow2: + fldl 4(%esp) +Lpow2: + fstcw LCW1 + fstcw LCW2 + fwait + andw $0xf3ff,LCW1 + fldcw LCW1 + fldl %st(0) + frndint + fldcw LCW2 + fxch %st(1) + fsub %st(1),%st + f2xm1 + faddl LC0 + fscale + fstp %st(1) + ret + + .globl _exp +_exp: + fldl 4(%esp) + fldl2e + fmulp + jmp Lpow2 + + .globl _pow10 +_pow10: + fldl 4(%esp) + fldl2t + fmulp + jmp Lpow2 + + .globl _pow +_pow: + fldl 4(%esp) + ftst + fnstsww %ax + sahf + je zero1 + fldl 12(%esp) + ftst + fnstsww %ax + sahf + je zero2 + fxch %st(1) + fyl2x + jmp Lpow2 +zero1: + fstpl 4(%esp) + fldzl + ret +zero2: + fstpl 4(%esp) + fstpl 4(%esp) + fld1l + ret diff --git a/linux-0.11-lab/newlibc/mlinux/fabs.s b/linux-0.11-lab/newlibc/mlinux/fabs.s new file mode 100644 index 0000000..312c1d3 --- /dev/null +++ b/linux-0.11-lab/newlibc/mlinux/fabs.s @@ -0,0 +1,14 @@ +// +// This file is part of the math library for Linux and is +// covered by the GNU General Public license version 2, or +// any later version. +// +// Copyright 1992 by H.J. Lu +// + .text + .align 2 + .globl _fabs +_fabs: + fldl 4(%esp) + fabs + ret diff --git a/linux-0.11-lab/newlibc/mlinux/floor.s b/linux-0.11-lab/newlibc/mlinux/floor.s new file mode 100644 index 0000000..988c00f --- /dev/null +++ b/linux-0.11-lab/newlibc/mlinux/floor.s @@ -0,0 +1,38 @@ +/* This is file FLOOR.S */ +/* +** Copyright (C) 1991 DJ Delorie, 24 Kirsten Ave, Rochester NH 03867-2954 +** +** This file is distributed under the terms listed in the document +** "copying.dj", available from DJ Delorie at the address above. +** A copy of "copying.dj" should accompany this file; if not, a copy +** should be available from where this file was obtained. This file +** may not be distributed without a verbatim copy of "copying.dj". +** +** This file is distributed WITHOUT ANY WARRANTY; without even the implied +** warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +*/ + + .text + .align 2 + .globl _floor +_floor: + pushl %ebp + movl %esp,%ebp + sub $8,%esp /* -4 = old CW, -2 = new CW */ + + fstcw -4(%ebp) + fwait + movw -4(%ebp),%ax + andw $0xf3ff,%ax + orw $0x0400,%ax + movw %ax,-2(%ebp) + fldcww -2(%ebp) + + fldl 8(%ebp) + frndint + + fldcww -4(%ebp) + + movl %ebp,%esp + popl %ebp + ret diff --git a/linux-0.11-lab/newlibc/mlinux/fmod.s b/linux-0.11-lab/newlibc/mlinux/fmod.s new file mode 100644 index 0000000..aba16d2 --- /dev/null +++ b/linux-0.11-lab/newlibc/mlinux/fmod.s @@ -0,0 +1,36 @@ +/* This is file FMOD.S */ +/* +** Copyright (C) 1991 O. ROBERT, 24, Avenue de Verdun, 92170 VANVES, FRANCE +** +** Internet: roberto@germinal.ibp.fr +** +** This file is distributed under the terms listed in the document +** "copying.dj", available from DJ Delorie at the address above. +** A copy of "copying.dj" should accompany this file; if not, a copy +** should be available from where this file was obtained. This file +** may not be distributed without a verbatim copy of "copying.dj". +** +** This file is distributed WITHOUT ANY WARRANTY; without even the implied +** warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +*/ + .text + .globl _fmod + .align 2 +_fmod: + fldl 4(%esp) + fldl 12(%esp) + ftst + fnstsw %ax + fxch %st(1) + sahf + jnz next + fstpl %st(0) + jmp out +next: + fpreml + fnstsw %ax + sahf + jpe next + fstpl %st(1) +out: + ret diff --git a/linux-0.11-lab/newlibc/mlinux/frexp.c b/linux-0.11-lab/newlibc/mlinux/frexp.c new file mode 100644 index 0000000..d833426 --- /dev/null +++ b/linux-0.11-lab/newlibc/mlinux/frexp.c @@ -0,0 +1,17 @@ +#include + +/* Stores binary exponent of d in e, and returns whole fraction of d + * (with binary exponent of 0) (special case for d=0) + */ +double frexp(double d, int *e) +{ + struct bitdouble *dp = (struct bitdouble *)&d; + + if (dp->exp == 0) /* value is zero, return exponent of 0 */ + *e = 0; + else { + *e = dp->exp - BIAS + 1; + dp->exp = BIAS - 1; + } + return d; +} diff --git a/linux-0.11-lab/newlibc/mlinux/hypot.s b/linux-0.11-lab/newlibc/mlinux/hypot.s new file mode 100644 index 0000000..6f67ccd --- /dev/null +++ b/linux-0.11-lab/newlibc/mlinux/hypot.s @@ -0,0 +1,23 @@ +// +// This file is part of the alternative 80386 math library and is +// covered by the GNU General Public license with my modification +// as noted in the README file that accompanied this file. +// +// Copyright 1990 G. Geers +// +// Modified by H.J. Lu for Linux 1992 +// + + .file "hypot.s" + + .text + .align 2 + .globl _hypot +_hypot: + fldl 4(%esp) + fmull 4(%esp) + fldl 12(%esp) + fmull 12(%esp) + faddp + fsqrt + ret diff --git a/linux-0.11-lab/newlibc/mlinux/j0.c b/linux-0.11-lab/newlibc/mlinux/j0.c new file mode 100644 index 0000000..159b8a7 --- /dev/null +++ b/linux-0.11-lab/newlibc/mlinux/j0.c @@ -0,0 +1,208 @@ +/* + * Copyright (c) 1985 Regents of the University of California. + * All rights reserved. The Berkeley software License Agreement + * specifies the terms and conditions for redistribution. + */ + +#ifndef lint +static char sccsid[] = "@(#)j0.c 5.3 (Berkeley) 9/22/88"; +#endif /* not lint */ + +/* + floating point Bessel's function + of the first and second kinds + of order zero + + j0(x) returns the value of J0(x) + for all real values of x. + + There are no error returns. + Calls sin, cos, sqrt. + + There is a niggling bug in J0 which + causes errors up to 2e-16 for x in the + interval [-8,8]. + The bug is caused by an inappropriate order + of summation of the series. rhm will fix it + someday. + + Coefficients are from Hart & Cheney. + #5849 (19.22D) + #6549 (19.25D) + #6949 (19.41D) + + y0(x) returns the value of Y0(x) + for positive real values of x. + For x<=0, if on the VAX, error number EDOM is set and + the reserved operand fault is generated; + otherwise (an IEEE machine) an invalid operation is performed. + + Calls sin, cos, sqrt, log, j0. + + The values of Y0 have not been checked + to more than ten places. + + Coefficients are from Hart & Cheney. + #6245 (18.78D) + #6549 (19.25D) + #6949 (19.41D) +*/ + +#include + +#if defined(vax)||defined(tahoe) +#include +#else /* defined(vax)||defined(tahoe) */ +static const double zero = 0.e0; +#endif /* defined(vax)||defined(tahoe) */ + +static double pzero, qzero; + +static const double tpi = .6366197723675813430755350535e0; +static const double pio4 = .7853981633974483096156608458e0; +static const double p1[] = { + 0.4933787251794133561816813446e21, + -.1179157629107610536038440800e21, + 0.6382059341072356562289432465e19, + -.1367620353088171386865416609e18, + 0.1434354939140344111664316553e16, + -.8085222034853793871199468171e13, + 0.2507158285536881945555156435e11, + -.4050412371833132706360663322e8, + 0.2685786856980014981415848441e5, +}; +static const double q1[] = { + 0.4933787251794133562113278438e21, + 0.5428918384092285160200195092e19, + 0.3024635616709462698627330784e17, + 0.1127756739679798507056031594e15, + 0.3123043114941213172572469442e12, + 0.6699987672982239671814028660e9, + 0.1114636098462985378182402543e7, + 0.1363063652328970604442810507e4, + 1.0 +}; +static const double p2[] = { + 0.5393485083869438325262122897e7, + 0.1233238476817638145232406055e8, + 0.8413041456550439208464315611e7, + 0.2016135283049983642487182349e7, + 0.1539826532623911470917825993e6, + 0.2485271928957404011288128951e4, + 0.0, +}; +static const double q2[] = { + 0.5393485083869438325560444960e7, + 0.1233831022786324960844856182e8, + 0.8426449050629797331554404810e7, + 0.2025066801570134013891035236e7, + 0.1560017276940030940592769933e6, + 0.2615700736920839685159081813e4, + 1.0, +}; +static const double p3[] = { + -.3984617357595222463506790588e4, + -.1038141698748464093880530341e5, + -.8239066313485606568803548860e4, + -.2365956170779108192723612816e4, + -.2262630641933704113967255053e3, + -.4887199395841261531199129300e1, + 0.0, +}; +static const double q3[] = { + 0.2550155108860942382983170882e6, + 0.6667454239319826986004038103e6, + 0.5332913634216897168722255057e6, + 0.1560213206679291652539287109e6, + 0.1570489191515395519392882766e5, + 0.4087714673983499223402830260e3, + 1.0, +}; +static const double p4[] = { + -.2750286678629109583701933175e20, + 0.6587473275719554925999402049e20, + -.5247065581112764941297350814e19, + 0.1375624316399344078571335453e18, + -.1648605817185729473122082537e16, + 0.1025520859686394284509167421e14, + -.3436371222979040378171030138e11, + 0.5915213465686889654273830069e8, + -.4137035497933148554125235152e5, +}; +static const double q4[] = { + 0.3726458838986165881989980e21, + 0.4192417043410839973904769661e19, + 0.2392883043499781857439356652e17, + 0.9162038034075185262489147968e14, + 0.2613065755041081249568482092e12, + 0.5795122640700729537480087915e9, + 0.1001702641288906265666651753e7, + 0.1282452772478993804176329391e4, + 1.0, +}; + +static void asympt(double); + +double +j0(double arg) +{ + double argsq, n, d; + int i; + + if(arg < 0.) arg = -arg; + if(arg > 8.){ + asympt(arg); + n = arg - pio4; + return(sqrt(tpi/arg)*(pzero*cos(n) - qzero*sin(n))); + } + argsq = arg*arg; + for(n=0,d=0,i=8;i>=0;i--){ + n = n*argsq + p1[i]; + d = d*argsq + q1[i]; + } + return(n/d); +} + +double +y0(double arg) +{ + double argsq, n, d; + int i; + + if(arg <= 0.){ +#if defined(vax)||defined(tahoe) + return(infnan(EDOM)); /* NaN */ +#else /* defined(vax)||defined(tahoe) */ + return(zero/zero); /* IEEE machines: invalid operation */ +#endif /* defined(vax)||defined(tahoe) */ + } + if(arg > 8.){ + asympt(arg); + n = arg - pio4; + return(sqrt(tpi/arg)*(pzero*sin(n) + qzero*cos(n))); + } + argsq = arg*arg; + for(n=0,d=0,i=8;i>=0;i--){ + n = n*argsq + p4[i]; + d = d*argsq + q4[i]; + } + return(n/d + tpi*j0(arg)*log(arg)); +} + +static void +asympt(double arg) +{ + double zsq, n, d; + int i; + zsq = 64./(arg*arg); + for(n=0,d=0,i=6;i>=0;i--){ + n = n*zsq + p2[i]; + d = d*zsq + q2[i]; + } + pzero = n/d; + for(n=0,d=0,i=6;i>=0;i--){ + n = n*zsq + p3[i]; + d = d*zsq + q3[i]; + } + qzero = (8./arg)*(n/d); +} diff --git a/linux-0.11-lab/newlibc/mlinux/j1.c b/linux-0.11-lab/newlibc/mlinux/j1.c new file mode 100644 index 0000000..8ca1042 --- /dev/null +++ b/linux-0.11-lab/newlibc/mlinux/j1.c @@ -0,0 +1,214 @@ +/* + * Copyright (c) 1985 Regents of the University of California. + * All rights reserved. The Berkeley software License Agreement + * specifies the terms and conditions for redistribution. + */ + +#ifndef lint +static char sccsid[] = "@(#)j1.c 5.3 (Berkeley) 9/22/88"; +#endif /* not lint */ + +/* + floating point Bessel's function + of the first and second kinds + of order one + + j1(x) returns the value of J1(x) + for all real values of x. + + There are no error returns. + Calls sin, cos, sqrt. + + There is a niggling bug in J1 which + causes errors up to 2e-16 for x in the + interval [-8,8]. + The bug is caused by an inappropriate order + of summation of the series. rhm will fix it + someday. + + Coefficients are from Hart & Cheney. + #6050 (20.98D) + #6750 (19.19D) + #7150 (19.35D) + + y1(x) returns the value of Y1(x) + for positive real values of x. + For x<=0, if on the VAX, error number EDOM is set and + the reserved operand fault is generated; + otherwise (an IEEE machine) an invalid operation is performed. + + Calls sin, cos, sqrt, log, j1. + + The values of Y1 have not been checked + to more than ten places. + + Coefficients are from Hart & Cheney. + #6447 (22.18D) + #6750 (19.19D) + #7150 (19.35D) +*/ + +#include + +#if defined(vax)||defined(tahoe) +#include +#else /* defined(vax)||defined(tahoe) */ +static const double zero = 0.e0; +#endif /* defined(vax)||defined(tahoe) */ + +static double pzero, qzero; + +static const double tpi = .6366197723675813430755350535e0; +static const double pio4 = .7853981633974483096156608458e0; +static const double p1[] = { + 0.581199354001606143928050809e21, + -.6672106568924916298020941484e20, + 0.2316433580634002297931815435e19, + -.3588817569910106050743641413e17, + 0.2908795263834775409737601689e15, + -.1322983480332126453125473247e13, + 0.3413234182301700539091292655e10, + -.4695753530642995859767162166e7, + 0.2701122710892323414856790990e4, +}; +static const double q1[] = { + 0.1162398708003212287858529400e22, + 0.1185770712190320999837113348e20, + 0.6092061398917521746105196863e17, + 0.2081661221307607351240184229e15, + 0.5243710262167649715406728642e12, + 0.1013863514358673989967045588e10, + 0.1501793594998585505921097578e7, + 0.1606931573481487801970916749e4, + 1.0, +}; +static const double p2[] = { + -.4435757816794127857114720794e7, + -.9942246505077641195658377899e7, + -.6603373248364939109255245434e7, + -.1523529351181137383255105722e7, + -.1098240554345934672737413139e6, + -.1611616644324610116477412898e4, + 0.0, +}; +static const double q2[] = { + -.4435757816794127856828016962e7, + -.9934124389934585658967556309e7, + -.6585339479723087072826915069e7, + -.1511809506634160881644546358e7, + -.1072638599110382011903063867e6, + -.1455009440190496182453565068e4, + 1.0, +}; +static const double p3[] = { + 0.3322091340985722351859704442e5, + 0.8514516067533570196555001171e5, + 0.6617883658127083517939992166e5, + 0.1849426287322386679652009819e5, + 0.1706375429020768002061283546e4, + 0.3526513384663603218592175580e2, + 0.0, +}; +static const double q3[] = { + 0.7087128194102874357377502472e6, + 0.1819458042243997298924553839e7, + 0.1419460669603720892855755253e7, + 0.4002944358226697511708610813e6, + 0.3789022974577220264142952256e5, + 0.8638367769604990967475517183e3, + 1.0, +}; +static const double p4[] = { + -.9963753424306922225996744354e23, + 0.2655473831434854326894248968e23, + -.1212297555414509577913561535e22, + 0.2193107339917797592111427556e20, + -.1965887462722140658820322248e18, + 0.9569930239921683481121552788e15, + -.2580681702194450950541426399e13, + 0.3639488548124002058278999428e10, + -.2108847540133123652824139923e7, + 0.0, +}; +static const double q4[] = { + 0.5082067366941243245314424152e24, + 0.5435310377188854170800653097e22, + 0.2954987935897148674290758119e20, + 0.1082258259408819552553850180e18, + 0.2976632125647276729292742282e15, + 0.6465340881265275571961681500e12, + 0.1128686837169442121732366891e10, + 0.1563282754899580604737366452e7, + 0.1612361029677000859332072312e4, + 1.0, +}; + +static void asympt(double); + +double +j1(double arg) +{ + double xsq, n, d, x; + int i; + + x = arg; + if(x < 0.) x = -x; + if(x > 8.){ + asympt(x); + n = x - 3.*pio4; + n = sqrt(tpi/x)*(pzero*cos(n) - qzero*sin(n)); + if(arg <0.) n = -n; + return(n); + } + xsq = x*x; + for(n=0,d=0,i=8;i>=0;i--){ + n = n*xsq + p1[i]; + d = d*xsq + q1[i]; + } + return(arg*n/d); +} + +double +y1(double arg) +{ + double xsq, n, d, x; + int i; + + x = arg; + if(x <= 0.){ +#if defined(vax)||defined(tahoe) + return(infnan(EDOM)); /* NaN */ +#else /* defined(vax)||defined(tahoe) */ + return(zero/zero); /* IEEE machines: invalid operation */ +#endif /* defined(vax)||defined(tahoe) */ + } + if(x > 8.){ + asympt(x); + n = x - 3*pio4; + return(sqrt(tpi/x)*(pzero*sin(n) + qzero*cos(n))); + } + xsq = x*x; + for(n=0,d=0,i=9;i>=0;i--){ + n = n*xsq + p4[i]; + d = d*xsq + q4[i]; + } + return(x*n/d + tpi*(j1(x)*log(x)-1./x)); +} + +static void +asympt(double arg) +{ + double zsq, n, d; + int i; + zsq = 64./(arg*arg); + for(n=0,d=0,i=6;i>=0;i--){ + n = n*zsq + p2[i]; + d = d*zsq + q2[i]; + } + pzero = n/d; + for(n=0,d=0,i=6;i>=0;i--){ + n = n*zsq + p3[i]; + d = d*zsq + q3[i]; + } + qzero = (8./arg)*(n/d); +} diff --git a/linux-0.11-lab/newlibc/mlinux/jn.c b/linux-0.11-lab/newlibc/mlinux/jn.c new file mode 100644 index 0000000..aa5597a --- /dev/null +++ b/linux-0.11-lab/newlibc/mlinux/jn.c @@ -0,0 +1,122 @@ +/* + * Copyright (c) 1985 Regents of the University of California. + * All rights reserved. The Berkeley software License Agreement + * specifies the terms and conditions for redistribution. + */ + +#ifndef lint +static char sccsid[] = "@(#)jn.c 5.3 (Berkeley) 9/22/88"; +#endif /* not lint */ + +/* + floating point Bessel's function of + the first and second kinds and of + integer order. + + int n; + double x; + jn(n,x); + + returns the value of Jn(x) for all + integer values of n and all real values + of x. + + There are no error returns. + Calls j0, j1. + + For n=0, j0(x) is called, + for n=1, j1(x) is called, + for nx, a continued fraction approximation to + j(n,x)/j(n-1,x) is evaluated and then backward + recursion is used starting from a supposed value + for j(n,x). The resulting value of j(0,x) is + compared with the actual value to correct the + supposed value of j(n,x). + + yn(n,x) is similar in all respects, except + that forward recursion is used for all + values of n>1. +*/ + +#include +#if defined(vax)||defined(tahoe) +#include +#else /* defined(vax)||defined(tahoe) */ +static double zero = 0.e0; +#endif /* defined(vax)||defined(tahoe) */ + +double +jn(int n, double x) +{ + int i; + double a, b, temp; + double xsq, t; + + if(n<0){ + n = -n; + x = -x; + } + if(n==0) return(j0(x)); + if(n==1) return(j1(x)); + if(x == 0.) return(0.); + if(n>x) goto recurs; + + a = j0(x); + b = j1(x); + for(i=1;in;i--){ + t = xsq/(2.*i - t); + } + t = x/(2.*n-t); + + a = t; + b = 1; + for(i=n-1;i>0;i--){ + temp = b; + b = (2.*i/x)*b - a; + a = temp; + } + return(t*j0(x)/b); +} + +double +yn(int n, double x) +{ + int i; + int sign; + double a, b, temp; + + if (x <= 0.0) { +#if defined(vax)||defined(tahoe) + return(infnan(EDOM)); /* NaN */ +#else /* defined(vax)||defined(tahoe) */ + return(zero/zero); /* IEEE machines: invalid operation */ +#endif /* defined(vax)||defined(tahoe) */ + } + sign = 1; + if(n<0){ + n = -n; + if(n%2 == 1) sign = -1; + } + if(n==0) return(y0(x)); + if(n==1) return(sign*y1(x)); + + a = y0(x); + b = y1(x); + for(i=1;i + +#if defined(vax)||defined(tahoe) +#include +#endif /* defined(vax)||defined(tahoe) */ + +int signgam = 0; +static const double goobie = 0.9189385332046727417803297; /* log(2*pi)/2 */ +static const double pi = 3.1415926535897932384626434; + +#define M 6 +#define N 8 +static const double p1[] = { + 0.83333333333333101837e-1, + -.277777777735865004e-2, + 0.793650576493454e-3, + -.5951896861197e-3, + 0.83645878922e-3, + -.1633436431e-2, +}; +static const double p2[] = { + -.42353689509744089647e5, + -.20886861789269887364e5, + -.87627102978521489560e4, + -.20085274013072791214e4, + -.43933044406002567613e3, + -.50108693752970953015e2, + -.67449507245925289918e1, + 0.0, +}; +static const double q2[] = { + -.42353689509744090010e5, + -.29803853309256649932e4, + 0.99403074150827709015e4, + -.15286072737795220248e4, + -.49902852662143904834e3, + 0.18949823415702801641e3, + -.23081551524580124562e2, + 0.10000000000000000000e1, +}; + +static double pos(double), neg(double), asym(double); + +double +lgamma(double arg) +{ + + signgam = 1.; + if(arg <= 0.) return(neg(arg)); + if(arg > 8.) return(asym(arg)); + return(log(pos(arg))); +} + +static double +asym(double arg) +{ + double n, argsq; + int i; + + argsq = 1./(arg*arg); + for(n=0,i=M-1; i>=0; i--){ + n = n*argsq + p1[i]; + } + return((arg-.5)*log(arg) - arg + goobie + n/arg); +} + +static double +neg(double arg) +{ + double t; + + arg = -arg; + /* + * to see if arg were a true integer, the old code used the + * mathematically correct observation: + * sin(n*pi) = 0 <=> n is an integer. + * but in finite precision arithmetic, sin(n*PI) will NEVER + * be zero simply because n*PI is a rational number. hence + * it failed to work with our newer, more accurate sin() + * which uses true pi to do the argument reduction... + * temp = sin(pi*arg); + */ + t = floor(arg); + if (arg - t > 0.5e0) + t += 1.e0; /* t := integer nearest arg */ +#if defined(vax)||defined(tahoe) + if (arg == t) { + return(infnan(ERANGE)); /* +INF */ + } +#endif /* defined(vax)||defined(tahoe) */ + signgam = (int) (t - 2*floor(t/2)); /* signgam = 1 if t was odd, */ + /* 0 if t was even */ + signgam = signgam - 1 + signgam; /* signgam = 1 if t was odd, */ + /* -1 if t was even */ + t = arg - t; /* -0.5 <= t <= 0.5 */ + if (t < 0.e0) { + t = -t; + signgam = -signgam; + } + return(-log(arg*pos(arg)*sin(pi*t)/pi)); +} + +static double +pos(double arg) +{ + double n, d, s; + register i; + + if(arg < 2.) return(pos(arg+1.)/arg); + if(arg > 3.) return((arg-1.)*pos(arg-1.)); + + s = arg - 2.; + for(n=0,d=0,i=N-1; i>=0; i--){ + n = n*s + p2[i]; + d = d*s + q2[i]; + } + return(n/d); +} diff --git a/linux-0.11-lab/newlibc/mlinux/log.s b/linux-0.11-lab/newlibc/mlinux/log.s new file mode 100644 index 0000000..ea2dcc0 --- /dev/null +++ b/linux-0.11-lab/newlibc/mlinux/log.s @@ -0,0 +1,20 @@ +/* This is file LOG.S */ +/* +** Copyright (C) 1991 DJ Delorie, 24 Kirsten Ave, Rochester NH 03867-2954 +** +** This file is distributed under the terms listed in the document +** "copying.dj", available from DJ Delorie at the address above. +** A copy of "copying.dj" should accompany this file; if not, a copy +** should be available from where this file was obtained. This file +** may not be distributed without a verbatim copy of "copying.dj". +** +** This file is distributed WITHOUT ANY WARRANTY; without even the implied +** warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +*/ + + .globl _log +_log: + fldln2 + fldl 4(%esp) + fyl2x + ret diff --git a/linux-0.11-lab/newlibc/mlinux/log10.s b/linux-0.11-lab/newlibc/mlinux/log10.s new file mode 100644 index 0000000..2e889be --- /dev/null +++ b/linux-0.11-lab/newlibc/mlinux/log10.s @@ -0,0 +1,20 @@ +/* This is file LOG10.S */ +/* +** Copyright (C) 1991 DJ Delorie, 24 Kirsten Ave, Rochester NH 03867-2954 +** +** This file is distributed under the terms listed in the document +** "copying.dj", available from DJ Delorie at the address above. +** A copy of "copying.dj" should accompany this file; if not, a copy +** should be available from where this file was obtained. This file +** may not be distributed without a verbatim copy of "copying.dj". +** +** This file is distributed WITHOUT ANY WARRANTY; without even the implied +** warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +*/ + + .globl _log10 +_log10: + fldlg2 + fldl 4(%esp) + fyl2x + ret diff --git a/linux-0.11-lab/newlibc/mlinux/math.h b/linux-0.11-lab/newlibc/mlinux/math.h new file mode 100644 index 0000000..4cf23d1 --- /dev/null +++ b/linux-0.11-lab/newlibc/mlinux/math.h @@ -0,0 +1,47 @@ +/* The header contains prototypes for mathematical functions. */ + +#ifndef _MATH_H +#define _MATH_H + +#define HUGE_VAL 9.9e+307 + +extern double acos(double x); +extern double asin(double x); +extern double atan(double x); +extern double atan2(double y, double x); +extern double ceil(double x); +extern double cos(double x); +extern double cosh(double x); +extern double exp(double x); +extern double fabs(double x); +extern double floor(double x); +extern double fmod(double x, double y); +extern double frexp(double x, int *exp); +extern double ldexp(double x, int exp); +extern double log(double x); +extern double log10(double x); +extern double modf(double x, double *iptr); +extern double pow(double x, double y); +extern double sin(double x); +extern double sinh(double x); +extern double sqrt(double x); +extern double tan(double x); +extern double tanh(double x); + +extern int isinf (double); +extern int isnan (double); +extern double erf (double x); +extern double erfc (double x); +extern double j0 (double x); +extern double j1 (double x); +extern double jn (int n, double x); +extern double lgamma (double x); +extern double y0 (double x); +extern double y1 (double x); +extern double yn (int n, double x); + +#ifndef __LIBRARY__ +extern int signgam; +#endif + +#endif /* _MATH_H */ diff --git a/linux-0.11-lab/newlibc/mlinux/sin.s b/linux-0.11-lab/newlibc/mlinux/sin.s new file mode 100644 index 0000000..800791f --- /dev/null +++ b/linux-0.11-lab/newlibc/mlinux/sin.s @@ -0,0 +1,32 @@ +// +// This file is part of the math library for Linux and is +// covered by the GNU General Public license version 2, or +// any later version. +// +// Copyright 1992 by H.J. Lu +// + .file "sin.s" + .text + .align 2 + .globl _sin +_sin: + fldl 4(%esp) + jmp L3 +L1: + fldpi + fld %st(0) + faddp %st,%st(1) + fxch %st(1) +L2: + fprem1 + fstsw %ax + sahf + jp L2 + fxch %st(1) + fstp %st(0) +L3: + fsin + fstsw %ax + sahf + jp L1 + ret diff --git a/linux-0.11-lab/newlibc/mlinux/sinh.s b/linux-0.11-lab/newlibc/mlinux/sinh.s new file mode 100644 index 0000000..3d13915 --- /dev/null +++ b/linux-0.11-lab/newlibc/mlinux/sinh.s @@ -0,0 +1,50 @@ +// +// This file is part of the math library for Linux and is +// covered by the GNU General Public license version 2, or +// any later version. +// +// Copyright 1992 by H.J. Lu +// + .file "sinh.s" + .data + .align 2 +LCW1: + .word 0 +LCW2: + .word 0 + + .text + .align 2 +LC2: + .double 0d5.0000000000000000000000e-01 + + .align 2 + .globl _sinh +_sinh: + fldl 4(%esp) + fldl2e + fmulp %st,%st(1) + fst %st(1) + fstcw LCW1 + fstcw LCW2 + fwait + andw $0xf3ff,LCW1 + fldcw LCW1 + frndint + fldcw LCW2 + fst %st(2) + fsubrp %st,%st(1) + f2xm1 + fld1 + faddp %st,%st(1) + fscale + fst %st(1) + + fld1 + fdivp %st,%st(1) + fsubrp %st,%st(1) + + fldl LC2 + fmulp %st,%st(1) + + ret diff --git a/linux-0.11-lab/newlibc/mlinux/sqrt.s b/linux-0.11-lab/newlibc/mlinux/sqrt.s new file mode 100644 index 0000000..73b1137 --- /dev/null +++ b/linux-0.11-lab/newlibc/mlinux/sqrt.s @@ -0,0 +1,19 @@ +/* This is file SQRT.S */ +/* +** Copyright (C) 1991 DJ Delorie, 24 Kirsten Ave, Rochester NH 03867-2954 +** +** This file is distributed under the terms listed in the document +** "copying.dj", available from DJ Delorie at the address above. +** A copy of "copying.dj" should accompany this file; if not, a copy +** should be available from where this file was obtained. This file +** may not be distributed without a verbatim copy of "copying.dj". +** +** This file is distributed WITHOUT ANY WARRANTY; without even the implied +** warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +*/ + + .globl _sqrt +_sqrt: + fldl 4(%esp) + fsqrt + ret diff --git a/linux-0.11-lab/newlibc/mlinux/tan.s b/linux-0.11-lab/newlibc/mlinux/tan.s new file mode 100644 index 0000000..cadc762 --- /dev/null +++ b/linux-0.11-lab/newlibc/mlinux/tan.s @@ -0,0 +1,31 @@ +// +// This file is part of the math library for Linux and is +// covered by the GNU General Public license version 2, or +// any later version. +// +// Copyright 1992 by H.J. Lu +// + .file "tan.s" + .text + .align 2 + .globl _tan +_tan: + fldl 4(%esp) + jmp L3 +L1: + fldpi + fxch %st(1) +L2: + fprem1 + fstsw %ax + sahf + jp L2 + fxch %st(1) + fstp %st(0) +L3: + fptan + fstsw %ax + sahf + jp L1 + fstp %st(0) + ret diff --git a/linux-0.11-lab/newlibc/mlinux/tanh.s b/linux-0.11-lab/newlibc/mlinux/tanh.s new file mode 100644 index 0000000..a0b7cf5 --- /dev/null +++ b/linux-0.11-lab/newlibc/mlinux/tanh.s @@ -0,0 +1,63 @@ +// +// This file is part of the math library for Linux and is +// covered by the GNU General Public license version 2, or +// any later version. +// +// Copyright 1992 by H.J. Lu +// + .file "tanh.s" + .data + .align 2 +LCW1: + .word 0 +LCW2: + .word 0 + + .text + .align 2 + .globl _tanh +_tanh: + fldl 4(%esp) + ftst + fstsw %ax + sahf + jna Lneg + fchs + xorl %eax,%eax + incl %eax + jmp L1 +Lneg: + xorl %eax,%eax +L1: + fld %st(0) + faddp %st,%st(1) + fldl2e + fmulp %st,%st(1) + fst %st(1) + fstcw LCW1 + fstcw LCW2 + fwait + andw $0xf3ff,LCW1 + fldcw LCW1 + frndint + fldcw LCW2 + fst %st(2) + fsubrp %st,%st(1) + f2xm1 + fld1 + faddp %st,%st(1) + fscale + fst %st(1) + + fld1 + faddp %st,%st(1) + fxch %st(1) + fld1 + fsubrp %st,%st(1) + fdivp %st,%st(1) + + testl %eax,%eax + jna L2 + fchs +L2: + ret diff --git a/linux-0.11-lab/newlibc/other/Makefile b/linux-0.11-lab/newlibc/other/Makefile new file mode 100644 index 0000000..8fdbcb5 --- /dev/null +++ b/linux-0.11-lab/newlibc/other/Makefile @@ -0,0 +1,47 @@ +# +# Makefile for some odd library functions +# + +LIB =../Libc.a +#AR =gar +AR =ar +#AS =gas +AS =as +#LD =gld +LD =ld +LDFLAGS =-s -x +CC =gcc +INC =-nostdinc -I/../include +CFLAGS =-Wall -O -fstrength-reduce -fomit-frame-pointer \ + -finline-functions $(INC) -DUSG -DSTDC_HEADERS +CPP =$(CC) -E $(INC) + +.c.s: + $(CC) $(CFLAGS) \ + -S -o $*.s $< +.s.o: + $(CC) -c -o $*.o $< +.c.o: + $(CC) $(CFLAGS) \ + -c -o $*.o $< + +OBJS = sig_restore.o setjmp.o getcwd.o mktemp.o \ + popen.o getopt.o + +all: library + +library: $(OBJS) + $(AR) uvc $(LIB) $(OBJS) + sync + +clean: + $(RM) -f core *.o *.a tmp_make + for i in *.c;do $(RM) -f `basename $$i .c`.s;done + +dep: + sed '/\#\#\# Dependencies/q' < Makefile > tmp_make + (for i in *.c;do echo -n `echo $$i | sed 's,\.c,\.s,'`" "; \ + $(CPP) -M $$i;done) >> tmp_make + cp tmp_make Makefile + +### Dependencies: diff --git a/linux-0.11-lab/newlibc/other/getcwd.c b/linux-0.11-lab/newlibc/other/getcwd.c new file mode 100644 index 0000000..e3894c2 --- /dev/null +++ b/linux-0.11-lab/newlibc/other/getcwd.c @@ -0,0 +1,163 @@ +/* Copyright (C) 1991 Free Software Foundation, Inc. +This file is part of the GNU C Library. + +The GNU C Library is free software; you can redistribute it and/or +modify it under the terms of the GNU Library General Public License as +published by the Free Software Foundation; either version 2 of the +License, or (at your option) any later version. + +The GNU C Library is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define d_namlen d_reclen +#define d_fileno d_ino + +/* Get the pathname of the current working directory, + and put it in SIZE bytes of BUF. Returns NULL if the + directory couldn't be determined or SIZE was too small. + If successful, returns BUF. In GNU, if BUF is NULL, + an array is allocated with `malloc'; the array is SIZE + bytes long, unless SIZE <= 0, in which case it is as + big as necessary. */ +char * +DEFUN(getcwd, (buf, size), char *buf AND size_t size) +{ + dev_t rootdev, thisdev; + ino_t rootino, thisino; + char path[PATH_MAX + 1]; + register char *pathp; + struct stat st; + + if (buf != NULL && size == 0) + { + errno = EINVAL; + return NULL; + } + + pathp = &path[sizeof(path)]; + *--pathp = '\0'; + + if (stat(".", &st) < 0) + return NULL; + thisdev = st.st_dev; + thisino = st.st_ino; + + if (stat("/", &st) < 0) + return NULL; + rootdev = st.st_dev; + rootino = st.st_ino; + + while (!(thisdev == rootdev && thisino == rootino)) + { + register DIR *dirstream; + register struct dirent *d; + dev_t dotdev; + ino_t dotino; + char mount_point; + + /* Move up a directory. */ + if (chdir("..") < 0) + { + if (pathp != &path[sizeof(path) - 1]) + { + /* Try to get back to the original directory. + This is the only place where this is possible. */ + int save = errno; + (void) chdir (pathp); + errno = save; + } + return NULL; + } + + /* Figure out if this directory is a mount point. */ + if (stat(".", &st) < 0) + return NULL; + dotdev = st.st_dev; + dotino = st.st_ino; + mount_point = dotdev != thisdev; + + /* Search for the last directory. */ + dirstream = opendir("."); + if (dirstream == NULL) + return NULL; + while ((d = readdir(dirstream)) != NULL) + { + if (d->d_name[0] == '.' && + (d->d_namlen == 1 || (d->d_namlen == 2 && d->d_name[1] == '.'))) + continue; + if (mount_point || d->d_fileno == thisino) + { + if (stat(d->d_name, &st) < 0) + { + int save = errno; + (void) closedir(dirstream); + errno = save; + return NULL; + } + if (st.st_dev == thisdev && st.st_ino == thisino) + break; + } + } + if (d == NULL) + { + int save = errno; + (void) closedir(dirstream); + errno = save; + return NULL; + } + else + { + pathp -= d->d_namlen; + (void) memcpy(pathp, d->d_name, d->d_namlen); + *--pathp = '/'; + (void) closedir(dirstream); + } + + thisdev = dotdev; + thisino = dotino; + } + + if (pathp == &path[sizeof(path) - 1]) + *--pathp = '/'; + + if (chdir(pathp) < 0) + return NULL; + + { + size_t len = &path[sizeof(path)] - pathp; + if (buf == NULL) + { + if (len < (size_t) size) + len = size; + buf = (char *) malloc(len); + if (buf == NULL) + return NULL; + } + else if ((size_t) size < len) + { + errno = ERANGE; + return NULL; + } + (void) memcpy((PTR) buf, (PTR) pathp, len); + } + + return buf; +} diff --git a/linux-0.11-lab/newlibc/other/getopt.c b/linux-0.11-lab/newlibc/other/getopt.c new file mode 100644 index 0000000..5bc01c5 --- /dev/null +++ b/linux-0.11-lab/newlibc/other/getopt.c @@ -0,0 +1,431 @@ +/* Copyright (C) 1991 Free Software Foundation, Inc. +This file is part of the GNU C Library. + +The GNU C Library is free software; you can redistribute it and/or +modify it under the terms of the GNU Library General Public License as +published by the Free Software Foundation; either version 2 of the +License, or (at your option) any later version. + +The GNU C Library is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +/* This version of `getopt' appears to the caller like standard POSIX + `getopt' but it behaves differently for the user, since it allows + the user to intersperse the options with the other arguments. + + As `getopt' works, it permutes the elements of ARGV so that, when it + is done, all the options precede everything else. Thus all application + programs are extended to handle flexible argument order. + + Setting the environment variable _POSIX_OPTION_ORDER disables permutation. + Then the behavior is completely standard. + + GNU application programs can use a third alternative mode in which + they can distinguish the relative order of options and other arguments. */ + +#include +#include +#include +#include +#include +#include + +/* For communication from `getopt' to the caller. + When `getopt' finds an option that takes an argument, + the argument value is returned here. + Also, when `ordering' is RETURN_IN_ORDER, + each non-option ARGV-element is returned here. */ + +char *optarg = NULL; + +/* Index in ARGV of the next element to be scanned. + This is used for communication to and from the caller + and for communication between successive calls to `getopt'. + + On entry to `getopt', zero means this is the first call; initialize. + + When `getopt' returns -1, this is the index of the first of the + non-option elements that the caller should itself scan. + + Otherwise, `optind' communicates from one call to the next + how much of ARGV has been scanned so far. */ + +int optind = 1; + +static int initialized = 0; + +int optopt; + +/* The next char to be scanned in the option-element + in which the last option character we returned was found. + This allows us to pick up the scan where we left off. + + If this is zero, or a null string, it means resume the scan + by advancing to the next ARGV-element. */ + +static CONST char *nextchar; + +/* Callers store zero here to inhibit the + error message for unrecognized options. */ + +int opterr = 1; + +/* Describe how to deal with options that follow non-option ARGV-elements. + + UNSPECIFIED means the caller did not specify anything; + the default is then REQUIRE_ORDER if the environment variable + _POSIX_OPTION_ORDER is defined, PERMUTE otherwise. + + REQUIRE_ORDER means don't recognize them as options. + Stop option processing when the first non-option is seen. + This is what Unix does. + + PERMUTE is the default. We permute the contents of ARGV as we scan, + so that eventually all the options are at the end. This allows options + to be given in any order, even with programs that were not written to + expect this. + + RETURN_IN_ORDER is an option available to programs that were written + to expect options and other ARGV-elements in any order and that care about + the ordering of the two. We describe each non-option ARGV-element + as if it were the argument of an option with character code zero. + Using `-' as the first character of the list of option characters + requests this mode of operation. + + The special argument `--' forces an end of option-scanning regardless + of the value of `ordering'. In the case of RETURN_IN_ORDER, only + `--' can cause `getopt' to return -1 with `optind' != ARGC. */ + +static enum { REQUIRE_ORDER, PERMUTE, RETURN_IN_ORDER } ordering; + +/* Handle permutation of arguments. */ + +/* Describe the part of ARGV that contains non-options that have + been skipped. `first_nonopt' is the index in ARGV of the first of them; + `last_nonopt' is the index after the last of them. */ + +static int first_nonopt; +static int last_nonopt; + +/* Exchange two adjacent subsequences of ARGV. + One subsequence is elements [first_nonopt,last_nonopt) + which contains all the non-options that have been skipped so far. + The other is elements [last_nonopt,optind), which contains all + the options processed since those non-options were skipped. + + `first_nonopt' and `last_nonopt' are relocated so that they describe + the new indices of the non-options in ARGV after they are moved. */ +static void +DEFUN(exchange, (argv), CONST char **argv) +{ + size_t nonopts_size = (last_nonopt - first_nonopt) * sizeof(char *); + char **temp = (char **) __alloca(nonopts_size); + + /* Interchange the two blocks of data in ARGV. */ + + memcpy(temp, &argv[first_nonopt], nonopts_size); + memcpy(&argv[first_nonopt], &argv[last_nonopt], nonopts_size); + memcpy(&argv[first_nonopt + optind - last_nonopt], temp, nonopts_size); + + /* Update records for the slots the non-options now occupy. */ + + first_nonopt += (optind - last_nonopt); + last_nonopt = optind; +} + + +/* Scan elements of ARGV (whose length is ARGC) for + option characters given in OPTSTRING. + + If an element of ARGV starts with '-', and is not exactly "-" or "--", + then it is an option element. The characters of this element + (aside from the initial '-') are option characters. If `getopt' + is called repeatedly, it returns successively each of the option + characters from each of the option elements. + + If `getopt' finds another option character, it returns that character, + updating `optind' and `nextchar' so that the next call to `getopt' can + resume the scan with the following option character or ARGV-element. + + If there are no more option characters, `getopt' returns -1. + Then `optind' is the index in ARGV of the first ARGV-element + that is not an option. (The ARGV-elements have been permuted + so that those that are not options now come last.) + + OPTSTRING is a string containing the legitimate option characters. + A colon in OPTSTRING means that the previous character is an option + that wants an argument. The argument is taken from the rest of the + current ARGV-element, or from the following ARGV-element, + and returned in `optarg'. + + If an option character is seen that is not listed in OPTSTRING, + return '?' after printing an error message and setting `optopt' + to the option character. If you set `opterr' to zero, the error + message is suppressed but we still set `optopt' and return '?'. + + If a character in OPTSTRING is followed by a colon, that means + it wants an argument, so the following text inthe same + ARGV-element, or the text of the following ARGV-element, is + returned in `optarg'. Two colons mean an option that wants an + optional argument; if there is text in the current ARGV-element, + it is returned in `optarg'. + + If OPTSTRING starts with `-', it requests a different method of handling the + non-option ARGV-elements. See the comments about RETURN_IN_ORDER, above. + */ + +int +DEFUN(getopt, (argc, argv, optstring), + int argc AND CONST char **argv AND CONST char *optstring) +{ + /* Initialize the internal data when the first call is made. + Start processing options with ARGV-element 1 + (since ARGV-element 0 is the program name); + the sequence of previously skipped non-option + ARGV-elements is empty. */ + + if (!initialized) + { + first_nonopt = last_nonopt = optind = 1; + initialized = 1; + + nextchar = NULL; + + if (optstring[0] == ':') + { + ++optstring; + opterr = 0; + } + + /* Determine how to handle the ordering of options and nonoptions. */ + if (optstring[0] == '-') + ordering = RETURN_IN_ORDER; + else if (getenv("_POSIX_OPTION_ORDER") != NULL) + ordering = REQUIRE_ORDER; + else + ordering = PERMUTE; + + if (optstring[0] == ':') + { + ++optstring; + opterr = 0; + } + } + + if (nextchar == NULL || *nextchar == '\0') + { + if (ordering == PERMUTE) + { + /* If we have just processed some options + following some non-options, exchange them + so that the options come first. */ + + if (first_nonopt != last_nonopt && last_nonopt != optind) + exchange(argv); + else if (last_nonopt != optind) + first_nonopt = optind; + + /* Now skip any additional non-options and extend + the range of non-options previously skipped. */ + + while (optind < argc && + (argv[optind][0] != '-' || argv[optind][1] == '\0')) + ++optind; + last_nonopt = optind; + } + + /* Special ARGV-element `--' means premature end of options. + Skip it like a null option, then exchange with previous + non-options as if it were an option, then skip everything + else like a non-option. */ + + if (optind != argc && !strcmp(argv[optind], "--")) + { + ++optind; + + if (first_nonopt != last_nonopt && last_nonopt != optind) + exchange(argv); + else if (first_nonopt == last_nonopt) + first_nonopt = optind; + last_nonopt = argc; + + optind = argc; + } + + /* If we have done all the ARGV-elements, + stop the scan and back over any non-options + that we skipped and permuted. */ + + if (optind == argc) + { + /* Set the next-arg-index to point at the + non-options that we previously skipped, + so the caller will digest them. */ + if (first_nonopt != last_nonopt) + optind = first_nonopt; + return -1; + } + + /* If we have come to a non-option and did + not permute it, either stop the scan or + describe it to the caller and pass it by. */ + + if (argv[optind][0] != '-' || argv[optind][1] == 0) + if (ordering == REQUIRE_ORDER) + return -1; + else + { + optarg = (char *) argv[optind++]; + return 0; + } + + /* We have found another option-ARGV-element. + Start decoding its characters. */ + + nextchar = argv[optind] + 1; + } + + /* Look at and handle the next option-character. */ + + { + char c = *nextchar++; + char *temp = strchr(optstring, c); + + /* Increment `optind' when we start to process its last character. */ + if (*nextchar == '\0') + ++optind; + + if (temp == NULL) + { + if (opterr) + { + if (!isprint(c)) + fprintf(stderr, + "%s: unrecognized option, character code %#.3o octal\n", + argv[0], (unsigned int) c); + else + fprintf(stderr, "%s: unrecognized option `-%c'\n", + argv[0], c); + } + optopt = c; + return '?'; + } + if (temp[1] == ':') + { + if (temp[2] == ':') + { + /* This is an option that accepts an optional argument. */ + if (*nextchar != '\0') + optarg = (char *) nextchar; + else + optarg = NULL; + nextchar = NULL; + } + else + { + /* This is an option that requires an argument. */ + if (*nextchar != '\0') + { + optarg = (char *) nextchar; + /* If we end this ARGV-element by taking the rest as an + argument, we must advance to the next element now. */ + ++optind; + nextchar = NULL; + } + else if (optind == argc) + { + if (opterr) + { + if (isprint(c)) + fprintf(stderr, "%s: no argument for `-%c' option\n", + argv[0], c); + else + fprintf(stderr, + "%s: no argument for option %#.3o octal\n", + argv[0], (unsigned int) c); + } + optopt = c; + optarg = NULL; + return '?'; + } + else + /* We already incremented `optind' once; increment it again + when taking the next ARGV-element as an argument. */ + optarg = (char *) argv[optind++]; + } + } + return c; + } +} + +#ifdef TEST + +/* Compile with -DTEST to make an executable for use + in testing the above definition of `getopt'. */ + +int +DEFUN(main, (argc, argv), int argc AND char **argv) +{ + register int c; + int digit_optind = 0; + + for (;;) + { + int this_option_optind = optind; + if ((c = getopt(argc, argv, "abc:d:0123456789")) == -1) + break; + else + switch (c) + { + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + if (digit_optind > 0 && digit_optind != this_option_optind) + puts("digits occur in two different ARGV-elements."); + digit_optind = this_option_optind; + printf("option %c\n", c); + break; + case 'a': + puts("option a"); + break; + case 'b': + puts("option b"); + break; + case 'c': + printf("option c with value `%s'\n", optarg); + break; + case '?': + break; + default: + printf("?? getopt returned character code %#.3o ??\n", c); + break; + } + } + + if (optind < argc) + { + fputs("non-option ARGV-elements: ", stdout); + while (optind < argc) + printf("%s ", argv[optind++]); + putchar('\n'); + } + + exit(0); + return 0; +} + +#endif /* TEST */ diff --git a/linux-0.11-lab/newlibc/other/mktemp.c b/linux-0.11-lab/newlibc/other/mktemp.c new file mode 100644 index 0000000..1d396d8 --- /dev/null +++ b/linux-0.11-lab/newlibc/other/mktemp.c @@ -0,0 +1,16 @@ +#include +#include + +char * mktemp(char * template) +{ + int pid; + int len; + + pid = getpid(); + len = strlen(template); + while (len-->0 && template[len] == 'X') { + template[len] = '0' + (pid % 10); + pid = pid / 10; + } + return(template); +} diff --git a/linux-0.11-lab/newlibc/other/popen.c b/linux-0.11-lab/newlibc/other/popen.c new file mode 100644 index 0000000..fc7fb1d --- /dev/null +++ b/linux-0.11-lab/newlibc/other/popen.c @@ -0,0 +1,58 @@ +#include +#include +#include +#include +#include + +static int pids[20]; + +FILE *popen(const char *command, const char *type) +{ + int piped[2]; + int Xtype = *type == 'r' ? 0 : *type == 'w' ? 1 : 2; + int pid; + + if (Xtype == 2 || pipe(piped) < 0) + return NULL; + if ((pid = fork()) < 0) { + close(piped[0]); + close(piped[1]); + return NULL; + } + + if (pid == 0) { + register int *p; + + for (p = pids; p < &pids[20]; p++) { + if (*p) close(p - pids); + } + close(piped[Xtype]); + dup2(piped[!Xtype], !Xtype); + close(piped[!Xtype]); + execl("/bin/sh", "sh", "-c", command, (char *) 0); + exit(-1); /* like system() ??? */ + } + pids[piped[Xtype]] = pid; + close(piped[!Xtype]); + return(fdopen(piped[Xtype], type)); +} + +int pclose(FILE * iop) +{ + int fd = fileno(iop); + int status, wret; + void (*intsave) () = signal(SIGINT, SIG_IGN); + void (*quitsave) () = signal(SIGQUIT, SIG_IGN); + void (*hupsave) () = signal(SIGHUP, SIG_IGN); + + fclose(iop); + while ((wret = wait(&status)) != -1) { + if (wret == pids[fd]) break; + } + if (wret == -1) status = -1; + signal(SIGINT, intsave); + signal(SIGQUIT, quitsave); + signal(SIGHUP, hupsave); + pids[fd] = 0; + return(status); +} diff --git a/linux-0.11-lab/newlibc/other/setjmp.s b/linux-0.11-lab/newlibc/other/setjmp.s new file mode 100644 index 0000000..7879e57 --- /dev/null +++ b/linux-0.11-lab/newlibc/other/setjmp.s @@ -0,0 +1,45 @@ +/* + * setjmp & longjmp for gcc. + * + * We need to save all regs except %eax,%ecx,%edx, as these are + * used by calls. + * + * Jump buffer looks like this (same as bruce evans for minix): + * + * 00: %ebp + * 04: %esp + * 08: %eip + * 0C: %ebx + * 10: %esi + * 14: %edi + * + * Total length hex 18 = 24 bytes. + */ + +.text +.globl _setjmp,_longjmp +.align 2 +_setjmp: + popl %ecx # get return address + movl 0(%esp),%edx # and jump buffer address + movl %ebp,0(%edx) + movl %esp,4(%edx) + movl %ecx,8(%edx) + movl %ebx,12(%edx) + movl %esi,16(%edx) + movl %edi,20(%edx) + xorl %eax,%eax # non-jump return + jmpl *%ecx + +.align 2 +_longjmp: + movl 4(%esp),%edx # jump buffer address + movl 8(%esp),%eax # val + cmpl $1,%eax # Value may not be zero (code by bruce?) + adcb $0,%al # nice code, somewhat cryptic, no? + movl 0(%edx),%ebp # restore %ebp + movl 4(%edx),%esp + movl 12(%edx),%ebx + movl 16(%edx),%esi + movl 20(%edx),%edi + jmp 8(%edx) diff --git a/linux-0.11-lab/newlibc/other/sig_restore.s b/linux-0.11-lab/newlibc/other/sig_restore.s new file mode 100644 index 0000000..ebda416 --- /dev/null +++ b/linux-0.11-lab/newlibc/other/sig_restore.s @@ -0,0 +1,20 @@ +.globl ____sig_restore +.globl ____masksig_restore + +____sig_restore: + addl $4,%esp # signr + popl %eax + popl %ecx + popl %edx + popfl + ret + +____masksig_restore: + addl $4,%esp # signr + call ____ssetmask # old blocking + addl $4,%esp + popl %eax + popl %ecx + popl %edx + popfl + ret diff --git a/linux-0.11-lab/newlibc/posix/Makefile b/linux-0.11-lab/newlibc/posix/Makefile new file mode 100644 index 0000000..de66aa4 --- /dev/null +++ b/linux-0.11-lab/newlibc/posix/Makefile @@ -0,0 +1,55 @@ +# +# Makefile for some ansi-library functions +# + +LIB =../Libc.a +#AR =gar +#AS =gas +#LD =gld +AR =ar +AS =as +LD =ld +LDFLAGS =-s -x +CC =/usr/local/bin/gcc -B/usr/local/bin/ +#CC =/local/bin/gcc-i386-sysv -v -DPRE_GCC_2 +INC =-nostdinc -I. \ + -I../include +CFLAGS =-Wall -O -fstrength-reduce -fomit-frame-pointer \ + -finline-functions $(INC) +#CFLAGS =-Wall -O -fstrength-reduce -finline-functions $(INC) +CPP =$(CC) -E $(INC) + +.SUFFIXES: .C .c + +.c.C: + $(CPP) $(CFLAGS) -S -o $*.C $< + +.c.s: + $(CC) $(CFLAGS) -S -o $*.s $< + +.s.o: + $(CC) -c -o $*.o $< + +.c.o: + $(CC) $(CFLAGS) -c -o $*.o $< + +OBJS = sigmask.o tcattr.o sysconf.o sleep.o tcsetpgrp.o rename.o \ + ttyname.o cfsetget.o tcflow.o + +all: library + +library: $(OBJS) + $(AR) uvc $(LIB) $(OBJS) + sync + +clean: + $(RM) -f core *.o *.a tmp_make + for i in *.c;do $(RM) -f `basename $$i .c`.s;done + +dep: + sed '/\#\#\# Dependencies/q' < Makefile > tmp_make + (for i in *.c;do echo -n `echo $$i | sed 's,\.c,\.s,'`" "; \ + $(CPP) -M $$i;done) >> tmp_make + cp tmp_make Makefile + +### Dependencies: diff --git a/linux-0.11-lab/newlibc/posix/cfsetget.c b/linux-0.11-lab/newlibc/posix/cfsetget.c new file mode 100644 index 0000000..cad59e9 --- /dev/null +++ b/linux-0.11-lab/newlibc/posix/cfsetget.c @@ -0,0 +1,26 @@ +#include + +speed_t cfgetospeed(struct termios *tp) +{ + return (tp->c_cflag & CBAUD); +} + +speed_t cfgetispeed(struct termios *tp) +{ + return (tp->c_cflag & CBAUD); +} + +int cfsetospeed(struct termios *tp, speed_t speed) +{ + if (speed < B0 || speed > B38400) + return 0; + tp->c_cflag &= ~CBAUD; + tp->c_cflag |= (speed & CBAUD); + + return 0; +} + +int cfsetispeed(struct termios *tp, speed_t speed) +{ + return cfsetospeed(tp, speed); +} diff --git a/linux-0.11-lab/newlibc/posix/rename.c b/linux-0.11-lab/newlibc/posix/rename.c new file mode 100644 index 0000000..a73d68c --- /dev/null +++ b/linux-0.11-lab/newlibc/posix/rename.c @@ -0,0 +1,4 @@ +#define __LIBRARY__ +#include + +_syscall2(int,rename,const char *,from,const char *,to) diff --git a/linux-0.11-lab/newlibc/posix/sigmask.c b/linux-0.11-lab/newlibc/posix/sigmask.c new file mode 100644 index 0000000..ac46800 --- /dev/null +++ b/linux-0.11-lab/newlibc/posix/sigmask.c @@ -0,0 +1,76 @@ +#include +#include +#include + +extern int ___sgetmask(); +extern int ___ssetmask(int); + +int raise(int sig) +{ + return kill(getpid(),sig); +} + +int sigaddset(sigset_t *mask, int signo) +{ + if (signo >= NSIG || signo <= 0) { + errno = EINVAL; + return -1; + } + *mask |= 1<<(signo-1); + return 1; +} + +int sigdelset(sigset_t *mask, int signo) +{ + if (signo >= NSIG || signo <= 0) { + errno = EINVAL; + return -1; + } + *mask &= ~(1<<(signo-1)); + return 1; +} + +int sigemptyset(sigset_t *mask) +{ + *mask = 0; + return 1; +} + +int sigfillset(sigset_t *mask) +{ + *mask = ~0; + return 1; +} + +int sigismember(sigset_t *mask, int signo) +{ + if (signo >= NSIG || signo <= 0) { + errno = EINVAL; + return -1; + } + return (*mask & (1<<(signo-1))) != 0; +} + +int sigprocmask(int how, sigset_t * set, sigset_t * oset) +{ + sigset_t old; + int rval = 0; + + old = ___sgetmask(); + + if (set) switch(how) { + case SIG_BLOCK: + rval = ___ssetmask((*set) | old); + break; + case SIG_UNBLOCK: + rval = ___ssetmask((~(*set)) & old); + break; + case SIG_SETMASK: + rval = ___ssetmask(*set); + break; + } + + if (oset) + *oset = old; + return rval; +} diff --git a/linux-0.11-lab/newlibc/posix/sleep.c b/linux-0.11-lab/newlibc/posix/sleep.c new file mode 100644 index 0000000..f7698e2 --- /dev/null +++ b/linux-0.11-lab/newlibc/posix/sleep.c @@ -0,0 +1,66 @@ +/* Copyright (C) 1991 Free Software Foundation, Inc. +This file is part of the GNU C Library. + +The GNU C Library is free software; you can redistribute it and/or +modify it under the terms of the GNU Library General Public License as +published by the Free Software Foundation; either version 2 of the +License, or (at your option) any later version. + +The GNU C Library is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include +#include +#include +#include + + +/* SIGALRM signal handler for `sleep'. This does nothing but return, + but SIG_IGN isn't supposed to break `pause'. */ +static void +DEFUN(sleep_handler, (sig), int sig) +{ + return; +} + +/* Make the process sleep for SECONDS seconds, or until a signal arrives + and is not ignored. The function returns the number of seconds less + than SECONDS which it actually slept (zero if it slept the full time). + If a signal handler does a `longjmp' or modifies the handling of the + SIGALRM signal while inside `sleep' call, the handling of the SIGALRM + signal afterwards is undefined. There is no return value to indicate + error, but if `sleep' returns SECONDS, it probably didn't work. */ +unsigned int +DEFUN(sleep, (seconds), unsigned int seconds) +{ + unsigned int remaining, slept; + void EXFUN((*handler), (int sig)); + time_t before, after; + + handler = signal(SIGALRM, sleep_handler); + if (handler == SIG_ERR) + return seconds; + + if (seconds == 0) + return 0; + before = time((time_t *) NULL); + remaining = alarm(seconds); + after = time((time_t *) NULL); + + (void) pause(); + + (void) signal(SIGALRM, handler); + + slept = (after - before) / 1000; + if (remaining > slept) + alarm(remaining - slept); + + return slept; +} diff --git a/linux-0.11-lab/newlibc/posix/sysconf.c b/linux-0.11-lab/newlibc/posix/sysconf.c new file mode 100644 index 0000000..5c114e6 --- /dev/null +++ b/linux-0.11-lab/newlibc/posix/sysconf.c @@ -0,0 +1,37 @@ +#include +#include +#include +#include + +long int sysconf(int name) +{ + switch(name) { + case _SC_ARG_MAX: + return (long) ARG_MAX; + + case _SC_CHILD_MAX: + return (long) CHILD_MAX; + + case _SC_CLOCKS_PER_SEC: + return (long) CLOCKS_PER_SEC; + + case _SC_NGROUPS_MAX: + return (long) NGROUPS_MAX; + + case _SC_OPEN_MAX: + return (long) OPEN_MAX; + + case _SC_JOB_CONTROL: + return -1L; /* no job control yet */ + + case _SC_SAVED_IDS: + return -1L; /* no saved uid/gid */ + + case _SC_VERSION: + return (long) _POSIX_VERSION; + + default: + errno = EINVAL; + return -1L; + } +} diff --git a/linux-0.11-lab/newlibc/posix/tcattr.c b/linux-0.11-lab/newlibc/posix/tcattr.c new file mode 100644 index 0000000..57cfce2 --- /dev/null +++ b/linux-0.11-lab/newlibc/posix/tcattr.c @@ -0,0 +1,34 @@ +#include +#include +#include + +speed_t cfgetispeed(struct termios *termios_p); +speed_t cfgetospeed(struct termios *termios_p); + +int cfsetispeed(struct termios *termios_p, speed_t speed); +int cfsetospeed(struct termios *termios_p, speed_t speed); + +int tcdrain(int fildes); +int tcflow(int fildes, int action); +int tcflush(int fildes, int queue_selector); +int tcsendbreak(int fildes, int duration); + +int tcgetattr(int fildes, struct termios *termios_p) +{ + return ioctl(fildes, TCGETS, termios_p); +} + +int tcsetattr(int fildes, int optional_actions, struct termios *termios_p) +{ + switch(optional_actions) { + case TCSANOW: + return ioctl(fildes, TCSETS, termios_p); + case TCSADRAIN: + return ioctl(fildes, TCSETSW, termios_p); + case TCSAFLUSH: + return ioctl(fildes, TCSETSF, termios_p); + default: + errno = EINVAL; + return -1; + } +} diff --git a/linux-0.11-lab/newlibc/posix/tcflow.c b/linux-0.11-lab/newlibc/posix/tcflow.c new file mode 100644 index 0000000..91d5811 --- /dev/null +++ b/linux-0.11-lab/newlibc/posix/tcflow.c @@ -0,0 +1,7 @@ +#include +#include + +int tcflow(int fd, int action) +{ + return(ioctl(fd,TCXONC,action)); +} diff --git a/linux-0.11-lab/newlibc/posix/tcsetpgrp.c b/linux-0.11-lab/newlibc/posix/tcsetpgrp.c new file mode 100644 index 0000000..9017bd6 --- /dev/null +++ b/linux-0.11-lab/newlibc/posix/tcsetpgrp.c @@ -0,0 +1,19 @@ +#include +#include +#include + +pid_t tcgetpgrp(int fildes) +{ + int tmp; + + if (ioctl(fildes,TIOCGPGRP,&tmp)<0) + return -1; + return tmp; +} + +int tcsetpgrp(int fildes, pid_t pgid) +{ + int tmp=pgid; + + return ioctl(fildes,TIOCSPGRP,&tmp); +} diff --git a/linux-0.11-lab/newlibc/posix/ttyname.c b/linux-0.11-lab/newlibc/posix/ttyname.c new file mode 100644 index 0000000..f9dbd1e --- /dev/null +++ b/linux-0.11-lab/newlibc/posix/ttyname.c @@ -0,0 +1,79 @@ +/* Copyright (C) 1991 Free Software Foundation, Inc. +This file is part of the GNU C Library. + +The GNU C Library is free software; you can redistribute it and/or +modify it under the terms of the GNU Library General Public License as +published by the Free Software Foundation; either version 2 of the +License, or (at your option) any later version. + +The GNU C Library is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define d_fileno d_ino +#define d_namlen d_reclen + +char *__ttyname = NULL; + +/* Return the pathname of the terminal FD is open on, or NULL on errors. + The returned storage is good only until the next call to this function. */ +char * +DEFUN(ttyname, (fd), int fd) +{ + static char dev[] = "/dev"; + char name[PATH_MAX]; + char *CONST np = &name[sizeof(dev)]; + struct stat st; + dev_t mydev; + ino_t myino; + DIR *dirstream; + struct dirent *d; + + if (fstat(fd, &st) < 0) + return NULL; + if (!S_ISCHR(st.st_mode)) + { + errno = EINVAL; + return NULL; + } + mydev = st.st_dev; + myino = st.st_ino; + + dirstream = opendir(dev); + if (dirstream == NULL) + return NULL; + + (void) memcpy(name, dev, sizeof(dev) - 1); + np[-1] = '/'; + while ((d = readdir(dirstream)) != NULL) + if (d->d_fileno == myino) + { + (void) memcpy(np, d->d_name, d->d_namlen + 1); + if (stat(name, &st) == 0 && st.st_dev == mydev) + { + static char result[PATH_MAX]; + (void) memcpy(result, name, (np - name) + d->d_namlen + 1); + (void) closedir(dirstream); + __ttyname = result; + return result; + } + } + (void) closedir(dirstream); + return NULL; +} diff --git a/linux-0.11-lab/newlibc/pwd/Makefile b/linux-0.11-lab/newlibc/pwd/Makefile new file mode 100644 index 0000000..6c7f682 --- /dev/null +++ b/linux-0.11-lab/newlibc/pwd/Makefile @@ -0,0 +1,46 @@ +# +# Makefile for some ansi-library functions +# + +LIB =../Libc.a +AR =gar +AS =gas +LD =gld +LDFLAGS =-s -x +CC =gcc +#INC =-nostdinc -I/linux/usr/include +CFLAGS =-Wall -O -fstrength-reduce -fomit-frame-pointer \ + -finline-functions $(INC) +CPP =$(CC) -E $(INC) + +.c.s: + $(CC) $(CFLAGS) \ + -S -o $*.s $< + +.s.o: + $(CC) -c -o $*.o $< + +.c.o: + $(CC) $(CFLAGS) \ + -c -o $*.o $< + +OBJS = fgetpwent.o getpw.o getpwent.o getpwnam.o getpwuid.o \ + putpwent.o pwdopen.o pwdread.o + +all: library + +library: $(OBJS) + $(AR) uvc $(LIB) $(OBJS) + sync + +clean: + $(RM) -f core *.o *.a tmp_make + for i in *.c;do $(RM) -f `basename $$i .c`.s;done + +dep: + sed '/\#\#\# Dependencies/q' < Makefile > tmp_make + (for i in *.c;do echo -n `echo $$i | sed 's,\.c,\.s,'`" "; \ + $(CPP) -M $$i;done) >> tmp_make + cp tmp_make Makefile + +### Dependencies: diff --git a/linux-0.11-lab/newlibc/pwd/fgetpwent.c b/linux-0.11-lab/newlibc/pwd/fgetpwent.c new file mode 100644 index 0000000..4a21cbb --- /dev/null +++ b/linux-0.11-lab/newlibc/pwd/fgetpwent.c @@ -0,0 +1,40 @@ +/* Copyright (C) 1991 Free Software Foundation, Inc. +This file is part of the GNU C Library. + +The GNU C Library is free software; you can redistribute it and/or +modify it under the terms of the GNU Library General Public License as +published by the Free Software Foundation; either version 2 of the +License, or (at your option) any later version. + +The GNU C Library is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include +#include +#include +#include +#include +#include +#include + +/* Read one entry from the given stream. */ +struct passwd * +DEFUN(fgetpwent, (stream), FILE *stream) +{ + static PTR info = NULL; + if (info == NULL) + { + info = __pwdalloc(); + if (info == NULL) + return(NULL); + } + + return(__pwdread(stream, info)); +} diff --git a/linux-0.11-lab/newlibc/pwd/getpw.c b/linux-0.11-lab/newlibc/pwd/getpw.c new file mode 100644 index 0000000..45fb271 --- /dev/null +++ b/linux-0.11-lab/newlibc/pwd/getpw.c @@ -0,0 +1,48 @@ +/* Copyright (C) 1991 Free Software Foundation, Inc. +This file is part of the GNU C Library. + +The GNU C Library is free software; you can redistribute it and/or +modify it under the terms of the GNU Library General Public License as +published by the Free Software Foundation; either version 2 of the +License, or (at your option) any later version. + +The GNU C Library is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include +#include +#include +#include + + +/* Re-construct the password-file line for the given uid + in the given buffer. This knows the format that the caller + will expect, but this need not be the format of the password file. */ +int +DEFUN(getpw, (uid, buf), int uid AND register char *buf) +{ + register struct passwd *p; + + if (uid < 0 || buf == NULL) + { + errno = EINVAL; + return(-1); + } + + p = getpwuid(uid); + if (p == NULL) + return(-1); + + if (sprintf(buf, "%s:%s:%d:%d:%s:%s:%s", p->pw_name, p->pw_passwd, + p->pw_uid, p->pw_gid, p->pw_gecos, p->pw_dir, p->pw_shell) < 0) + return(-1); + + return(0); +} diff --git a/linux-0.11-lab/newlibc/pwd/getpwent.c b/linux-0.11-lab/newlibc/pwd/getpwent.c new file mode 100644 index 0000000..1c88950 --- /dev/null +++ b/linux-0.11-lab/newlibc/pwd/getpwent.c @@ -0,0 +1,67 @@ +/* Copyright (C) 1991 Free Software Foundation, Inc. +This file is part of the GNU C Library. + +The GNU C Library is free software; you can redistribute it and/or +modify it under the terms of the GNU Library General Public License as +published by the Free Software Foundation; either version 2 of the +License, or (at your option) any later version. + +The GNU C Library is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include +#include +#include +#include + +static FILE *stream = NULL; + +/* Rewind the stream. */ +void +DEFUN_VOID(setpwent) +{ + if (stream != NULL) + rewind(stream); +} + + +/* Close the stream. */ +void +DEFUN_VOID(endpwent) +{ + if (stream != NULL) + { + (void) fclose(stream); + stream = NULL; + } +} + + +/* Return one entry from the password file. */ +struct passwd * +DEFUN_VOID(getpwent) +{ + static PTR info = NULL; + if (info == NULL) + { + info = __pwdalloc(); + if (info == NULL) + return(NULL); + } + + if (stream == NULL) + { + stream = __pwdopen(); + if (stream == NULL) + return(NULL); + } + + return(__pwdread(stream, info)); +} diff --git a/linux-0.11-lab/newlibc/pwd/getpwnam.c b/linux-0.11-lab/newlibc/pwd/getpwnam.c new file mode 100644 index 0000000..1e7ea5c --- /dev/null +++ b/linux-0.11-lab/newlibc/pwd/getpwnam.c @@ -0,0 +1,50 @@ +/* Copyright (C) 1991 Free Software Foundation, Inc. +This file is part of the GNU C Library. + +The GNU C Library is free software; you can redistribute it and/or +modify it under the terms of the GNU Library General Public License as +published by the Free Software Foundation; either version 2 of the +License, or (at your option) any later version. + +The GNU C Library is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include +#include +#include +#include +#include + +/* Search for an entry with a matching name. */ +struct passwd * +DEFUN(getpwnam, (name), register CONST char *name) +{ + static PTR info = NULL; + register FILE *stream; + register struct passwd *p; + + if (info == NULL) + { + info = __pwdalloc(); + if (info == NULL) + return(NULL); + } + + stream = __pwdopen(); + if (stream == NULL) + return(NULL); + + while ((p = __pwdread(stream, info)) != NULL) + if (!strcmp(p->pw_name, name)) + break; + + (void) fclose(stream); + return(p); +} diff --git a/linux-0.11-lab/newlibc/pwd/getpwuid.c b/linux-0.11-lab/newlibc/pwd/getpwuid.c new file mode 100644 index 0000000..30e4032 --- /dev/null +++ b/linux-0.11-lab/newlibc/pwd/getpwuid.c @@ -0,0 +1,50 @@ +/* Copyright (C) 1991 Free Software Foundation, Inc. +This file is part of the GNU C Library. + +The GNU C Library is free software; you can redistribute it and/or +modify it under the terms of the GNU Library General Public License as +published by the Free Software Foundation; either version 2 of the +License, or (at your option) any later version. + +The GNU C Library is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include +#include +#include +#include +#include + +/* Search for an entry with a matching uid. */ +struct passwd * +DEFUN(getpwuid, (uid), register uid_t uid) +{ + static PTR info; + register FILE *stream; + register struct passwd *p; + + if (info == NULL) + { + info = __pwdalloc(); + if (info == NULL) + return(NULL); + } + + stream = __pwdopen(); + if (stream == NULL) + return(NULL); + + while ((p = __pwdread(stream, info)) != NULL) + if (p->pw_uid == uid) + break; + + (void) fclose(stream); + return(p); +} diff --git a/linux-0.11-lab/newlibc/pwd/putpwent.c b/linux-0.11-lab/newlibc/pwd/putpwent.c new file mode 100644 index 0000000..a2abd49 --- /dev/null +++ b/linux-0.11-lab/newlibc/pwd/putpwent.c @@ -0,0 +1,41 @@ +/* Copyright (C) 1991 Free Software Foundation, Inc. +This file is part of the GNU C Library. + +The GNU C Library is free software; you can redistribute it and/or +modify it under the terms of the GNU Library General Public License as +published by the Free Software Foundation; either version 2 of the +License, or (at your option) any later version. + +The GNU C Library is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include +#include +#include +#include + + +/* Write an entry to the given stream. + This must know the format of the password file. */ +int +DEFUN(putpwent, (p, stream), register CONST struct passwd *p AND FILE *stream) +{ + if (p == NULL || stream == NULL) + { + errno = EINVAL; + return(-1); + } + + if (fprintf(stream, "%s:%s:%d:%d:%s:%s\n", p->pw_name, p->pw_passwd, + p->pw_uid, p->pw_gid, p->pw_gecos, p->pw_shell) < 0) + return(-1); + + return(0); +} diff --git a/linux-0.11-lab/newlibc/pwd/pwdopen.c b/linux-0.11-lab/newlibc/pwd/pwdopen.c new file mode 100644 index 0000000..6d35ab9 --- /dev/null +++ b/linux-0.11-lab/newlibc/pwd/pwdopen.c @@ -0,0 +1,28 @@ +/* Copyright (C) 1991 Free Software Foundation, Inc. +This file is part of the GNU C Library. + +The GNU C Library is free software; you can redistribute it and/or +modify it under the terms of the GNU Library General Public License as +published by the Free Software Foundation; either version 2 of the +License, or (at your option) any later version. + +The GNU C Library is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include +#include +#include + +/* Return a new stream open on the password file. */ +FILE * +DEFUN_VOID(__pwdopen) +{ + return(fopen("/etc/passwd", "r")); +} diff --git a/linux-0.11-lab/newlibc/pwd/pwdread.c b/linux-0.11-lab/newlibc/pwd/pwdread.c new file mode 100644 index 0000000..ce099f0 --- /dev/null +++ b/linux-0.11-lab/newlibc/pwd/pwdread.c @@ -0,0 +1,115 @@ +/* Copyright (C) 1991 Free Software Foundation, Inc. +This file is part of the GNU C Library. + +The GNU C Library is free software; you can redistribute it and/or +modify it under the terms of the GNU Library General Public License as +published by the Free Software Foundation; either version 2 of the +License, or (at your option) any later version. + +The GNU C Library is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include + + +/* This is the function that all the others are based on. + The format of the password file is known only here. */ + +/* Structure containing info kept by each __pwdread caller. */ +typedef struct + { +#define NAME_SIZE 8 +#define PASSWD_SIZE 20 +#define GECOS_SIZE 100 + char buf[NAME_SIZE + 1 + PASSWD_SIZE + 1 + 20 + 1 + 20 + 1 + + GECOS_SIZE + 1 + PATH_MAX + 1 + PATH_MAX + 1]; + struct passwd p; + } pwdread_info; + + +/* Return a chunk of memory containing a pre-initialized `pwdread_info'. */ +PTR +DEFUN_VOID(__pwdalloc) +{ + pwdread_info *info = (PTR) malloc(sizeof(pwdread_info)); + if (info == NULL) + return NULL; + return info; +} + +/* Read a password entry from STREAM, filling in P. */ +struct passwd * +DEFUN(__pwdread, (stream, p), FILE *stream AND PTR CONST p) +{ + register pwdread_info *CONST info = (pwdread_info *) p; + char *start, *end; + + /* Idiocy checks. */ + if (stream == NULL) + { + errno = EINVAL; + return NULL; + } + + if (fgets (info->buf, sizeof (info->buf), stream) == NULL) + return NULL; + + start = info->buf; + end = strchr (start, ':'); + if (end == NULL) + return NULL; + *end = '\0'; + info->p.pw_name = start; + + start = end + 1; + end = strchr (start, ':'); + if (end == NULL) + return NULL; + *end = '\0'; + info->p.pw_passwd = start; + + info->p.pw_uid = (uid_t) strtol (end + 1, &end, 10); + if (*end != ':') + return NULL; + info->p.pw_gid = (gid_t) strtol (end + 1, &end, 10); + if (*end != ':') + return NULL; + + start = end + 1; + end = strchr (start, ':'); + if (end == NULL) + return NULL; + *end = '\0'; + info->p.pw_gecos = start; + + start = end + 1; + end = strchr (start, ':'); + if (end == NULL) + return NULL; + *end = '\0'; + info->p.pw_dir = start; + + start = end + 1; + end = strchr (start, '\n'); + if (end == NULL) + return NULL; + *end = '\0'; + info->p.pw_shell = start; + + return &info->p; +} diff --git a/linux-0.11-lab/newlibc/soft/Makefile b/linux-0.11-lab/newlibc/soft/Makefile new file mode 100644 index 0000000..86afc0d --- /dev/null +++ b/linux-0.11-lab/newlibc/soft/Makefile @@ -0,0 +1,41 @@ +LIB=../Libsoft.a +AR =/usr2/linux/cross/bin/gar +AS =/usr2/linux/cross/lib/gcc-as +LD =/usr2/linux/cross/bin/gld +RANLIB =/usr2/linux/cross/bin/ranlib +LDFLAGS =-s -x +CC =/usr2/linux/cross/bin/gcc -B/usr2/linux/cross/lib/gcc- +INC =-nostdinc -I. -I/usr2/linux/src/lib.new/new \ + -I/usr2/linux/usr/include +CFLAGS = -Wall -O -fstrength-reduce -fomit-frame-pointer $(INC) +CPP=$(CC) -E $(INC) +LIBS= -lm + +.s.o : + $(CC) $(CFLAGS) -c $*.s + +.c.o : + $(CC) $(CFLAGS) -c $*.c + +OBJS = asin.o atan.o const.o exp.o fabs.o floor.o frexp.o hypot.o \ + j0.o j1.o jn.o log.o pow.o sin.o sinh.o sqrt.o tan.o tanh.o \ + erf.o lgamma.o + +library: $(OBJS) + $(AR) uvc $(LIB) $(OBJS) + sync + +test: $(OBJS) + $(CC) -o $@ $(OBJS) $(LIBS) + +clean: + $(RM) -f core *.o *.a tmp_make + for i in *.c;do $(RM) -f `basename $$i .c`.s;done + +dep: + sed '/\#\#\# Dependencies/q' < Makefile > tmp_make + (for i in *.c;do echo -n `echo $$i | sed 's,\.c,\.s,'`" "; \ + $(CPP) -M $$i;done) >> tmp_make + cp tmp_make Makefile + +### Dependencies: diff --git a/linux-0.11-lab/newlibc/soft/README b/linux-0.11-lab/newlibc/soft/README new file mode 100644 index 0000000..ad1dc90 --- /dev/null +++ b/linux-0.11-lab/newlibc/soft/README @@ -0,0 +1,20 @@ + 01/13/90 +I implemented frexp(), ldexp(), and modf() +as needed by this math library, using the IEEE double's of GNU CC +for the 68000. This was previously implemented for the trix compiler +only (harmony stuff, in crt.a). + -Marc E. G. + +Now uses a sensible custom math.h instead of libm.h. + + 02/28/91 +Added infnan() and finite() in const.c; these constants should be revised... + -MEG + +--------------------------------- +I adopted this package to Linux. It works on all legal numbers. But it +needs more work to get error handling right. + +H.J. Lu +hlu@eecs.wsu.edu +02/18/92 diff --git a/linux-0.11-lab/newlibc/soft/asin.c b/linux-0.11-lab/newlibc/soft/asin.c new file mode 100644 index 0000000..3857868 --- /dev/null +++ b/linux-0.11-lab/newlibc/soft/asin.c @@ -0,0 +1,44 @@ +#include + +/* + asin(arg) and acos(arg) return the arcsin, arccos, + respectively of their arguments. + + Arctan is called after appropriate range reduction. + + need error handling +*/ + +double asin(double arg) +{ + double sign, temp; + + sign = 1.; + if(arg <0){ + arg = -arg; + sign = -1.; + } + + if(arg > 1.){ + errno = EDOM; + return(0.); + } + + temp = sqrt(1. - arg*arg); + if(arg > 0.7) + temp = pio2 - atan(temp/arg); + else + temp = atan(arg/temp); + + return(sign*temp); +} + +double acos(double arg) +{ + if((arg > 1.) || (arg < -1.)){ + /*errno = EDOM;*/ + return(0.); + } + + return(pio2 - asin(arg)); +} diff --git a/linux-0.11-lab/newlibc/soft/atan.c b/linux-0.11-lab/newlibc/soft/atan.c new file mode 100644 index 0000000..de8fbc2 --- /dev/null +++ b/linux-0.11-lab/newlibc/soft/atan.c @@ -0,0 +1,97 @@ +#include + + +/* + floating-point arctangent + + atan returns the value of the arctangent of its + argument in the range [-pi/2,pi/2]. + + atan2 returns the arctangent of arg1/arg2 + in the range [-pi,pi]. + + there are no error returns. + + coefficients are #5077 from Hart & Cheney. (19.56D) +*/ + + double pio2 = 1.570796326794896619; +static double sq2p1 =2.414213562373095048802e0; +static double sq2m1 = .414213562373095048802e0; +static double pio4 = .785398163397448309615e0; +static double p4 = .161536412982230228262e2; +static double p3 = .26842548195503973794141e3; +static double p2 = .11530293515404850115428136e4; +static double p1 = .178040631643319697105464587e4; +static double p0 = .89678597403663861959987488e3; +static double q4 = .5895697050844462222791e2; +static double q3 = .536265374031215315104235e3; +static double q2 = .16667838148816337184521798e4; +static double q1 = .207933497444540981287275926e4; +static double q0 = .89678597403663861962481162e3; +static double satan(double); +static double xatan(double); + +/* + atan makes its argument positive and + calls the inner routine satan. +*/ + +double atan(double arg) +{ + if(arg>0) + return(satan(arg)); + else + return(-satan(-arg)); +} + + +/* + atan2 discovers what quadrant the angle + is in and calls atan. +*/ + +double atan2(double arg1, double arg2) +{ + if((arg1+arg2)==arg1) + if(arg1 >= 0.) return(pio2); + else return(-pio2); + else if(arg2 <0.) + if(arg1 >= 0.) + return(pio2+pio2 - satan(-arg1/arg2)); + else + return(-pio2-pio2 + satan(arg1/arg2)); + else if(arg1>0) + return(satan(arg1/arg2)); + return(-satan(-arg1/arg2)); +} + +/* + satan reduces its argument (known to be positive) + to the range [0,0.414...] and calls xatan. +*/ + +static double satan(double arg) +{ + if(arg < sq2m1) + return(xatan(arg)); + else if(arg > sq2p1) + return(pio2 - xatan(1.0/arg)); + return(pio4 + xatan((arg-1.0)/(arg+1.0))); +} + +/* + xatan evaluates a series valid in the + range [-0.414...,+0.414...]. +*/ + +static double xatan(double arg) +{ + double argsq; + double value; + + argsq = arg*arg; + value = ((((p4*argsq + p3)*argsq + p2)*argsq + p1)*argsq + p0); + value = value/(((((argsq + q4)*argsq + q3)*argsq + q2)*argsq + q1)*argsq + q0); + return(value*arg); +} diff --git a/linux-0.11-lab/newlibc/soft/const.c b/linux-0.11-lab/newlibc/soft/const.c new file mode 100644 index 0000000..3ce8d86 --- /dev/null +++ b/linux-0.11-lab/newlibc/soft/const.c @@ -0,0 +1,41 @@ + +#include + +/* I made these up - I don't know what are the actual bit-representations + * of infinites and NaN's -meg + */ + +static struct bitdouble bdouble_inf = {0,0x7ff,0,0}; +static struct bitdouble bdouble_minf = {1,0x7ff,0,0}; +static struct bitdouble bdouble_NaN = {0,0x001,0,1}; +static struct bitdouble bdouble_huge = {0,0x7ff,0xfffff,0xffffffff}; +static struct bitdouble bdouble_tiny = {0,0x001,0x00000,0x00000000}; +static struct bitfloat bfloat_huge = {0,0xff,0x7fffff}; +static struct bitfloat bfloat_tiny = {0,0x01,0x000000}; + +double *double_inf = (double*)&bdouble_inf; +double *double_minf = (double*)&bdouble_minf; +double *double_NaN = (double*)&bdouble_NaN; +double *double_huge = (double*)&bdouble_huge; +double *double_tiny = (double*)&bdouble_tiny; +float *float_huge = (float*)&bfloat_huge; +float *float_tiny = (float*)&bfloat_tiny; + +int finite(double arg) +{ + if (arg==*double_inf || arg==*double_minf || arg==*double_NaN) + return 0; + return 1; +} + +double infnan(int iarg) +{ + /* should signal error handling; called by libm routines upon error */ + switch (iarg) { + case EDOM: return *double_NaN; + case ERANGE: return *double_inf; + case -ERANGE: return *double_minf; + default: return *double_NaN; + } +} + diff --git a/linux-0.11-lab/newlibc/soft/erf.c b/linux-0.11-lab/newlibc/soft/erf.c new file mode 100644 index 0000000..2b1c319 --- /dev/null +++ b/linux-0.11-lab/newlibc/soft/erf.c @@ -0,0 +1,124 @@ +/* + * Copyright (c) 1985 Regents of the University of California. + * All rights reserved. The Berkeley software License Agreement + * specifies the terms and conditions for redistribution. + */ + +#ifndef lint +static char sccsid[] = "@(#)erf.c 5.2 (Berkeley) 4/29/88"; +#endif /* not lint */ + +/* + C program for floating point error function + + erf(x) returns the error function of its argument + erfc(x) returns 1.0-erf(x) + + erf(x) is defined by + ${2 over sqrt(pi)} int from 0 to x e sup {-t sup 2} dt$ + + the entry for erfc is provided because of the + extreme loss of relative accuracy if erf(x) is + called for large x and the result subtracted + from 1. (e.g. for x= 10, 12 places are lost). + + There are no error returns. + + Calls exp. + + Coefficients for large x are #5667 from Hart & Cheney (18.72D). +*/ + +#include + +#define M 7 +#define N 9 +static double torp = 1.1283791670955125738961589031; +static double p1[] = { + 0.804373630960840172832162e5, + 0.740407142710151470082064e4, + 0.301782788536507577809226e4, + 0.380140318123903008244444e2, + 0.143383842191748205576712e2, + -.288805137207594084924010e0, + 0.007547728033418631287834e0, +}; +static double q1[] = { + 0.804373630960840172826266e5, + 0.342165257924628539769006e5, + 0.637960017324428279487120e4, + 0.658070155459240506326937e3, + 0.380190713951939403753468e2, + 0.100000000000000000000000e1, + 0.0, +}; +static double p2[] = { + 0.18263348842295112592168999e4, + 0.28980293292167655611275846e4, + 0.2320439590251635247384768711e4, + 0.1143262070703886173606073338e4, + 0.3685196154710010637133875746e3, + 0.7708161730368428609781633646e2, + 0.9675807882987265400604202961e1, + 0.5641877825507397413087057563e0, + 0.0, +}; +static double q2[] = { + 0.18263348842295112595576438e4, + 0.495882756472114071495438422e4, + 0.60895424232724435504633068e4, + 0.4429612803883682726711528526e4, + 0.2094384367789539593790281779e4, + 0.6617361207107653469211984771e3, + 0.1371255960500622202878443578e3, + 0.1714980943627607849376131193e2, + 1.0, +}; + +double +erf(double arg) +{ + int sign; + double argsq; + double d, n; + int i; + + sign = 1; + if(arg < 0.){ + arg = -arg; + sign = -1; + } + if(arg < 0.5){ + argsq = arg*arg; + for(n=0,d=0,i=M-1; i>=0; i--){ + n = n*argsq + p1[i]; + d = d*argsq + q1[i]; + } + return(sign*torp*arg*n/d); + } + if(arg >= 10.) + return(sign*1.); + return(sign*(1. - erfc(arg))); +} + +double +erfc(double arg) +{ + double n, d; + int i; + + if(arg < 0.) + return(2. - erfc(-arg)); +/* + if(arg < 0.5) + return(1. - erf(arg)); +*/ + if(arg >= 10.) + return(0.); + + for(n=0,d=0,i=N-1; i>=0; i--){ + n = n*arg + p2[i]; + d = d*arg + q2[i]; + } + return(exp(-arg*arg)*n/d); +} diff --git a/linux-0.11-lab/newlibc/soft/exp.c b/linux-0.11-lab/newlibc/soft/exp.c new file mode 100644 index 0000000..e7c2456 --- /dev/null +++ b/linux-0.11-lab/newlibc/soft/exp.c @@ -0,0 +1,40 @@ +#include + +/* + exp returns the exponential function of its + floating-point argument. + + The coefficients are #1069 from Hart and Cheney. (22.35D) +*/ + +static double exp_p0 = .2080384346694663001443843411e7; +static double exp_p1 = .3028697169744036299076048876e5; +static double exp_p2 = .6061485330061080841615584556e2; +static double exp_q0 = .6002720360238832528230907598e7; +static double exp_q1 = .3277251518082914423057964422e6; +static double exp_q2 = .1749287689093076403844945335e4; +static double log2e = 1.4426950408889634073599247; +static double sqrt2 = 1.4142135623730950488016887; +static double maxf = 10000; + +double exp(double arg) +{ + double fract; + double temexp_p1, temexp_p2, xsq; + int ent; + + if(arg == 0.) + return(1.); + if(arg < -maxf) + return(0.); + if(arg > maxf) { + return(HUGE_VAL); + } + arg *= log2e; + ent = floor(arg); + fract = (arg-ent) - 0.5; + xsq = fract*fract; + temexp_p1 = ((exp_p2*xsq+exp_p1)*xsq+exp_p0)*fract; + temexp_p2 = ((1.0*xsq+exp_q2)*xsq+exp_q1)*xsq + exp_q0; + return(ldexp(sqrt2*(temexp_p2+temexp_p1)/(temexp_p2-temexp_p1), ent)); +} diff --git a/linux-0.11-lab/newlibc/soft/fabs.c b/linux-0.11-lab/newlibc/soft/fabs.c new file mode 100644 index 0000000..c180c59 --- /dev/null +++ b/linux-0.11-lab/newlibc/soft/fabs.c @@ -0,0 +1,8 @@ +#include + +double fabs(double arg) +{ + if(arg < 0.) + arg = -arg; + return(arg); +} diff --git a/linux-0.11-lab/newlibc/soft/floor.c b/linux-0.11-lab/newlibc/soft/floor.c new file mode 100644 index 0000000..89eac30 --- /dev/null +++ b/linux-0.11-lab/newlibc/soft/floor.c @@ -0,0 +1,26 @@ +#include + +/* + * floor and ceil-- greatest integer <= arg + * (resp least >=) + */ + +double floor(double d) +{ + double fract; + + if (d<0.0) { + d = -d; + fract = modf(d, &d); + if (fract != 0.0) + d += 1; + d = -d; + } else + modf(d, &d); + return(d); +} + +double ceil(double d) +{ + return(-floor(-d)); +} diff --git a/linux-0.11-lab/newlibc/soft/frexp.c b/linux-0.11-lab/newlibc/soft/frexp.c new file mode 100644 index 0000000..d833426 --- /dev/null +++ b/linux-0.11-lab/newlibc/soft/frexp.c @@ -0,0 +1,17 @@ +#include + +/* Stores binary exponent of d in e, and returns whole fraction of d + * (with binary exponent of 0) (special case for d=0) + */ +double frexp(double d, int *e) +{ + struct bitdouble *dp = (struct bitdouble *)&d; + + if (dp->exp == 0) /* value is zero, return exponent of 0 */ + *e = 0; + else { + *e = dp->exp - BIAS + 1; + dp->exp = BIAS - 1; + } + return d; +} diff --git a/linux-0.11-lab/newlibc/soft/hypot.c b/linux-0.11-lab/newlibc/soft/hypot.c new file mode 100644 index 0000000..c727404 --- /dev/null +++ b/linux-0.11-lab/newlibc/soft/hypot.c @@ -0,0 +1,25 @@ +#include + +/* + * sqrt(a^2 + b^2) + * (but carefully) + */ + +double hypot(double a, double b) +{ + double t; + if(a<0) a = -a; + if(b<0) b = -b; + if(a > b) { + t = a; + a = b; + b = t; + } + if(b==0) return(0.); + a /= b; + /* + * pathological overflow possible + * in the next line. + */ + return(b*sqrt(1. + a*a)); +} diff --git a/linux-0.11-lab/newlibc/soft/j0.c b/linux-0.11-lab/newlibc/soft/j0.c new file mode 100644 index 0000000..3d4665f --- /dev/null +++ b/linux-0.11-lab/newlibc/soft/j0.c @@ -0,0 +1,183 @@ +#include + +/* + floating point Bessel's function + of the first and second kinds + of order zero + + j0(x) returns the value of J0(x) + for all real values of x. + + There are no error returns. + Calls sin, cos, sqrt. + + There is a niggling bug in J0 which + causes errors up to 2e-16 for x in the + interval [-8,8]. + The bug is caused by an inappropriate order + of summation of the series. rhm will fix it + someday. + + Coefficients are from Hart & Cheney. + #5849 (19.22D) + #6549 (19.25D) + #6949 (19.41D) + + y0(x) returns the value of Y0(x) + for positive real values of x. + For x<=0, error number EDOM is set and a + large negative value is returned. + + Calls sin, cos, sqrt, log, j0. + + The values of Y0 have not been checked + to more than ten places. + + Coefficients are from Hart & Cheney. + #6245 (18.78D) + #6549 (19.25D) + #6949 (19.41D) +*/ + +static void asympt(double); +static double pzero, qzero; +static double tpi = .6366197723675813430755350535e0; +static double pio4 = .7853981633974483096156608458e0; +static double p1[] = { + 0.4933787251794133561816813446e21, + -.1179157629107610536038440800e21, + 0.6382059341072356562289432465e19, + -.1367620353088171386865416609e18, + 0.1434354939140344111664316553e16, + -.8085222034853793871199468171e13, + 0.2507158285536881945555156435e11, + -.4050412371833132706360663322e8, + 0.2685786856980014981415848441e5, +}; +static double q1[] = { + 0.4933787251794133562113278438e21, + 0.5428918384092285160200195092e19, + 0.3024635616709462698627330784e17, + 0.1127756739679798507056031594e15, + 0.3123043114941213172572469442e12, + 0.6699987672982239671814028660e9, + 0.1114636098462985378182402543e7, + 0.1363063652328970604442810507e4, + 1.0 +}; +static double p2[] = { + 0.5393485083869438325262122897e7, + 0.1233238476817638145232406055e8, + 0.8413041456550439208464315611e7, + 0.2016135283049983642487182349e7, + 0.1539826532623911470917825993e6, + 0.2485271928957404011288128951e4, + 0.0, +}; +static double q2[] = { + 0.5393485083869438325560444960e7, + 0.1233831022786324960844856182e8, + 0.8426449050629797331554404810e7, + 0.2025066801570134013891035236e7, + 0.1560017276940030940592769933e6, + 0.2615700736920839685159081813e4, + 1.0, +}; +static double p3[] = { + -.3984617357595222463506790588e4, + -.1038141698748464093880530341e5, + -.8239066313485606568803548860e4, + -.2365956170779108192723612816e4, + -.2262630641933704113967255053e3, + -.4887199395841261531199129300e1, + 0.0, +}; +static double q3[] = { + 0.2550155108860942382983170882e6, + 0.6667454239319826986004038103e6, + 0.5332913634216897168722255057e6, + 0.1560213206679291652539287109e6, + 0.1570489191515395519392882766e5, + 0.4087714673983499223402830260e3, + 1.0, +}; +static double p4[] = { + -.2750286678629109583701933175e20, + 0.6587473275719554925999402049e20, + -.5247065581112764941297350814e19, + 0.1375624316399344078571335453e18, + -.1648605817185729473122082537e16, + 0.1025520859686394284509167421e14, + -.3436371222979040378171030138e11, + 0.5915213465686889654273830069e8, + -.4137035497933148554125235152e5, +}; +static double q4[] = { + 0.3726458838986165881989980e21, + 0.4192417043410839973904769661e19, + 0.2392883043499781857439356652e17, + 0.9162038034075185262489147968e14, + 0.2613065755041081249568482092e12, + 0.5795122640700729537480087915e9, + 0.1001702641288906265666651753e7, + 0.1282452772478993804176329391e4, + 1.0, +}; + +double j0(double arg) +{ + double argsq, n, d; + int i; + + if(arg < 0.) arg = -arg; + if(arg > 8.){ + asympt(arg); + n = arg - pio4; + return(sqrt(tpi/arg)*(pzero*cos(n) - qzero*sin(n))); + } + argsq = arg*arg; + for(n=0,d=0,i=8;i>=0;i--){ + n = n*argsq + p1[i]; + d = d*argsq + q1[i]; + } + return(n/d); +} + +double y0(double arg) +{ + double argsq, n, d; + double sin(), cos(), sqrt(), log(), j0(); + int i; + + if(arg <= 0.){ + return(-HUGE_VAL); + } + if(arg > 8.){ + asympt(arg); + n = arg - pio4; + return(sqrt(tpi/arg)*(pzero*sin(n) + qzero*cos(n))); + } + argsq = arg*arg; + for(n=0,d=0,i=8;i>=0;i--){ + n = n*argsq + p4[i]; + d = d*argsq + q4[i]; + } + return(n/d + tpi*j0(arg)*log(arg)); +} + +static void asympt(double arg) +{ + double zsq, n, d; + int i; + zsq = 64./(arg*arg); + for(n=0,d=0,i=6;i>=0;i--){ + n = n*zsq + p2[i]; + d = d*zsq + q2[i]; + } + pzero = n/d; + for(n=0,d=0,i=6;i>=0;i--){ + n = n*zsq + p3[i]; + d = d*zsq + q3[i]; + } + qzero = (8./arg)*(n/d); +} diff --git a/linux-0.11-lab/newlibc/soft/j1.c b/linux-0.11-lab/newlibc/soft/j1.c new file mode 100644 index 0000000..0c966ca --- /dev/null +++ b/linux-0.11-lab/newlibc/soft/j1.c @@ -0,0 +1,188 @@ +#include + +/* + floating point Bessel's function + of the first and second kinds + of order one + + j1(x) returns the value of J1(x) + for all real values of x. + + There are no error returns. + Calls sin, cos, sqrt. + + There is a niggling bug in J1 which + causes errors up to 2e-16 for x in the + interval [-8,8]. + The bug is caused by an inappropriate order + of summation of the series. rhm will fix it + someday. + + Coefficients are from Hart & Cheney. + #6050 (20.98D) + #6750 (19.19D) + #7150 (19.35D) + + y1(x) returns the value of Y1(x) + for positive real values of x. + For x<=0, error number EDOM is set and a + large negative value is returned. + + Calls sin, cos, sqrt, log, j1. + + The values of Y1 have not been checked + to more than ten places. + + Coefficients are from Hart & Cheney. + #6447 (22.18D) + #6750 (19.19D) + #7150 (19.35D) +*/ + +static void asympt(double); +static double pzero, qzero; +static double tpi = .6366197723675813430755350535e0; +static double pio4 = .7853981633974483096156608458e0; +static double p1[] = { + 0.581199354001606143928050809e21, + -.6672106568924916298020941484e20, + 0.2316433580634002297931815435e19, + -.3588817569910106050743641413e17, + 0.2908795263834775409737601689e15, + -.1322983480332126453125473247e13, + 0.3413234182301700539091292655e10, + -.4695753530642995859767162166e7, + 0.2701122710892323414856790990e4, +}; +static double q1[] = { + 0.1162398708003212287858529400e22, + 0.1185770712190320999837113348e20, + 0.6092061398917521746105196863e17, + 0.2081661221307607351240184229e15, + 0.5243710262167649715406728642e12, + 0.1013863514358673989967045588e10, + 0.1501793594998585505921097578e7, + 0.1606931573481487801970916749e4, + 1.0, +}; +static double p2[] = { + -.4435757816794127857114720794e7, + -.9942246505077641195658377899e7, + -.6603373248364939109255245434e7, + -.1523529351181137383255105722e7, + -.1098240554345934672737413139e6, + -.1611616644324610116477412898e4, + 0.0, +}; +static double q2[] = { + -.4435757816794127856828016962e7, + -.9934124389934585658967556309e7, + -.6585339479723087072826915069e7, + -.1511809506634160881644546358e7, + -.1072638599110382011903063867e6, + -.1455009440190496182453565068e4, + 1.0, +}; +static double p3[] = { + 0.3322091340985722351859704442e5, + 0.8514516067533570196555001171e5, + 0.6617883658127083517939992166e5, + 0.1849426287322386679652009819e5, + 0.1706375429020768002061283546e4, + 0.3526513384663603218592175580e2, + 0.0, +}; +static double q3[] = { + 0.7087128194102874357377502472e6, + 0.1819458042243997298924553839e7, + 0.1419460669603720892855755253e7, + 0.4002944358226697511708610813e6, + 0.3789022974577220264142952256e5, + 0.8638367769604990967475517183e3, + 1.0, +}; +static double p4[] = { + -.9963753424306922225996744354e23, + 0.2655473831434854326894248968e23, + -.1212297555414509577913561535e22, + 0.2193107339917797592111427556e20, + -.1965887462722140658820322248e18, + 0.9569930239921683481121552788e15, + -.2580681702194450950541426399e13, + 0.3639488548124002058278999428e10, + -.2108847540133123652824139923e7, + 0.0, +}; +static double q4[] = { + 0.5082067366941243245314424152e24, + 0.5435310377188854170800653097e22, + 0.2954987935897148674290758119e20, + 0.1082258259408819552553850180e18, + 0.2976632125647276729292742282e15, + 0.6465340881265275571961681500e12, + 0.1128686837169442121732366891e10, + 0.1563282754899580604737366452e7, + 0.1612361029677000859332072312e4, + 1.0, +}; + +double j1(double arg) +{ + double xsq, n, d, x; + int i; + + x = arg; + if(x < 0.) x = -x; + if(x > 8.){ + asympt(x); + n = x - 3.*pio4; + n = sqrt(tpi/x)*(pzero*cos(n) - qzero*sin(n)); + if(arg <0.) n = -n; + return(n); + } + xsq = x*x; + for(n=0,d=0,i=8;i>=0;i--){ + n = n*xsq + p1[i]; + d = d*xsq + q1[i]; + } + return(arg*n/d); +} + +double y1(double arg) +{ + double xsq, n, d, x; + int i; + + x = arg; + if(x <= 0.){ + return(-HUGE_VAL); + } + if(x > 8.){ + asympt(x); + n = x - 3*pio4; + return(sqrt(tpi/x)*(pzero*sin(n) + qzero*cos(n))); + } + xsq = x*x; + for(n=0,d=0,i=9;i>=0;i--){ + n = n*xsq + p4[i]; + d = d*xsq + q4[i]; + } + return(x*n/d + tpi*(j1(x)*log(x)-1./x)); +} + +static void asympt(double arg) +{ + double zsq, n, d; + int i; + zsq = 64./(arg*arg); + for(n=0,d=0,i=6;i>=0;i--){ + n = n*zsq + p2[i]; + d = d*zsq + q2[i]; + } + pzero = n/d; + for(n=0,d=0,i=6;i>=0;i--){ + n = n*zsq + p3[i]; + d = d*zsq + q3[i]; + } + qzero = (8./arg)*(n/d); +} diff --git a/linux-0.11-lab/newlibc/soft/jn.c b/linux-0.11-lab/newlibc/soft/jn.c new file mode 100644 index 0000000..d7046a8 --- /dev/null +++ b/linux-0.11-lab/newlibc/soft/jn.c @@ -0,0 +1,101 @@ +#include + +/* + floating point Bessel's function of + the first and second kinds and of + integer order. + + int n; + double x; + jn(n,x); + + returns the value of Jn(x) for all + integer values of n and all real values + of x. + + There are no error returns. + Calls j0, j1. + + For n=0, j0(x) is called, + for n=1, j1(x) is called, + for nx, a continued fraction approximation to + j(n,x)/j(n-1,x) is evaluated and then backward + recursion is used starting from a supposed value + for j(n,x). The resulting value of j(0,x) is + compared with the actual value to correct the + supposed value of j(n,x). + + yn(n,x) is similar in all respects, except + that forward recursion is used for all + values of n>1. +*/ + +double jn(int n, double x) +{ + int i; + double a, b, temp; + double xsq, t; + + if(n<0){ + n = -n; + x = -x; + } + if(n==0) return(j0(x)); + if(n==1) return(j1(x)); + if(x == 0.) return(0.); + if(n>x) goto recurs; + + a = j0(x); + b = j1(x); + for(i=1;in;i--){ + t = xsq/(2.*i - t); + } + t = x/(2.*n-t); + + a = t; + b = 1; + for(i=n-1;i>0;i--){ + temp = b; + b = (2.*i/x)*b - a; + a = temp; + } + return(t*j0(x)/b); +} + +double yn(int n, double x) +{ + int i; + int sign; + double a, b, temp; + + if (x <= 0) { + return(-HUGE_VAL); + } + sign = 1; + if(n<0){ + n = -n; + if(n%2 == 1) sign = -1; + } + if(n==0) return(y0(x)); + if(n==1) return(sign*y1(x)); + + a = y0(x); + b = y1(x); + for(i=1;iexp) + dp->exp += e; + return d; +} + diff --git a/linux-0.11-lab/newlibc/soft/lgamma.c b/linux-0.11-lab/newlibc/soft/lgamma.c new file mode 100644 index 0000000..4ae7978 --- /dev/null +++ b/linux-0.11-lab/newlibc/soft/lgamma.c @@ -0,0 +1,146 @@ +/* + * Copyright (c) 1985 Regents of the University of California. + * All rights reserved. The Berkeley software License Agreement + * specifies the terms and conditions for redistribution. + */ + +#ifndef lint +static char sccsid[] = "@(#)lgamma.c 5.3 (Berkeley) 9/22/88"; +#endif /* not lint */ + +/* + C program for floating point log Gamma function + + lgamma(x) computes the log of the absolute + value of the Gamma function. + The sign of the Gamma function is returned in the + external quantity signgam. + + The coefficients for expansion around zero + are #5243 from Hart & Cheney; for expansion + around infinity they are #5404. + + Calls log, floor and sin. +*/ + +#if 0 +#include "mathimpl.h" +#else +#include +#endif +#if defined(vax)||defined(tahoe) +#include +#endif /* defined(vax)||defined(tahoe) */ + +int signgam = 0; +static const double goobie = 0.9189385332046727417803297; /* log(2*pi)/2 */ +static const double pi = 3.1415926535897932384626434; + +#define M 6 +#define N 8 +static const double p1[] = { + 0.83333333333333101837e-1, + -.277777777735865004e-2, + 0.793650576493454e-3, + -.5951896861197e-3, + 0.83645878922e-3, + -.1633436431e-2, +}; +static const double p2[] = { + -.42353689509744089647e5, + -.20886861789269887364e5, + -.87627102978521489560e4, + -.20085274013072791214e4, + -.43933044406002567613e3, + -.50108693752970953015e2, + -.67449507245925289918e1, + 0.0, +}; +static const double q2[] = { + -.42353689509744090010e5, + -.29803853309256649932e4, + 0.99403074150827709015e4, + -.15286072737795220248e4, + -.49902852662143904834e3, + 0.18949823415702801641e3, + -.23081551524580124562e2, + 0.10000000000000000000e1, +}; + +static double pos(double), neg(double), asym(double); + +double +lgamma(double arg) +{ + + signgam = 1.; + if(arg <= 0.) return(neg(arg)); + if(arg > 8.) return(asym(arg)); + return(log(pos(arg))); +} + +static double +asym(double arg) +{ + double n, argsq; + int i; + + argsq = 1./(arg*arg); + for(n=0,i=M-1; i>=0; i--){ + n = n*argsq + p1[i]; + } + return((arg-.5)*log(arg) - arg + goobie + n/arg); +} + +static double +neg(double arg) +{ + double t; + + arg = -arg; + /* + * to see if arg were a true integer, the old code used the + * mathematically correct observation: + * sin(n*pi) = 0 <=> n is an integer. + * but in finite precision arithmetic, sin(n*PI) will NEVER + * be zero simply because n*PI is a rational number. hence + * it failed to work with our newer, more accurate sin() + * which uses true pi to do the argument reduction... + * temp = sin(pi*arg); + */ + t = floor(arg); + if (arg - t > 0.5e0) + t += 1.e0; /* t := integer nearest arg */ +#if defined(vax)||defined(tahoe) + if (arg == t) { + return(infnan(ERANGE)); /* +INF */ + } +#endif /* defined(vax)||defined(tahoe) */ + signgam = (int) (t - 2*floor(t/2)); /* signgam = 1 if t was odd, */ + /* 0 if t was even */ + signgam = signgam - 1 + signgam; /* signgam = 1 if t was odd, */ + /* -1 if t was even */ + t = arg - t; /* -0.5 <= t <= 0.5 */ + if (t < 0.e0) { + t = -t; + signgam = -signgam; + } + return(-log(arg*pos(arg)*sin(pi*t)/pi)); +} + +static double +pos(double arg) +{ + double n, d, s; + register i; + + if(arg < 2.) return(pos(arg+1.)/arg); + if(arg > 3.) return((arg-1.)*pos(arg-1.)); + + s = arg - 2.; + for(n=0,d=0,i=N-1; i>=0; i--){ + n = n*s + p2[i]; + d = d*s + q2[i]; + } + return(n/d); +} diff --git a/linux-0.11-lab/newlibc/soft/log.c b/linux-0.11-lab/newlibc/soft/log.c new file mode 100644 index 0000000..c30b10e --- /dev/null +++ b/linux-0.11-lab/newlibc/soft/log.c @@ -0,0 +1,53 @@ +#include + +/* + log returns the natural logarithm of its floating + point argument. + + The coefficients are #2705 from Hart & Cheney. (19.38D) + + It calls frexp. +*/ + +static double log2 = 0.693147180559945309e0; +static double ln10 = 2.302585092994045684; +static double sqrto2 = 0.707106781186547524e0; +static double log_p0 = -.240139179559210510e2; +static double log_p1 = 0.309572928215376501e2; +static double log_p2 = -.963769093368686593e1; +static double log_p3 = 0.421087371217979714e0; +static double log_q0 = -.120069589779605255e2; +static double log_q1 = 0.194809660700889731e2; +static double log_q2 = -.891110902798312337e1; + +double log(double arg) +{ + double x,z, zsq, temp; + int exp; + + if(arg <= 0.) { + return(-HUGE_VAL); + } + x = frexp(arg,&exp); + while(x<0.5) { + x = x*2; + exp = exp-1; + } + if(x +#include + +extern double Sqrt(); + +main () +{ + int power; + double f, x1, x2, y, t1, t2; + + for (y = 0; y < 100; y += 0.3435) { + t1 = sqrt (y); + t2 = Sqrt (y); + fprintf (stderr, "%g: %30.20g\t%30.20g\n", y, t2, t1); + } +} diff --git a/linux-0.11-lab/newlibc/soft/modf.c b/linux-0.11-lab/newlibc/soft/modf.c new file mode 100644 index 0000000..d3330f6 --- /dev/null +++ b/linux-0.11-lab/newlibc/soft/modf.c @@ -0,0 +1,54 @@ +#include "soft.h" + +#define shiftleft(dp,n) { /* n = 0 to 32 */ \ + dp->mant1 = ((dp->mant1 << (n)) + (dp->mant2 >> (32-(n)))) \ + & 0x0FFFFF; dp->mant2 <<= (n); dp->exp -= (n); } + + +/* Returns fractional part of d, stores integer part in *integ + */ +double Modf(double d, double *integ) +{ + struct bitdouble *dp = (struct bitdouble *)&d; + struct bitdouble *ip = (struct bitdouble *)integ; + int e = dp->exp - BIAS; + + if (e < 0) { /* no integer part */ + *integ = 0; + return d; + } + + /* compute integer: clear fractional part where necessary + */ + *integ = d; + if (e <= 20) { + ip->mant1 &= (-1L << (20-e)); /* split in mant1... */ + ip->mant2 = 0; + } + else + if (e <= 52) + ip->mant2 &= (-1L << (52-e)); /* split in mant2 */ + else return 0; /* no fractional part */ + + /* compute fractional part: shift left over integer part + */ + if (e) + if (e <= 32) + shiftleft(dp,e) + else { + dp->mant1 = (dp->mant2 << (e-32)) & 0x0FFFFF; + dp->mant2 = 0; + dp->exp -= e; + } + + /* adjust fractional part shifting left... + */ + if (dp->mant1==0 && dp->mant2==0) /* fraction is zero */ + return 0; + + while (!(dp->mant1 & 0x080000)) /* stack to the left */ + shiftleft(dp,1); + + shiftleft(dp,1); /* lose 'invisible bit' */ + return d; +} diff --git a/linux-0.11-lab/newlibc/soft/pow.c b/linux-0.11-lab/newlibc/soft/pow.c new file mode 100644 index 0000000..bd02fbe --- /dev/null +++ b/linux-0.11-lab/newlibc/soft/pow.c @@ -0,0 +1,33 @@ +#include + +/* + computes a^b. + uses log and exp + need error handling +*/ + +double pow(double arg1, double arg2) +{ + double temp; + long l; + + if(arg1 <= 0.) { + if(arg1 == 0.) { + if(arg2 <= 0.) + goto domain; + return(0.); + } + l = arg2; + if(l != arg2) + goto domain; + temp = exp(arg2 * log(-arg1)); + if(l & 1) + temp = -temp; + return(temp); + } + return(exp(arg2 * log(arg1))); + +domain: + errno = EDOM; + return(0.); +} diff --git a/linux-0.11-lab/newlibc/soft/sin.c b/linux-0.11-lab/newlibc/soft/sin.c new file mode 100644 index 0000000..fea3006 --- /dev/null +++ b/linux-0.11-lab/newlibc/soft/sin.c @@ -0,0 +1,67 @@ +#include + +/* + C program for floating point sin/cos. + Calls modf. + There are no error exits. + Coefficients are #3370 from Hart & Cheney (18.80D). +*/ + +static double twoopi = 0.63661977236758134308; +static double cos_p0 = .1357884097877375669092680e8; +static double cos_p1 = -.4942908100902844161158627e7; +static double cos_p2 = .4401030535375266501944918e6; +static double cos_p3 = -.1384727249982452873054457e5; +static double cos_p4 = .1459688406665768722226959e3; +static double cos_q0 = .8644558652922534429915149e7; +static double cos_q1 = .4081792252343299749395779e6; +static double cos_q2 = .9463096101538208180571257e4; +static double cos_q3 = .1326534908786136358911494e3; +static double sinus(double,int); + +double cos(double arg) +{ + if(arg<0) + arg = -arg; + return(sinus(arg, 1)); +} + +double sin(double arg) +{ + return(sinus(arg, 0)); +} + +static double sinus(double arg, int quad) +{ + double e, f; + double ysq; + double x,y; + int k; + double temcos_p1, temcos_p2; + + x = arg; + if(x<0) { + x = -x; + quad = quad + 2; + } + x = x*twoopi; /*underflow?*/ + if(x>32764){ + y = modf(x,&e); + e = e + quad; + modf(0.25*e,&f); + quad = e - 4*f; + }else{ + k = x; + y = x - k; + quad = (quad + k) & 03; + } + if (quad & 01) + y = 1-y; + if(quad > 1) + y = -y; + + ysq = y*y; + temcos_p1 = ((((cos_p4*ysq+cos_p3)*ysq+cos_p2)*ysq+cos_p1)*ysq+cos_p0)*y; + temcos_p2 = ((((ysq+cos_q3)*ysq+cos_q2)*ysq+cos_q1)*ysq+cos_q0); + return(temcos_p1/temcos_p2); +} diff --git a/linux-0.11-lab/newlibc/soft/sinh.c b/linux-0.11-lab/newlibc/soft/sinh.c new file mode 100644 index 0000000..f8ebed9 --- /dev/null +++ b/linux-0.11-lab/newlibc/soft/sinh.c @@ -0,0 +1,65 @@ +#include + +/* + sinh(arg) returns the hyperbolic sine of its floating- + point argument. + + The exponential function is called for arguments + greater in magnitude than 0.5. + + A series is used for arguments smaller in magnitude than 0.5. + The coefficients are #2029 from Hart & Cheney. (20.36D) + + cosh(arg) is computed from the exponential function for + all arguments. +*/ + +static double sinh_p0 = -0.6307673640497716991184787251e+6; +static double sinh_p1 = -0.8991272022039509355398013511e+5; +static double sinh_p2 = -0.2894211355989563807284660366e+4; +static double sinh_p3 = -0.2630563213397497062819489e+2; +static double sinh_q0 = -0.6307673640497716991212077277e+6; +static double sinh_q1 = 0.1521517378790019070696485176e+5; +static double sinh_q2 = -0.173678953558233699533450911e+3; + +double +sinh(arg) +double arg; +{ + double temp, argsq; + register sign; + + sign = 1; + if(arg < 0) { + arg = - arg; + sign = -1; + } + + if(arg > 21.) { + temp = exp(arg)/2; + if (sign>0) + return(temp); + else + return(-temp); + } + + if(arg > 0.5) { + return(sign*(exp(arg) - exp(-arg))/2); + } + + argsq = arg*arg; + temp = (((sinh_p3*argsq+sinh_p2)*argsq+sinh_p1)*argsq+sinh_p0)*arg; + temp /= (((argsq+sinh_q2)*argsq+sinh_q1)*argsq+sinh_q0); + return(sign*temp); +} + +double cosh(double arg) +{ + if(arg < 0) + arg = - arg; + if(arg > 21.) { + return(exp(arg)/2); + } + + return((exp(arg) + exp(-arg))/2); +} diff --git a/linux-0.11-lab/newlibc/soft/soft.h b/linux-0.11-lab/newlibc/soft/soft.h new file mode 100644 index 0000000..850b47a --- /dev/null +++ b/linux-0.11-lab/newlibc/soft/soft.h @@ -0,0 +1,46 @@ +#ifndef __SOFT_H +#define __SOFT_H + +#include +#include + +extern int finite(double); +extern double infnan(int); + +extern double pio2; +extern double *double_inf, *double_minf, *double_NaN; +extern double *double_huge, *double_tiny; +extern float *float_huge, *float_tiny; + +struct bitdouble { /* internal format of an IEEE double */ + unsigned mant2; + unsigned mant1 : 20; + unsigned exp : 11; + unsigned sign : 1; /* 0=pos, 1=neg */ +}; /* value = 2^(exp-BIAS) * 0b1.|mant|mant2 */ + +struct bitfloat { /* format of a float (single-precision IEEE) */ + unsigned mant : 23; + unsigned exp : 8; + unsigned sign : 1; +}; + +#define PI 3.141592653589793238 + +/* note: GNU CC floating-point constants are all treated as 'float's, + * so loss of precision will result accordingly when using constants; + * an eventual atof() should handle full double values, with which + * HUGEDOUBLE may be used. -meg + */ + +#define INFINITE (*double_inf) +#define NEG_INFINITE (*double_minf) +#define NOT_A_NUMBER (*double_NaN) +#define DHUGE (*double_huge) +#define DTINY (*double_tiny) +#define FHUGE (*float_huge) +#define FTINY (*float_tiny) + +#define BIAS 0x3ff /* added to exp of bitdouble */ + +#endif diff --git a/linux-0.11-lab/newlibc/soft/soft.h.old b/linux-0.11-lab/newlibc/soft/soft.h.old new file mode 100644 index 0000000..c2317a4 --- /dev/null +++ b/linux-0.11-lab/newlibc/soft/soft.h.old @@ -0,0 +1,62 @@ +#ifndef __SOFT_H +#define __SOFT_H + +#include +#include + +extern int finite(double); +extern double infnan(int); + +extern double pio2; +extern double *double_inf, *double_minf, *double_NaN; +extern double *double_huge, *double_tiny; +extern float *float_huge, *float_tiny; + +struct bitdouble { /* internal format of an IEEE double */ + unsigned mant2; + unsigned mant1 : 20; + unsigned exp : 11; + unsigned sign : 1; /* 0=pos, 1=neg */ +}; /* value = 2^(exp-BIAS) * 0b1.|mant|mant2 */ + +struct bitfloat { /* format of a float (single-precision IEEE) */ + unsigned mant : 23; + unsigned exp : 8; + unsigned sign : 1; +}; + +/* constants used by infnan() */ +#ifndef EDOM +#define EDOM 33 +#endif +#ifndef ERANGE +#define ERANGE 34 +#endif + +#define PI 3.141592653589793238 +#define HUGE 1.701411733192644270e38 +#define HUGEDOUBLE 3.59538626972463181545861038157804946723595395\ +7884613145468601623154653516110019262654169546448150720422402277597427\ +8671531757953762883324498569486127894824875553578684973097055260443920\ +2492188238906165904170011537676301364684925762947826221081654474326701\ +021369172596479894491876959432609670712659248448274431e308 + +/* note: GNU CC floating-point constants are all treated as 'float's, + * so loss of precision will result accordingly when using constants; + * an eventual atof() should handle full double values, with which + * HUGEDOUBLE may be used. -meg + */ + +#define INFINITE (*double_inf) +#define NEG_INFINITE (*double_minf) +#define NOT_A_NUMBER (*double_NaN) +#define DHUGE (*double_huge) +#define DTINY (*double_tiny) +#define FHUGE (*float_huge) +#define FTINY (*float_tiny) + +#define BIAS 0x3ff /* added to exp of bitdouble */ +#define MAXPREC 310 /* HUGEDOUBLE~=3.59...e308=2^1025 */ +#define MAXDIGITS 20 /* of possibly useful precision in a double */ + +#endif diff --git a/linux-0.11-lab/newlibc/soft/sqrt.c b/linux-0.11-lab/newlibc/soft/sqrt.c new file mode 100644 index 0000000..62c53aa --- /dev/null +++ b/linux-0.11-lab/newlibc/soft/sqrt.c @@ -0,0 +1,51 @@ +#include + +/* + sqrt returns the square root of its floating + point argument. Newton's method. + + calls frexp + need error handling +*/ + +double sqrt(double arg) +{ + double x, temp; + int exp; + int i; + + if(arg <= 0.) { + errno = EDOM; + return(0.); + } + x = frexp(arg,&exp); + while(x < 0.5) { + x *= 2; + exp--; + } + /* + * NOTE + * this wont work on 1's comp + */ + if(exp & 1) { + x *= 2; + exp--; + } + temp = 0.5*(1.0+x); + + while(exp > 60) { + temp *= (1L<<30); + exp -= 60; + } + while(exp < -60) { + temp /= (1L<<30); + exp += 60; + } + if(exp >= 0) + temp *= 1L << (exp/2); + else + temp /= 1L << (-exp/2); + for(i=0; i<=4; i++) + temp = 0.5*(temp + arg/temp); + return(temp); +} diff --git a/linux-0.11-lab/newlibc/soft/tan.c b/linux-0.11-lab/newlibc/soft/tan.c new file mode 100644 index 0000000..50ea62c --- /dev/null +++ b/linux-0.11-lab/newlibc/soft/tan.c @@ -0,0 +1,67 @@ +#include + +/* + floating point tangent + + A series is used after range reduction. + Coefficients are #4285 from Hart & Cheney. (19.74D) +*/ + +static double invpi = 1.27323954473516268; +static double tan_p0 = -0.1306820264754825668269611177e+5; +static double tan_p1 = 0.1055970901714953193602353981e+4; +static double tan_p2 = -0.1550685653483266376941705728e+2; +static double tan_p3 = 0.3422554387241003435328470489e-1; +static double tan_p4 = 0.3386638642677172096076369e-4; +static double tan_q0 = -0.1663895238947119001851464661e+5; +static double tan_q1 = 0.4765751362916483698926655581e+4; +static double tan_q2 = -0.1555033164031709966900124574e+3; + +double tan(double arg) +{ + double sign, temp, e, x, xsq; + int flag, i; + + flag = 0; + sign = 1.; + if(arg < 0.){ + arg = -arg; + sign = -1.; + } + arg = arg*invpi; /*overflow?*/ + x = modf(arg,&e); + i = e; + switch(i%4) { + case 1: + x = 1. - x; + flag = 1; + break; + + case 2: + sign = - sign; + flag = 1; + break; + + case 3: + x = 1. - x; + sign = - sign; + break; + + case 0: + break; + } + + xsq = x*x; + temp = ((((tan_p4*xsq+tan_p3)*xsq+tan_p2)*xsq+tan_p1)*xsq+tan_p0)*x; + temp = temp/(((1.0*xsq+tan_q2)*xsq+tan_q1)*xsq+tan_q0); + + if(flag == 1) { + if(temp == 0.) { + if (sign>0) + return(HUGE_VAL); + return(-HUGE_VAL); + } + temp = 1./temp; + } + return(sign*temp); +} diff --git a/linux-0.11-lab/newlibc/soft/tanh.c b/linux-0.11-lab/newlibc/soft/tanh.c new file mode 100644 index 0000000..37196db --- /dev/null +++ b/linux-0.11-lab/newlibc/soft/tanh.c @@ -0,0 +1,25 @@ +#include + +/* + tanh(arg) computes the hyperbolic tangent of its floating + point argument. + + sinh and cosh are called except for large arguments, which + would cause overflow improperly. +*/ + +double tanh(double arg) +{ + double sign; + + sign = 1.; + if(arg < 0.){ + arg = -arg; + sign = -1.; + } + + if(arg > 21.) + return(sign); + + return(sign*sinh(arg)/cosh(arg)); +} diff --git a/linux-0.11-lab/newlibc/stdio/Makefile b/linux-0.11-lab/newlibc/stdio/Makefile new file mode 100644 index 0000000..1ec2ed7 --- /dev/null +++ b/linux-0.11-lab/newlibc/stdio/Makefile @@ -0,0 +1,51 @@ +# +# Makefile for BSD compatible stdio library functions +# + +LIB =../Libc.a +#AR =gar +#AS =gas +#LD =gld +AR =ar +AS =as +LD =ld +LDFLAGS =-s -x +CC =gcc +INC =-nostdinc -I/../include +CFLAGS =-Wall -O -fstrength-reduce -fomit-frame-pointer \ + $(INC)# -DUSG -DSTDC_HEADERS +CPP =$(CC) -E $(INC) + +.c.s: + $(CC) $(CFLAGS) \ + -S -o $*.s $< +.s.o: + $(CC) -c -o $*.o $< +.c.o: + $(CC) $(CFLAGS) \ + -c -o $*.o $< + +OBJS = clrerr.o doprnt.o doscan.o fdopen.o fgetc.o fgets.o filbuf.o \ + findiop.o flsbuf.o fopen.o fprintf.o fputc.o fputs.o fread.o \ + freopen.o fseek.o ftell.o fwrite.o getchar.o gets.o getw.o \ + printf.o putchar.o puts.o putw.o rew.o scanf.o setbuf.o \ + setbuffe.o sprintf.o ungetc.o vfprintf.o vprintf.o \ + vsprintf.o setvbuf.o + +all: library + +library: $(OBJS) + $(AR) uvc $(LIB) $(OBJS) + sync + +clean: + $(RM) -f core *.o *.a tmp_make + for i in *.c;do $(RM) -f `basename $$i .c`.s;done + +dep: + sed '/\#\#\# Dependencies/q' < Makefile > tmp_make + (for i in *.c;do echo -n `echo $$i | sed 's,\.c,\.s,'`" "; \ + $(CPP) -M $$i;done) >> tmp_make + cp tmp_make Makefile + +### Dependencies: diff --git a/linux-0.11-lab/newlibc/stdio/clrerr.c b/linux-0.11-lab/newlibc/stdio/clrerr.c new file mode 100644 index 0000000..f4ca2eb --- /dev/null +++ b/linux-0.11-lab/newlibc/stdio/clrerr.c @@ -0,0 +1,19 @@ +/* This is file CLRERR.C */ +/* This file may have been modified by DJ Delorie (Jan 1991). If so, +** these modifications are Coyright (C) 1991 DJ Delorie, 24 Kirsten Ave, +** Rochester NH, 03867-2954, USA. +*/ + +#if defined(LIBC_SCCS) && !defined(lint) +static char sccsid[] = "@(#)clrerr.c 5.2 (Berkeley) 3/9/86"; +#endif LIBC_SCCS and not lint + +#include +#undef clearerr + +void +clearerr(iop) + register FILE *iop; +{ + iop->_flag &= ~(_IOERR|_IOEOF); +} diff --git a/linux-0.11-lab/newlibc/stdio/doprnt.c b/linux-0.11-lab/newlibc/stdio/doprnt.c new file mode 100644 index 0000000..7c15d3a --- /dev/null +++ b/linux-0.11-lab/newlibc/stdio/doprnt.c @@ -0,0 +1,717 @@ +/* This is file DOPRNT.C */ +/* This file may have been modified by DJ Delorie (Jan 1991). If so, +** these modifications are Coyright (C) 1991 DJ Delorie, 24 Kirsten Ave, +** Rochester NH, 03867-2954, USA. +*/ + +/* + * Copyright (c) 1988 Regents of the University of California. + * All rights reserved. + * + * Redistribution and use in source and binary forms are permitted provided + * that: (1) source distributions retain this entire copyright notice and + * comment, and (2) distributions including binaries display the following + * acknowledgement: ``This product includes software developed by the + * University of California, Berkeley and its contributors'' in the + * documentation or other materials provided with the distribution and in + * all advertising materials mentioning features or use of this software. + * Neither the name of the University nor the names of its contributors may + * be used to endorse or promote products derived from this software without + * specific prior written permission. + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + */ + +#if defined(LIBC_SCCS) && !defined(lint) +static char sccsid[] = "@(#)doprnt.c 5.39 (Berkeley) 6/28/90"; +#endif /* LIBC_SCCS and not lint */ + +#include +#include +#include +#include +#ifdef linux +#include +#include +#endif + +/* 11-bit exponent (VAX G floating point) is 308 decimal digits */ +#define MAXEXP 308 +/* 128 bit fraction takes up 39 decimal digits; max reasonable precision */ +#define MAXFRACT 39 + +#define DEFPREC 6 + +#define BUF (MAXEXP+MAXFRACT+1) /* + decimal point */ + +#define PUTC(ch) (void) putc(ch, fp) + +#define ARG(basetype) \ + _ulong = flags&LONGINT ? va_arg(argp, long basetype) : \ + flags&SHORTINT ? (short basetype)va_arg(argp, int) : \ + va_arg(argp, int) + +#define todigit(c) ((c) - '0') +#define tochar(n) ((n) + '0') + +/* have to deal with the negative buffer count kludge */ +#define NEGATIVE_COUNT_KLUDGE + +#define LONGINT 0x01 /* long integer */ +#define LONGDBL 0x02 /* long double; unimplemented */ +#define SHORTINT 0x04 /* short integer */ +#define ALT 0x08 /* alternate form */ +#define LADJUST 0x10 /* left adjustment */ +#define ZEROPAD 0x20 /* zero (as opposed to blank) pad */ +#define HEXPREFIX 0x40 /* add 0x or 0X prefix */ + +#ifdef linux +static int cvt(double number, int prec, int flags, char *signp, + u_char fmtch, char *startp, char *endp); + +static char * exponent(register char *p, int exp, u_char fmtch); + +static char * round(double fract, int *exp, char *start, char *end, + char ch, char *signp); +#endif + + +int +_doprnt(const char *fmt0, va_list argp, FILE *fp) +{ + const u_char *fmt; /* format string */ + int ch; /* character from fmt */ + int cnt; /* return value accumulator */ + int n; /* random handy integer */ + char *t; /* buffer pointer */ + double _double; /* double precision arguments %[eEfgG] */ + unsigned long _ulong; /* integer arguments %[diouxX] */ + int base; /* base for [diouxX] conversion */ + int dprec; /* decimal precision in [diouxX] */ + int fieldsz; /* field size expanded by sign, etc */ + int flags; /* flags as above */ + int fpprec; /* `extra' floating precision in [eEfgG] */ + int prec; /* precision from format (%.3d), or -1 */ + int realsz; /* field size expanded by decimal precision */ + int size; /* size of converted field or string */ + int width; /* width from format (%8d), or 0 */ + char sign; /* sign prefix (' ', '+', '-', or \0) */ + char softsign; /* temporary negative sign for floats */ + char *digs; /* digits for [diouxX] conversion */ + char buf[BUF]; /* space for %c, %[diouxX], %[eEfgG] */ + + if (fp->_flag & _IORW) { + fp->_flag |= _IOWRT; + fp->_flag &= ~(_IOEOF|_IOREAD); + } + if ((fp->_flag & _IOWRT) == 0) + return (EOF); + fmt = fmt0; + digs = "0123456789abcdef"; + for (cnt = 0;; ++fmt) { + n = fp->_cnt; + for (t = (char *)fp->_ptr; (ch = *fmt) && ch != '%'; + ++cnt, ++fmt) + if ((--n < 0 +#ifdef NEGATIVE_COUNT_KLUDGE + && (!(fp->_flag & _IOLBF) || -n >= fp->_bufsiz)) +#endif + || (ch == '\n' && (fp->_flag & _IOLBF))) { + fp->_cnt = n; + fp->_ptr = t; + (void) _flsbuf((unsigned int)ch, fp); + n = fp->_cnt; + t = (char *)fp->_ptr; + } else + *t++ = ch; + fp->_cnt = n; + fp->_ptr = t; + if (!ch) + return (cnt); + + flags = 0; dprec = 0; fpprec = 0; width = 0; + prec = -1; + sign = '\0'; + +rflag: switch (*++fmt) { + case ' ': + /* + * ``If the space and + flags both appear, the space + * flag will be ignored.'' + * -- ANSI X3J11 + */ + if (!sign) + sign = ' '; + goto rflag; + case '#': + flags |= ALT; + goto rflag; + case '*': + /* + * ``A negative field width argument is taken as a + * - flag followed by a positive field width.'' + * -- ANSI X3J11 + * They don't exclude field widths read from args. + */ + if ((width = va_arg(argp, int)) >= 0) + goto rflag; + width = -width; + /* FALLTHROUGH */ + case '-': + flags |= LADJUST; + goto rflag; + case '+': + sign = '+'; + goto rflag; + case '.': + if (*++fmt == '*') + n = va_arg(argp, int); + else { + n = 0; + while (isascii(*fmt) && isdigit(*fmt)) + n = 10 * n + todigit(*fmt++); + --fmt; + } + prec = n < 0 ? -1 : n; + goto rflag; + case '0': + /* + * ``Note that 0 is taken as a flag, not as the + * beginning of a field width.'' + * -- ANSI X3J11 + */ + flags |= ZEROPAD; + goto rflag; + case '1': case '2': case '3': case '4': + case '5': case '6': case '7': case '8': case '9': + n = 0; + do { + n = 10 * n + todigit(*fmt); + } while (isascii(*++fmt) && isdigit(*fmt)); + width = n; + --fmt; + goto rflag; + case 'L': + flags |= LONGDBL; + goto rflag; + case 'h': + flags |= SHORTINT; + goto rflag; + case 'l': + flags |= LONGINT; + goto rflag; + case 'c': + *(t = buf) = va_arg(argp, int); + size = 1; + sign = '\0'; + goto pforw; + case 'D': + flags |= LONGINT; + /*FALLTHROUGH*/ + case 'd': + case 'i': + ARG(int); + if ((long)_ulong < 0) { + _ulong = -_ulong; + sign = '-'; + } + base = 10; + goto number; + case 'e': + case 'E': + case 'f': + case 'g': + case 'G': + _double = va_arg(argp, double); + /* + * don't do unrealistic precision; just pad it with + * zeroes later, so buffer size stays rational. + */ + if (prec > MAXFRACT) { + if ((*fmt != 'g' && *fmt != 'G') || (flags&ALT)) + fpprec = prec - MAXFRACT; + prec = MAXFRACT; + } + else if (prec == -1) + prec = DEFPREC; + /* + * softsign avoids negative 0 if _double is < 0 and + * no significant digits will be shown + */ + if (_double < 0) { + softsign = '-'; + _double = -_double; + } + else + softsign = 0; + /* + * cvt may have to round up past the "start" of the + * buffer, i.e. ``intf("%.2f", (double)9.999);''; + * if the first char isn't NULL, it did. + */ +#ifdef linux + *buf = NILL; +#else + *buf = NULL; +#endif + size = cvt(_double, prec, flags, &softsign, + *fmt, buf, buf + sizeof(buf)); + if (softsign) + sign = '-'; + t = *buf ? buf : buf + 1; + goto pforw; + case 'n': + if (flags & LONGINT) + *va_arg(argp, long *) = cnt; + else if (flags & SHORTINT) + *va_arg(argp, short *) = cnt; + else + *va_arg(argp, int *) = cnt; + break; + case 'O': + flags |= LONGINT; + /*FALLTHROUGH*/ + case 'o': + ARG(unsigned); + base = 8; + goto nosign; + case 'p': + /* + * ``The argument shall be a pointer to void. The + * value of the pointer is converted to a sequence + * of printable characters, in an implementation- + * defined manner.'' + * -- ANSI X3J11 + */ + /* NOSTRICT */ + _ulong = (unsigned long)va_arg(argp, void *); + base = 16; + goto nosign; + case 's': + if (!(t = va_arg(argp, char *))) + t = "(null)"; + if (prec >= 0) { + /* + * can't use strlen; can only look for the + * NUL in the first `prec' characters, and + * strlen() will go further. + */ +#ifdef linux + char *p; +#else + char *p, *memchr(); +#endif + + if (p = memchr(t, 0, prec)) { + size = p - t; + if (size > prec) + size = prec; + } else + size = prec; + } else + size = strlen(t); + sign = '\0'; + goto pforw; + case 'U': + flags |= LONGINT; + /*FALLTHROUGH*/ + case 'u': + ARG(unsigned); + base = 10; + goto nosign; + case 'X': + digs = "0123456789ABCDEF"; + /* FALLTHROUGH */ + case 'x': + ARG(unsigned); + base = 16; + /* leading 0x/X only if non-zero */ + if (flags & ALT && _ulong != 0) + flags |= HEXPREFIX; + + /* unsigned conversions */ +nosign: sign = '\0'; + /* + * ``... diouXx conversions ... if a precision is + * specified, the 0 flag will be ignored.'' + * -- ANSI X3J11 + */ +number: if ((dprec = prec) >= 0) + flags &= ~ZEROPAD; + + /* + * ``The result of converting a zero value with an + * explicit precision of zero is no characters.'' + * -- ANSI X3J11 + */ + t = buf + BUF; + if (_ulong != 0 || prec != 0) { + do { + *--t = digs[_ulong % base]; + _ulong /= base; + } while (_ulong); + digs = "0123456789abcdef"; + if (flags & ALT && base == 8 && *t != '0') + *--t = '0'; /* octal leading 0 */ + } + size = buf + BUF - t; + +pforw: + /* + * All reasonable formats wind up here. At this point, + * `t' points to a string which (if not flags&LADJUST) + * should be padded out to `width' places. If + * flags&ZEROPAD, it should first be prefixed by any + * sign or other prefix; otherwise, it should be blank + * padded before the prefix is emitted. After any + * left-hand padding and prefixing, emit zeroes + * required by a decimal [diouxX] precision, then print + * the string proper, then emit zeroes required by any + * leftover floating precision; finally, if LADJUST, + * pad with blanks. + */ + + /* + * compute actual size, so we know how much to pad + * fieldsz excludes decimal prec; realsz includes it + */ + fieldsz = size + fpprec; + if (sign) + fieldsz++; + if (flags & HEXPREFIX) + fieldsz += 2; + realsz = dprec > fieldsz ? dprec : fieldsz; + + /* right-adjusting blank padding */ + if ((flags & (LADJUST|ZEROPAD)) == 0 && width) + for (n = realsz; n < width; n++) + PUTC(' '); + /* prefix */ + if (sign) + PUTC(sign); + if (flags & HEXPREFIX) { + PUTC('0'); + PUTC((char)*fmt); + } + /* right-adjusting zero padding */ + if ((flags & (LADJUST|ZEROPAD)) == ZEROPAD) + for (n = realsz; n < width; n++) + PUTC('0'); + /* leading zeroes from decimal precision */ + for (n = fieldsz; n < dprec; n++) + PUTC('0'); + + /* the string or number proper */ + n = size; + if (fp->_cnt - n >= 0 && (fp->_flag & _IOLBF) == 0) { + fp->_cnt -= n; + bcopy(t, (char *)fp->_ptr, n); + fp->_ptr += n; + } else + while (--n >= 0) + PUTC(*t++); + /* trailing f.p. zeroes */ + while (--fpprec >= 0) + PUTC('0'); + /* left-adjusting padding (always blank) */ + if (flags & LADJUST) + for (n = realsz; n < width; n++) + PUTC(' '); + /* finally, adjust cnt */ + cnt += width > realsz ? width : realsz; + break; + case '\0': /* "%?" prints ?, unless ? is NULL */ + return (cnt); + default: + PUTC((char)*fmt); + cnt++; + } + } + /* NOTREACHED */ +} + +static int +cvt(double number, register int prec, int flags, char *signp, + u_char fmtch, char *startp, char *endp) +{ + register char *p, *t; + register double fract; + int dotrim, expcnt, gformat; + double integer, tmp; +#ifndef linux + double modf(); + char *exponent(), *round(); +#endif + +#ifdef hp300 + if (expcnt = isspecial(number, startp, signp)) + return(expcnt); +#endif + + dotrim = expcnt = gformat = 0; + fract = modf(number, &integer); + + /* get an extra slot for rounding. */ + t = ++startp; + + /* + * get integer portion of number; put into the end of the buffer; the + * .01 is added for modf(356.0 / 10, &integer) returning .59999999... + */ + for (p = endp - 1; integer; ++expcnt) { + tmp = modf(integer / 10, &integer); + *p-- = tochar((int)((tmp + .01) * 10)); + } + switch(fmtch) { + case 'f': + /* reverse integer into beginning of buffer */ + if (expcnt) + for (; ++p < endp; *t++ = *p); + else + *t++ = '0'; + /* + * if precision required or alternate flag set, add in a + * decimal point. + */ + if (prec || flags&ALT) + *t++ = '.'; + /* if requires more precision and some fraction left */ + if (fract) { + if (prec) + do { + fract = modf(fract * 10, &tmp); + *t++ = tochar((int)tmp); + } while (--prec && fract); + if (fract) + startp = round(fract, (int *)NULL, startp, + t - 1, (char)0, signp); + } + for (; prec--; *t++ = '0'); + break; + case 'e': + case 'E': +eformat: if (expcnt) { + *t++ = *++p; + if (prec || flags&ALT) + *t++ = '.'; + /* if requires more precision and some integer left */ + for (; prec && ++p < endp; --prec) + *t++ = *p; + /* + * if done precision and more of the integer component, + * round using it; adjust fract so we don't re-round + * later. + */ + if (!prec && ++p < endp) { + fract = 0; + startp = round((double)0, &expcnt, startp, + t - 1, *p, signp); + } + /* adjust expcnt for digit in front of decimal */ + --expcnt; + } + /* until first fractional digit, decrement exponent */ + else if (fract) { + /* adjust expcnt for digit in front of decimal */ + for (expcnt = -1;; --expcnt) { + fract = modf(fract * 10, &tmp); + if (tmp) + break; + } + *t++ = tochar((int)tmp); + if (prec || flags&ALT) + *t++ = '.'; + } + else { + *t++ = '0'; + if (prec || flags&ALT) + *t++ = '.'; + } + /* if requires more precision and some fraction left */ + if (fract) { + if (prec) + do { + fract = modf(fract * 10, &tmp); + *t++ = tochar((int)tmp); + } while (--prec && fract); + if (fract) + startp = round(fract, &expcnt, startp, + t - 1, (char)0, signp); + } + /* if requires more precision */ + for (; prec--; *t++ = '0'); + + /* unless alternate flag, trim any g/G format trailing 0's */ + if (gformat && !(flags&ALT)) { + while (t > startp && *--t == '0'); + if (*t == '.') + --t; + ++t; + } + t = exponent(t, expcnt, fmtch); + break; + case 'g': + case 'G': + /* a precision of 0 is treated as a precision of 1. */ + if (!prec) + ++prec; + /* + * ``The style used depends on the value converted; style e + * will be used only if the exponent resulting from the + * conversion is less than -4 or greater than the precision.'' + * -- ANSI X3J11 + */ + if (expcnt > prec || (!expcnt && fract && fract < .0001)) { + /* + * g/G format counts "significant digits, not digits of + * precision; for the e/E format, this just causes an + * off-by-one problem, i.e. g/G considers the digit + * before the decimal point significant and e/E doesn't + * count it as precision. + */ + --prec; + fmtch -= 2; /* G->E, g->e */ + gformat = 1; + goto eformat; + } + /* + * reverse integer into beginning of buffer, + * note, decrement precision + */ + if (expcnt) + for (; ++p < endp; *t++ = *p, --prec); + else + *t++ = '0'; + /* + * if precision required or alternate flag set, add in a + * decimal point. If no digits yet, add in leading 0. + */ + if (prec || flags&ALT) { + dotrim = 1; + *t++ = '.'; + } + else + dotrim = 0; + /* if requires more precision and some fraction left */ + if (fract) { + if (prec) { + do { + fract = modf(fract * 10, &tmp); + *t++ = tochar((int)tmp); + } while(!tmp); + while (--prec && fract) { + fract = modf(fract * 10, &tmp); + *t++ = tochar((int)tmp); + } + } + if (fract) + startp = round(fract, (int *)NULL, startp, + t - 1, (char)0, signp); + } + /* alternate format, adds 0's for precision, else trim 0's */ + if (flags&ALT) + for (; prec--; *t++ = '0'); + else if (dotrim) { + while (t > startp && *--t == '0'); + if (*t != '.') + ++t; + } + } + return(t - startp); +} + +static char * +round(double fract, int *exp, register char *start, char *end, + char ch, char *signp) +{ + double tmp; +#ifndef linux + double modf(); +#endif + + if (fract) + (void)modf(fract * 10, &tmp); + else + tmp = todigit(ch); + if (tmp > 4) + for (;; --end) { + if (*end == '.') + --end; + if (++*end <= '9') + break; + *end = '0'; + if (end == start) { + if (exp) { /* e/E; increment exponent */ + *end = '1'; + ++*exp; + } + else { /* f; add extra digit */ + *--end = '1'; + --start; + } + break; + } + } + /* ``"%.3f", (double)-0.0004'' gives you a negative 0. */ + else if (*signp == '-') + for (;; --end) { + if (*end == '.') + --end; + if (*end != '0') + break; + if (end == start) + *signp = 0; + } + return(start); +} + +static char * +exponent(register char *p, register int exp, u_char fmtch) +{ + register char *t; + char expbuf[MAXEXP]; + + *p++ = fmtch; + if (exp < 0) { + exp = -exp; + *p++ = '-'; + } + else + *p++ = '+'; + t = expbuf + MAXEXP; + if (exp > 9) { + do { + *--t = tochar(exp % 10); + } while ((exp /= 10) > 9); + *--t = tochar(exp); + for (; t < expbuf + MAXEXP; *p++ = *t++); + } + else { + *p++ = '0'; + *p++ = tochar(exp); + } + return(p); +} + +#ifdef hp300 +isspecial(d, bufp, signp) + double d; + char *bufp, *signp; +{ + register struct IEEEdp { + unsigned sign:1; + unsigned exp:11; + unsigned manh:20; + unsigned manl:32; + } *ip = (struct IEEEdp *)&d; + + if (ip->exp != 0x7ff) + return(0); + if (ip->manh || ip->manl) + (void)strcpy(bufp, "NaN"); + else + (void)strcpy(bufp, "Inf"); + return(3); +} +#endif diff --git a/linux-0.11-lab/newlibc/stdio/doscan.c b/linux-0.11-lab/newlibc/stdio/doscan.c new file mode 100644 index 0000000..0fa29d9 --- /dev/null +++ b/linux-0.11-lab/newlibc/stdio/doscan.c @@ -0,0 +1,301 @@ +/* This is file DOSCAN.C */ +/* This file may have been modified by DJ Delorie (Jan 1991). If so, +** these modifications are Coyright (C) 1991 DJ Delorie, 24 Kirsten Ave, +** Rochester NH, 03867-2954, USA. +*/ + +#include +#include +#ifdef linux +#include +#endif + +#define SPC 01 +#define STP 02 + +#define SHORT 0 +#define REGULAR 1 +#define LONG 2 +#define INT 0 +#define FLOAT 1 + +#ifdef linux +static char *_getccl(const char *s); +static int _innum(int **ptr, int type, int len, int size, FILE *iop, + int *eofptr); +static int _instr( char *ptr, int type, int len, FILE *iop, + int *eofptr); +#else +static char *_getccl(unsigned char *s); +#endif + +static char _sctab[256] = { + 0,0,0,0,0,0,0,0, + 0,SPC,SPC,0,0,0,0,0, + 0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0, + SPC,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0, + 0,0,0,0,0,0,0,0, +}; + + +int +_doscan(FILE *iop, const char *fmt, void **argp) +{ + register int ch; + int nmatch, len, ch1; + int **ptr, fileended, size; + + nmatch = 0; + fileended = 0; + for (;;) switch (ch = *fmt++) { + case '\0': + return (nmatch); + case '%': + if ((ch = *fmt++) == '%') + goto def; + ptr = (void *)NULL; + if (ch != '*') + ptr = (int **) argp++; + else + ch = *fmt++; + len = 0; + size = REGULAR; + while (isdigit(ch)) { + len = len*10 + ch - '0'; + ch = *fmt++; + } + if (len == 0) + len = 30000; + if (ch=='l') { + size = LONG; + ch = *fmt++; + } else if (ch=='h') { + size = SHORT; + ch = *fmt++; + } else if (ch=='[') + fmt = _getccl(fmt); + if (isupper(ch)) { + ch = tolower(ch); + size = LONG; + } + if (ch == '\0') + return(-1); + if (_innum(ptr, ch, len, size, iop, &fileended) && ptr) + nmatch++; + if (fileended) + return(nmatch? nmatch: -1); + break; + + case ' ': + case '\n': + case '\t': + while ((ch1 = getc(iop))==' ' || ch1=='\t' || ch1=='\n') + ; + if (ch1 != EOF) + ungetc(ch1, iop); + break; + + default: + def: + ch1 = getc(iop); + if (ch1 != ch) { + if (ch1==EOF) + return(-1); + ungetc(ch1, iop); + return(nmatch); + } + } +} + +static int +_innum(int **ptr, int type, int len, int size, FILE *iop, int *eofptr) +{ +#ifndef linux + extern double atof(); +#endif + register char *np; + char numbuf[64]; + register c, base; + int expseen, scale, negflg, c1, ndigit; + long lcval; + + if (type=='c' || type=='s' || type=='[') + return(_instr(ptr? *(char **)ptr: (char *)NULL, type, len, iop, eofptr)); + lcval = 0; + ndigit = 0; + scale = INT; + if (type=='e'||type=='f') + scale = FLOAT; + base = 10; + if (type=='o') + base = 8; + else if (type=='x') + base = 16; + np = numbuf; + expseen = 0; + negflg = 0; + while ((c = getc(iop))==' ' || c=='\t' || c=='\n'); + if (c=='-') { + negflg++; + *np++ = c; + c = getc(iop); + len--; + } else if (c=='+') { + len--; + c = getc(iop); + } + for ( ; --len>=0; *np++ = c, c = getc(iop)) { + if (isdigit(c) + || (base==16 && (('a'<=c && c<='f') || ('A'<=c && c<='F')))) { + ndigit++; + if (base==8) + lcval <<=3; + else if (base==10) + lcval = ((lcval<<2) + lcval)<<1; + else + lcval <<= 4; + c1 = c; + if (isdigit(c)) + c -= '0'; + else if ('a'<=c && c<='f') + c -= 'a'-10; + else + c -= 'A'-10; + lcval += c; + c = c1; + continue; + } else if (c=='.') { + if (base!=10 || scale==INT) + break; + ndigit++; + continue; + } else if ((c=='e'||c=='E') && expseen==0) { + if (base!=10 || scale==INT || ndigit==0) + break; + expseen++; + *np++ = c; + c = getc(iop); + if (c!='+'&&c!='-'&&('0'>c||c>'9')) + break; + } else + break; + } + if (negflg) + lcval = -lcval; + if (c != EOF) { + ungetc(c, iop); + *eofptr = 0; + } else + *eofptr = 1; + if (ptr==NULL || np==numbuf || (negflg && np==numbuf+1) )/* gene dykes*/ + return(0); + *np++ = 0; + switch((scale<<4) | size) { + + case (FLOAT<<4) | SHORT: + case (FLOAT<<4) | REGULAR: + **(float **)ptr = atof(numbuf); + break; + + case (FLOAT<<4) | LONG: + **(double **)ptr = atof(numbuf); + break; + + case (INT<<4) | SHORT: + **(short **)ptr = lcval; + break; + + case (INT<<4) | REGULAR: + **(int **)ptr = lcval; + break; + + case (INT<<4) | LONG: + **(long **)ptr = lcval; + break; + } + return(1); +} + +static int +_instr(char *ptr, int type, int len, FILE *iop, int *eofptr) +{ + register ch; + register char *optr; + int ignstp; + + *eofptr = 0; + optr = ptr; + if (type=='c' && len==30000) + len = 1; + ignstp = 0; + if (type=='s') + ignstp = SPC; + while ((ch = getc(iop)) != EOF && _sctab[ch] & ignstp) + ; + ignstp = SPC; + if (type=='c') + ignstp = 0; + else if (type=='[') + ignstp = STP; + while (ch!=EOF && (_sctab[ch]&ignstp)==0) { + if (ptr) + *ptr++ = ch; + if (--len <= 0) + break; + ch = getc(iop); + } + if (ch != EOF) { + if (len > 0) + ungetc(ch, iop); + *eofptr = 0; + } else + *eofptr = 1; + if (ptr && ptr!=optr) { + if (type!='c') + *ptr++ = '\0'; + return(1); + } + return(0); +} + +static char * +_getccl(register const char *s) +{ + register c, t; + + t = 0; + if (*s == '^') { + t++; + s++; + } + for (c = 0; c < (sizeof (_sctab) / sizeof (_sctab[0])); c++) + if (t) + _sctab[c] &= ~STP; + else + _sctab[c] |= STP; + if ((c = *s) == ']' || c == '-') { /* first char is special */ + if (t) + _sctab[c] |= STP; + else + _sctab[c] &= ~STP; + s++; + } + while ((c = *s++) != ']') { + if (c==0) + return((char *)--s); + else if (c == '-' && *s != ']' && s[-2] < *s) { + for (c = s[-2] + 1; c < *s; c++) + if (t) + _sctab[c] |= STP; + else + _sctab[c] &= ~STP; + } else if (t) + _sctab[c] |= STP; + else + _sctab[c] &= ~STP; + } + return((char *)s); +} diff --git a/linux-0.11-lab/newlibc/stdio/fdopen.c b/linux-0.11-lab/newlibc/stdio/fdopen.c new file mode 100644 index 0000000..c66308a --- /dev/null +++ b/linux-0.11-lab/newlibc/stdio/fdopen.c @@ -0,0 +1,93 @@ +/* This is file FDOPEN.C */ +/* This file may have been modified by DJ Delorie (Jan 1991). If so, +** these modifications are Coyright (C) 1991 DJ Delorie, 24 Kirsten Ave, +** Rochester NH, 03867-2954, USA. +*/ + +/* + * Copyright (c) 1980 Regents of the University of California. + * All rights reserved. The Berkeley software License Agreement + * specifies the terms and conditions for redistribution. + */ + +#if defined(LIBC_SCCS) && !defined(lint) +static char sccsid[] = "@(#)fdopen.c 5.2 (Berkeley) 3/9/86"; +#endif LIBC_SCCS and not lint + +/* + * Unix routine to do an "fopen" on file descriptor + * The mode has to be repeated because you can't query its + * status + */ + +#include +#include +#include + +#ifdef linux +#include +#endif + +extern FILE *_findiop(); + +FILE * +fdopen(int fd, const char *mode) +{ + static int nofile = -1; + register FILE *iop; +#ifndef linux + int new_mode = _fmode; +#endif + + if (nofile < 0) + nofile = getdtablesize(); + + if (fd < 0 || fd >= nofile) + return (NULL); + + iop = _findiop(); + if (iop == NULL) + return (NULL); + + iop->_cnt = 0; + iop->_file = fd; + iop->_bufsiz = 0; + iop->_base = iop->_ptr = NULL; + + switch (*mode) { + case 'r': + iop->_flag = _IOREAD; + break; + case 'a': + lseek(fd, (off_t)0, L_XTND); + /* fall into ... */ + case 'w': + iop->_flag = _IOWRT; + break; + default: + return (NULL); + } + +#ifdef linux + if (mode[1] == '+') + iop->_flag = _IORW; +#else + if (mode[1] == '+') + { + iop->_flag = _IORW; + mode++; + } + if (mode[1] == 't') + { + iop->_flag |= _IOTEXT; + new_mode = O_TEXT; + } + if (mode[1] == 'b') + { + new_mode = O_BINARY; + } + setmode(fd, new_mode); +#endif + + return (iop); +} diff --git a/linux-0.11-lab/newlibc/stdio/fgetc.c b/linux-0.11-lab/newlibc/stdio/fgetc.c new file mode 100644 index 0000000..73ca8e9 --- /dev/null +++ b/linux-0.11-lab/newlibc/stdio/fgetc.c @@ -0,0 +1,18 @@ +/* This is file FGETC.C */ +/* This file may have been modified by DJ Delorie (Jan 1991). If so, +** these modifications are Coyright (C) 1991 DJ Delorie, 24 Kirsten Ave, +** Rochester NH, 03867-2954, USA. +*/ + +#if defined(LIBC_SCCS) && !defined(lint) +static char sccsid[] = "@(#)fgetc.c 5.2 (Berkeley) 3/9/86"; +#endif LIBC_SCCS and not lint + +#include + +int +fgetc(fp) +FILE *fp; +{ + return(getc(fp)); +} diff --git a/linux-0.11-lab/newlibc/stdio/fgets.c b/linux-0.11-lab/newlibc/stdio/fgets.c new file mode 100644 index 0000000..04b7af3 --- /dev/null +++ b/linux-0.11-lab/newlibc/stdio/fgets.c @@ -0,0 +1,29 @@ +/* This is file FGETS.C */ +/* This file may have been modified by DJ Delorie (Jan 1991). If so, +** these modifications are Coyright (C) 1991 DJ Delorie, 24 Kirsten Ave, +** Rochester NH, 03867-2954, USA. +*/ + +#if defined(LIBC_SCCS) && !defined(lint) +static char sccsid[] = "@(#)fgets.c 5.2 (Berkeley) 3/9/86"; +#endif LIBC_SCCS and not lint + +#include + +char * +fgets(char *s, int n, register FILE *iop) +{ + register c; + register char *cs; + + cs = s; + while (--n>0 && (c = getc(iop)) != EOF) { + *cs++ = c; + if (c=='\n') + break; + } + if (c == EOF && cs==s) + return(NULL); + *cs++ = '\0'; + return(s); +} diff --git a/linux-0.11-lab/newlibc/stdio/filbuf.c b/linux-0.11-lab/newlibc/stdio/filbuf.c new file mode 100644 index 0000000..15d7b7f --- /dev/null +++ b/linux-0.11-lab/newlibc/stdio/filbuf.c @@ -0,0 +1,87 @@ +/* This is file FILBUF.C */ +/* This file may have been modified by DJ Delorie (Jan 1991). If so, +** these modifications are Coyright (C) 1991 DJ Delorie, 24 Kirsten Ave, +** Rochester NH, 03867-2954, USA. +*/ + +/* + * Copyright (c) 1980 Regents of the University of California. + * All rights reserved. The Berkeley software License Agreement + * specifies the terms and conditions for redistribution. + */ + +#if defined(LIBC_SCCS) && !defined(lint) +static char sccsid[] = "@(#)filbuf.c 5.3 (Berkeley) 3/9/86"; +#endif LIBC_SCCS and not lint + +#include +#include +#include +#ifdef linux +#include +#include +#endif + +extern char *_smallbuf; + +int +_filbuf(iop) +register FILE *iop; +{ + int size; +#ifndef linux + struct stat stbuf; +#endif + char c; + + if (iop->_flag & _IORW) + iop->_flag |= _IOREAD; + + if ((iop->_flag&_IOREAD) == 0) + return(EOF); + if (iop->_flag&(_IOSTRG|_IOEOF)) + return(EOF); +tryagain: + if (iop->_base==NULL) { + if (iop->_flag&_IONBF) { + iop->_base = _smallbuf ? &_smallbuf[fileno(iop)] : &c; + goto tryagain; + } +#ifdef linux + size = BUFSIZ; +#else + if (fstat(fileno(iop), &stbuf) < 0 || stbuf.st_blksize <= NULL) + size = BUFSIZ; + else + size = stbuf.st_blksize; +#endif + if ((iop->_base = malloc(size)) == NULL) { + iop->_flag |= _IONBF; + goto tryagain; + } + iop->_flag |= _IOMYBUF; + iop->_bufsiz = size; + } + if (iop == stdin) { + if (stdout->_flag&_IOLBF) + fflush(stdout); + if (stderr->_flag&_IOLBF) + fflush(stderr); + } + iop->_cnt = read(fileno(iop), iop->_base, + iop->_flag & _IONBF ? 1 : iop->_bufsiz); + iop->_ptr = iop->_base; + if (iop->_flag & _IONBF && iop->_base == &c) + iop->_base = NULL; + if (--iop->_cnt < 0) { + if (iop->_cnt == -1) { + iop->_flag |= _IOEOF; + if (iop->_flag & _IORW) + iop->_flag &= ~_IOREAD; + } else + iop->_flag |= _IOERR; + iop->_cnt = 0; + return(EOF); + } + return(*iop->_ptr++&0377); +} diff --git a/linux-0.11-lab/newlibc/stdio/findiop.c b/linux-0.11-lab/newlibc/stdio/findiop.c new file mode 100644 index 0000000..6577965 --- /dev/null +++ b/linux-0.11-lab/newlibc/stdio/findiop.c @@ -0,0 +1,148 @@ +/* This is file FINDIOP.C */ +/* This file may have been modified by DJ Delorie (Jan 1991). If so, +** these modifications are Coyright (C) 1991 DJ Delorie, 24 Kirsten Ave, +** Rochester NH, 03867-2954, USA. +*/ + +/* + * Copyright (c) 1983, 1985 Regents of the University of California. + * All rights reserved. The Berkeley software License Agreement + * specifies the terms and conditions for redistribution. + */ + +#if defined(LIBC_SCCS) && !defined(lint) +static char sccsid[] = "@(#)findiop.c 5.7 (Berkeley) 9/22/88"; +#endif LIBC_SCCS and not lint + +#include +#include + +#ifdef linux +#include + +#define NSTATIC OPEN_MAX /* stdin + stdout + stderr + the usual */ + +FILE _iob[NSTATIC] = { + { 0, NULL, NULL, 0, _IOREAD, 0}, /* stdin */ + { 0, NULL, NULL, 0, _IOWRT, 1}, /* stdout */ + { 0, NULL, NULL, 0, _IOWRT|_IONBF, 2}, /* stderr */ +}; + +#else + +extern void *calloc(); + +#define NSTATIC 20 /* stdin + stdout + stderr + the usual */ + +FILE _iob[NSTATIC] = { + { 0, NULL, NULL, 0, _IOREAD|_IOTEXT, 0 }, /* stdin */ + { 0, NULL, NULL, 0, _IOWRT|_IOTEXT, 1 }, /* stdout */ + { 0, NULL, NULL, 0, _IOWRT|_IONBF|_IOTEXT,2 }, /* stderr */ +}; + +#endif + +#define active(iop) ((iop)->_flag & (_IOREAD|_IOWRT|_IORW)) + +extern int errno; + +static int _f_morefiles(); + +static char sbuf[NSTATIC]; +char *_smallbuf = sbuf; +static FILE **iobglue = NULL; +static FILE **endglue = NULL; + +/* + * Find a free FILE for fopen et al. + * We have a fixed static array of entries, and in addition + * may allocate additional entries dynamically, up to the kernel + * limit on the number of open files. + * At first just check for a free slot in the fixed static array. + * If none are available, then we allocate a structure to glue together + * the old and new FILE entries, which are then no longer contiguous. + */ +FILE * +_findiop() +{ + register FILE **iov, *iop; + + if (iobglue == 0) { + for (iop = _iob; iop < _iob + NSTATIC; iop++) + if (!active(iop)) + return (iop); + + if (_f_morefiles() == 0) { + errno = ENOMEM; + return (NULL); + } + } + + iov = iobglue; + while (*iov != NULL && active(*iov)) + if (++iov >= endglue) { + errno = EMFILE; + return (NULL); + } + + if (*iov == NULL) + *iov = (FILE *)calloc(1, sizeof (FILE)); + + return (*iov); +} + +static int +_f_morefiles() +{ + register FILE **iov; + register FILE *fp; + int nfiles; + + nfiles = getdtablesize(); + + iobglue = (FILE **)calloc(nfiles, sizeof (FILE *)); + if (iobglue == NULL) + return (0); + + endglue = iobglue + nfiles; + + for (fp = _iob, iov = iobglue; fp < &_iob[NSTATIC]; /* void */) + *iov++ = fp++; + + _smallbuf = calloc(nfiles, sizeof(*_smallbuf)); + return (1); +} + +#ifndef linux +void +f_prealloc() +{ + register FILE **iov; + + if (iobglue == NULL && _f_morefiles() == 0) + return; + + for (iov = iobglue; iov < endglue; iov++) + if (*iov == NULL) + *iov = (FILE *)calloc(1, sizeof (FILE)); +} +#endif + + +void +_fwalk(function) + register int (*function)(); +{ + register FILE **iov; + register FILE *fp; + + if (iobglue == NULL) { + for (fp = _iob; fp < &_iob[NSTATIC]; fp++) + if (active(fp)) + (*function)(fp); + } else { + for (iov = iobglue; iov < endglue; iov++) + if (*iov && active(*iov)) + (*function)(*iov); + } +} diff --git a/linux-0.11-lab/newlibc/stdio/flsbuf.c b/linux-0.11-lab/newlibc/stdio/flsbuf.c new file mode 100644 index 0000000..82256da --- /dev/null +++ b/linux-0.11-lab/newlibc/stdio/flsbuf.c @@ -0,0 +1,170 @@ +/* This is file FLSBUF.C */ +/* This file may have been modified by DJ Delorie (Jan 1991). If so, +** these modifications are Coyright (C) 1991 DJ Delorie, 24 Kirsten Ave, +** Rochester NH, 03867-2954, USA. +*/ + +/* + * Copyright (c) 1980 Regents of the University of California. + * All rights reserved. The Berkeley software License Agreement + * specifies the terms and conditions for redistribution. + */ + +#if defined(LIBC_SCCS) && !defined(lint) +static char sccsid[] = "@(#)flsbuf.c 5.5 (Berkeley) 6/18/90"; +#endif LIBC_SCCS and not lint + +#include +#include + +#ifdef linux +#include +#include + +extern int isatty (int); +extern void _fwalk(int (*) ()); + +#else +#include +char *malloc(); +#endif + + +int +_flsbuf(unsigned int c, register FILE *iop) +{ + register char *base; + register n, rn; + char c1; + int size; +#ifndef linux + struct stat stbuf; +#endif + + if (iop->_flag & _IORW) { + iop->_flag |= _IOWRT; + iop->_flag &= ~(_IOEOF|_IOREAD); + } + + if ((iop->_flag&_IOWRT)==0) + return(EOF); +tryagain: + if (iop->_flag&_IOLBF) { + base = iop->_base; + *iop->_ptr++ = c; + if ((rn = iop->_ptr - base) >= iop->_bufsiz || c == '\n') { + iop->_ptr = base; + iop->_cnt = 0; + } else { + /* we got here because _cnt is wrong, so fix it */ + iop->_cnt = -rn; + rn = n = 0; + } + } else if (iop->_flag&_IONBF) { + c1 = c; + rn = 1; + base = &c1; + iop->_cnt = 0; + } else { + if ((base=iop->_base)==NULL) { +#ifdef linux + size = BUFSIZ; +#else + if (fstat(fileno(iop), &stbuf) < 0 || + stbuf.st_blksize <= NULL) + size = BUFSIZ; + else + size = stbuf.st_blksize; +#endif + if ((iop->_base=base=malloc(size)) == NULL) { + iop->_flag |= _IONBF; + goto tryagain; + } + iop->_flag |= _IOMYBUF; + iop->_bufsiz = size; + if (iop==stdout && isatty(fileno(stdout))) { + iop->_flag |= _IOLBF; + iop->_ptr = base; + goto tryagain; + } + rn = n = 0; + } else + rn = iop->_ptr - base; + iop->_ptr = base; + iop->_cnt = iop->_bufsiz; + } + while (rn > 0) { + n = write(fileno(iop), base, rn); + if (n <= 0) { + iop->_flag |= _IOERR; + return(EOF); + } + rn -= n; + base += n; + } + if ((iop->_flag&(_IOLBF|_IONBF)) == 0) { + iop->_cnt--; + *iop->_ptr++ = c; + } + return(c); +} + +int +fpurge(register FILE *iop) +{ + iop->_ptr = iop->_base; + iop->_cnt = iop->_flag&(_IOLBF|_IONBF|_IOREAD) ? 0 : iop->_bufsiz; + return(0); +} + +int +fflush(register FILE *iop) +{ + register char *base; + register n, rn; + + if ((iop->_flag&(_IONBF|_IOWRT))==_IOWRT && + (base = iop->_base) != NULL && (rn = n = iop->_ptr - base) > 0) { + iop->_ptr = base; + iop->_cnt = (iop->_flag&(_IOLBF|_IONBF)) ? 0 : iop->_bufsiz; + do { + n = write(fileno(iop), base, rn); + if (n <= 0) { + iop->_flag |= _IOERR; + return(EOF); + } + rn -= n; + base += n; + } while (rn > 0); + } + return(0); +} + +int +fclose(register FILE *iop) +{ + register int r; + + r = EOF; + if (iop->_flag&(_IOREAD|_IOWRT|_IORW) && (iop->_flag&_IOSTRG)==0) { + r = fflush(iop); + if (close(fileno(iop)) < 0) + r = EOF; + if (iop->_flag&_IOMYBUF) + free(iop->_base); + } + iop->_cnt = 0; + iop->_base = (char *)NULL; + iop->_ptr = (char *)NULL; + iop->_bufsiz = 0; + iop->_flag = 0; + iop->_file = 0; + return(r); +} + +void +_cleanup() +{ + + _fwalk(fclose); +} diff --git a/linux-0.11-lab/newlibc/stdio/fopen.c b/linux-0.11-lab/newlibc/stdio/fopen.c new file mode 100644 index 0000000..38e1247 --- /dev/null +++ b/linux-0.11-lab/newlibc/stdio/fopen.c @@ -0,0 +1,92 @@ +/* This is file FOPEN.C */ +/* This file may have been modified by DJ Delorie (Jan 1991). If so, +** these modifications are Coyright (C) 1991 DJ Delorie, 24 Kirsten Ave, +** Rochester NH, 03867-2954, USA. +*/ + +/* + * Copyright (c) 1980 Regents of the University of California. + * All rights reserved. The Berkeley software License Agreement + * specifies the terms and conditions for redistribution. + */ + +#if defined(LIBC_SCCS) && !defined(lint) +static char sccsid[] = "@(#)fopen.c 5.2 (Berkeley) 3/9/86"; +#endif LIBC_SCCS and not lint + +#include +#include +#include + +#ifdef linux +#include +#endif + +extern FILE *_findiop(); + +FILE * +fopen(const char *file, register const char *mode) +{ + register FILE *iop; + register f, rw, oflags; +#ifndef linux + char tbchar; +#endif + + iop = _findiop(); + if (iop == NULL) + return (NULL); + + rw = (mode[1] == '+'); + + switch (*mode) { + case 'a': + oflags = O_CREAT | (rw ? O_RDWR : O_WRONLY); + break; + case 'r': + oflags = rw ? O_RDWR : O_RDONLY; + break; + case 'w': + oflags = O_TRUNC | O_CREAT | (rw ? O_RDWR : O_WRONLY); + break; + default: + return (NULL); + } + +#ifndef linux + if (mode[1] == '+') + tbchar = mode[2]; + else + tbchar = mode[1]; + if (tbchar == 't') + oflags |= O_TEXT; + else if (tbchar == 'b') + oflags |= O_BINARY; + else + oflags |= (_fmode & (O_TEXT|O_BINARY)); +#endif + + f = open(file, oflags, 0666); + if (f < 0) + return (NULL); + + if (*mode == 'a') + lseek(f, (off_t)0, L_XTND); + + iop->_cnt = 0; + iop->_file = f; + iop->_bufsiz = 0; + if (rw) + iop->_flag = _IORW; + else if (*mode == 'r') + iop->_flag = _IOREAD; + else + iop->_flag = _IOWRT; +#ifndef linux + if (oflags & O_TEXT) + iop->_flag |= _IOTEXT; +#endif + + iop->_base = iop->_ptr = NULL; + return (iop); +} diff --git a/linux-0.11-lab/newlibc/stdio/fprintf.c b/linux-0.11-lab/newlibc/stdio/fprintf.c new file mode 100644 index 0000000..2bae850 --- /dev/null +++ b/linux-0.11-lab/newlibc/stdio/fprintf.c @@ -0,0 +1,59 @@ +/* This is file FPRINTF.C */ +/* This file may have been modified by DJ Delorie (Jan 1991). If so, +** these modifications are Coyright (C) 1991 DJ Delorie, 24 Kirsten Ave, +** Rochester NH, 03867-2954, USA. +*/ + +/* + * Copyright (c) 1980 Regents of the University of California. + * All rights reserved. + * + * Redistribution and use in source and binary forms are permitted + * provided that: (1) source distributions retain this entire copyright + * notice and comment, and (2) distributions including binaries display + * the following acknowledgement: ``This product includes software + * developed by the University of California, Berkeley and its contributors'' + * in the documentation or other materials provided with the distribution + * and in all advertising materials mentioning features or use of this + * software. Neither the name of the University nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + */ + +#if defined(LIBC_SCCS) && !defined(lint) +static char sccsid[] = "@(#)fprintf.c 5.5 (Berkeley) 6/1/90"; +#endif /* LIBC_SCCS and not lint */ + +#include +#include + +int +fprintf(register FILE *iop, const char *fmt, ...) +{ + va_list ap; + int len; + char localbuf[BUFSIZ]; + + va_start (ap, fmt); + if (iop->_flag & _IONBF) { + iop->_flag &= ~_IONBF; + iop->_ptr = iop->_base = localbuf; + iop->_bufsiz = BUFSIZ; + len = _doprnt(fmt, ap, iop); + fflush(iop); + iop->_flag |= _IONBF; + iop->_base = NULL; +#ifdef linux + iop->_bufsiz = 0; +#else + iop->_bufsiz = NULL; +#endif + iop->_cnt = 0; + } else + len = _doprnt(fmt, ap, iop); + va_end (ap); + return(ferror(iop) ? EOF : len); +} diff --git a/linux-0.11-lab/newlibc/stdio/fputc.c b/linux-0.11-lab/newlibc/stdio/fputc.c new file mode 100644 index 0000000..7621e0f --- /dev/null +++ b/linux-0.11-lab/newlibc/stdio/fputc.c @@ -0,0 +1,17 @@ +/* This is file FPUTC.C */ +/* This file may have been modified by DJ Delorie (Jan 1991). If so, +** these modifications are Coyright (C) 1991 DJ Delorie, 24 Kirsten Ave, +** Rochester NH, 03867-2954, USA. +*/ + +#if defined(LIBC_SCCS) && !defined(lint) +static char sccsid[] = "@(#)fputc.c 5.2 (Berkeley) 3/9/86"; +#endif LIBC_SCCS and not lint + +#include + +int +fputc(int c, register FILE *fp) +{ + return(putc(c, fp)); +} diff --git a/linux-0.11-lab/newlibc/stdio/fputs.c b/linux-0.11-lab/newlibc/stdio/fputs.c new file mode 100644 index 0000000..e3591d1 --- /dev/null +++ b/linux-0.11-lab/newlibc/stdio/fputs.c @@ -0,0 +1,50 @@ +/* This is file FPUTS.C */ +/* This file may have been modified by DJ Delorie (Jan 1991). If so, +** these modifications are Coyright (C) 1991 DJ Delorie, 24 Kirsten Ave, +** Rochester NH, 03867-2954, USA. +*/ + +/* + * Copyright (c) 1984 Regents of the University of California. + * All rights reserved. The Berkeley software License Agreement + * specifies the terms and conditions for redistribution. + */ + +#if defined(LIBC_SCCS) && !defined(lint) +static char sccsid[] = "@(#)fputs.c 5.2 (Berkeley) 3/9/86"; +#endif LIBC_SCCS and not lint + +#include + +int +fputs(register const char *s, register FILE *iop) +{ + register r = 0; + register c; + int unbuffered; + char localbuf[BUFSIZ]; + + unbuffered = iop->_flag & _IONBF; + if (unbuffered) { + iop->_flag &= ~_IONBF; + iop->_ptr = iop->_base = localbuf; + iop->_bufsiz = BUFSIZ; + } + + while (c = *s++) + r = putc(c, iop); + + if (unbuffered) { + fflush(iop); + iop->_flag |= _IONBF; + iop->_base = NULL; +#ifdef linux + iop->_bufsiz = 0; +#else + iop->_bufsiz = NULL; +#endif + iop->_cnt = 0; + } + + return(r); +} diff --git a/linux-0.11-lab/newlibc/stdio/fread.c b/linux-0.11-lab/newlibc/stdio/fread.c new file mode 100644 index 0000000..eee6f92 --- /dev/null +++ b/linux-0.11-lab/newlibc/stdio/fread.c @@ -0,0 +1,56 @@ +/* This is file FREAD.C */ +/* This file may have been modified by DJ Delorie (Jan 1991). If so, +** these modifications are Coyright (C) 1991 DJ Delorie, 24 Kirsten Ave, +** Rochester NH, 03867-2954, USA. +*/ + +/* + * Copyright (c) 1980 Regents of the University of California. + * All rights reserved. The Berkeley software License Agreement + * specifies the terms and conditions for redistribution. + */ + +#if defined(LIBC_SCCS) && !defined(lint) +static char sccsid[] = "@(#)fread.c 5.2 (Berkeley) 3/9/86"; +#endif LIBC_SCCS and not lint + +#include +#ifdef linux +#include +#endif + +int +fread(ptr, size, count, iop) + register void *ptr; + int size, count; + register FILE *iop; +{ + register int s; + int c; + + s = size * count; + while (s > 0) { + if (iop->_cnt < s) { + if (iop->_cnt > 0) { + bcopy(iop->_ptr, ptr, iop->_cnt); + ptr += iop->_cnt; + s -= iop->_cnt; + } + /* + * filbuf clobbers _cnt & _ptr, + * so don't waste time setting them. + */ + if ((c = _filbuf(iop)) == EOF) + break; + *(char *)ptr++ = c; + s--; + } + if (iop->_cnt >= s) { + bcopy(iop->_ptr, ptr, s); + iop->_ptr += s; + iop->_cnt -= s; + return (count); + } + } + return (size != 0 ? count - ((s + size - 1) / size) : 0); +} diff --git a/linux-0.11-lab/newlibc/stdio/freopen.c b/linux-0.11-lab/newlibc/stdio/freopen.c new file mode 100644 index 0000000..61fc22d --- /dev/null +++ b/linux-0.11-lab/newlibc/stdio/freopen.c @@ -0,0 +1,89 @@ +/* This is file FREOPEN.C */ +/* This file may have been modified by DJ Delorie (Jan 1991). If so, +** these modifications are Coyright (C) 1991 DJ Delorie, 24 Kirsten Ave, +** Rochester NH, 03867-2954, USA. +*/ + +/* + * Copyright (c) 1980 Regents of the University of California. + * All rights reserved. The Berkeley software License Agreement + * specifies the terms and conditions for redistribution. + */ + +#if defined(LIBC_SCCS) && !defined(lint) +static char sccsid[] = "@(#)freopen.c 5.2 (Berkeley) 3/9/86"; +#endif LIBC_SCCS and not lint + +#include +#include +#include + +#ifdef linux +#include +#endif + +FILE * +freopen(const char *file, register const char *mode, + register FILE *iop) +{ + register f, rw, oflags; +#ifndef linux + char tbchar; +#endif + + rw = (mode[1] == '+'); + + fclose(iop); + + switch (*mode) { + case 'a': + oflags = O_CREAT | (rw ? O_RDWR : O_WRONLY); + break; + case 'r': + oflags = rw ? O_RDWR : O_RDONLY; + break; + case 'w': + oflags = O_TRUNC | O_CREAT | (rw ? O_RDWR : O_WRONLY); + break; + default: + return (NULL); + } + +#ifndef linux + if (mode[1] == '+') + tbchar = mode[2]; + else + tbchar = mode[1]; + if (tbchar == 't') + oflags |= O_TEXT; + else if (tbchar == 'b') + oflags |= O_BINARY; + else + oflags |= (_fmode & (O_TEXT|O_BINARY)); +#endif + + f = open(file, oflags, 0666); + if (f < 0) + return (NULL); + + if (*mode == 'a') + lseek(f, (off_t)0, L_XTND); + + iop->_cnt = 0; + iop->_file = f; + iop->_bufsiz = 0; + if (rw) + iop->_flag = _IORW; + else if (*mode == 'r') + iop->_flag = _IOREAD; + else + iop->_flag = _IOWRT; + +#ifndef linux + if (oflags & O_TEXT) + iop->_flag |= _IOTEXT; +#endif + + iop->_base = iop->_ptr = NULL; + return (iop); +} diff --git a/linux-0.11-lab/newlibc/stdio/fseek.c b/linux-0.11-lab/newlibc/stdio/fseek.c new file mode 100644 index 0000000..9f230d6 --- /dev/null +++ b/linux-0.11-lab/newlibc/stdio/fseek.c @@ -0,0 +1,70 @@ +/* This is file FSEEK.C */ +/* This file may have been modified by DJ Delorie (Jan 1991). If so, +** these modifications are Coyright (C) 1991 DJ Delorie, 24 Kirsten Ave, +** Rochester NH, 03867-2954, USA. +*/ + +#if defined(LIBC_SCCS) && !defined(lint) +static char sccsid[] = "@(#)fseek.c 5.3 (Berkeley) 3/9/86"; +#endif LIBC_SCCS and not lint + +/* + * Seek for standard library. Coordinates with buffering. + */ + +#include +#ifdef linux +#include +#endif + +int +fseek(register FILE *iop, long offset, int ptrname) +{ + register resync, c; + long p = -1; /* can't happen? */ + + iop->_flag &= ~_IOEOF; + if (iop->_flag&_IOREAD) { + if (ptrname<2 && iop->_base && + !(iop->_flag&_IONBF)) { + c = iop->_cnt; + p = offset; + if (ptrname==0) { + long curpos = lseek(fileno(iop), 0L, 1); + if (curpos == -1) + return (-1); + p += c - curpos; + } else + offset -= c; + if(!(iop->_flag&_IORW) && c>0&&p<=c + && p>=iop->_base-iop->_ptr){ + iop->_ptr += (int)p; + iop->_cnt -= (int)p; + return(0); + } + resync = offset&01; + } else + resync = 0; + if (iop->_flag & _IORW) { + iop->_ptr = iop->_base; + iop->_flag &= ~_IOREAD; + resync = 0; + } + p = lseek(fileno(iop), offset-resync, ptrname); + iop->_cnt = 0; + if (resync && p != -1) + if (getc(iop) == EOF) + p = -1; + } + else if (iop->_flag & (_IOWRT|_IORW)) { + p = fflush(iop); + if (iop->_flag & _IORW) { + iop->_cnt = 0; + iop->_flag &= ~_IOWRT; + iop->_ptr = iop->_base; + } + return(lseek(fileno(iop), offset, ptrname) == -1 || p == EOF ? + -1 : 0); + } + return(p==-1?-1:0); +} diff --git a/linux-0.11-lab/newlibc/stdio/ftell.c b/linux-0.11-lab/newlibc/stdio/ftell.c new file mode 100644 index 0000000..2aeb68f --- /dev/null +++ b/linux-0.11-lab/newlibc/stdio/ftell.c @@ -0,0 +1,62 @@ +/* This is file FTELL.C */ +/* This file may have been modified by DJ Delorie (Jan 1991). If so, +** these modifications are Coyright (C) 1991 DJ Delorie, 24 Kirsten Ave, +** Rochester NH, 03867-2954, USA. +*/ + +#if defined(LIBC_SCCS) && !defined(lint) +static char sccsid[] = "@(#)ftell.c 5.2 (Berkeley) 3/9/86"; +#endif LIBC_SCCS and not lint + +/* + * Return file offset. + * Coordinates with buffering. + */ + +#include +#ifdef linux +#include +#endif + +long ftell(iop) +register FILE *iop; +{ + register long tres; + register adjust; +#ifndef linux + int idx; +#endif + + if (iop->_cnt < 0) + iop->_cnt = 0; + if (iop->_flag&_IOREAD) + { + adjust = - iop->_cnt; +#ifndef linux + if (iop->_flag & _IOTEXT) /* if a text file */ + for (idx=-adjust-1; idx>=0; idx--) /* for every char in buf */ + if (iop->_ptr[idx] == '\n') /* if it's LF */ + adjust--; /* there was a CR also */ +#endif + } + else if (iop->_flag&(_IOWRT|_IORW)) { + adjust = 0; + if (iop->_flag&_IOWRT && iop->_base && (iop->_flag&_IONBF)==0) + { + adjust = iop->_ptr - iop->_base; +#ifndef linux + if (iop->_flag & _IOTEXT) + for (idx=0; idx_base[idx] == '\n') + adjust++; +#endif + } + } else + return(-1); + + tres = lseek(fileno(iop), 0L, 1); + if (tres<0) + return(tres); + tres += adjust; + return(tres); +} diff --git a/linux-0.11-lab/newlibc/stdio/fwrite.c b/linux-0.11-lab/newlibc/stdio/fwrite.c new file mode 100644 index 0000000..dbce33b --- /dev/null +++ b/linux-0.11-lab/newlibc/stdio/fwrite.c @@ -0,0 +1,60 @@ +/* This is file FWRITE.C */ +/* This file may have been modified by DJ Delorie (Jan 1991). If so, +** these modifications are Coyright (C) 1991 DJ Delorie, 24 Kirsten Ave, +** Rochester NH, 03867-2954, USA. +*/ + +/* + * Copyright (c) 1980 Regents of the University of California. + * All rights reserved. The Berkeley software License Agreement + * specifies the terms and conditions for redistribution. + */ + +#if defined(LIBC_SCCS) && !defined(lint) +static char sccsid[] = "@(#)fwrite.c 5.2 (Berkeley) 3/9/86"; +#endif LIBC_SCCS and not lint + +#include + +#ifdef linux +#include +#endif + +int +fwrite(ptr, size, count, iop) + register const void *ptr; + int size, count; + register FILE *iop; +{ + register int s; + + s = size * count; + if (iop->_flag & _IOLBF) + while (s > 0) { + if (--iop->_cnt > -iop->_bufsiz && *(char *)ptr != '\n') + *iop->_ptr++ = *(char *)ptr++; + else if (_flsbuf(*(unsigned int *)ptr++, iop) == EOF) + break; + s--; + } + else while (s > 0) { + if (iop->_cnt < s) { + if (iop->_cnt > 0) { + bcopy(ptr, iop->_ptr, iop->_cnt); + ptr += iop->_cnt; + iop->_ptr += iop->_cnt; + s -= iop->_cnt; + } + if (_flsbuf(*(unsigned int *)ptr++, iop) == EOF) + break; + s--; + } + if (iop->_cnt >= s) { + bcopy(ptr, iop->_ptr, s); + iop->_ptr += s; + iop->_cnt -= s; + return (count); + } + } + return (size != 0 ? count - ((s + size - 1) / size) : 0); +} diff --git a/linux-0.11-lab/newlibc/stdio/getchar.c b/linux-0.11-lab/newlibc/stdio/getchar.c new file mode 100644 index 0000000..ac960ab --- /dev/null +++ b/linux-0.11-lab/newlibc/stdio/getchar.c @@ -0,0 +1,22 @@ +/* This is file GETCHAR.C */ +/* This file may have been modified by DJ Delorie (Jan 1991). If so, +** these modifications are Coyright (C) 1991 DJ Delorie, 24 Kirsten Ave, +** Rochester NH, 03867-2954, USA. +*/ + +#if defined(LIBC_SCCS) && !defined(lint) +static char sccsid[] = "@(#)getchar.c 5.2 (Berkeley) 3/9/86"; +#endif LIBC_SCCS and not lint + +/* + * A subroutine version of the macro getchar. + */ +#include + +#undef getchar + +int +getchar() +{ + return(getc(stdin)); +} diff --git a/linux-0.11-lab/newlibc/stdio/gets.c b/linux-0.11-lab/newlibc/stdio/gets.c new file mode 100644 index 0000000..e6045c1 --- /dev/null +++ b/linux-0.11-lab/newlibc/stdio/gets.c @@ -0,0 +1,27 @@ +/* This is file GETS.C */ +/* This file may have been modified by DJ Delorie (Jan 1991). If so, +** these modifications are Coyright (C) 1991 DJ Delorie, 24 Kirsten Ave, +** Rochester NH, 03867-2954, USA. +*/ + +#if defined(LIBC_SCCS) && !defined(lint) +static char sccsid[] = "@(#)gets.c 5.2 (Berkeley) 3/9/86"; +#endif LIBC_SCCS and not lint + +#include + +char * +gets(s) +char *s; +{ + register c; + register char *cs; + + cs = s; + while ((c = getchar()) != '\n' && c != EOF) + *cs++ = c; + if (c == EOF && cs==s) + return(NULL); + *cs++ = '\0'; + return(s); +} diff --git a/linux-0.11-lab/newlibc/stdio/getw.c b/linux-0.11-lab/newlibc/stdio/getw.c new file mode 100644 index 0000000..8bc4370 --- /dev/null +++ b/linux-0.11-lab/newlibc/stdio/getw.c @@ -0,0 +1,27 @@ +/* This is file GETW.C */ +/* This file may have been modified by DJ Delorie (Jan 1991). If so, +** these modifications are Coyright (C) 1991 DJ Delorie, 24 Kirsten Ave, +** Rochester NH, 03867-2954, USA. +*/ + +#if defined(LIBC_SCCS) && !defined(lint) +static char sccsid[] = "@(#)getw.c 5.2 (Berkeley) 3/9/86"; +#endif LIBC_SCCS and not lint + +#include + +int +getw(iop) +register FILE *iop; +{ + register i; + register char *p; + int w; + + p = (char *)&w; + for (i=sizeof(int); --i>=0;) + *p++ = getc(iop); + if (feof(iop)) + return(EOF); + return(w); +} diff --git a/linux-0.11-lab/newlibc/stdio/printf.c b/linux-0.11-lab/newlibc/stdio/printf.c new file mode 100644 index 0000000..fdbe1c9 --- /dev/null +++ b/linux-0.11-lab/newlibc/stdio/printf.c @@ -0,0 +1,43 @@ +/* This is file PRINTF.C */ +/* This file may have been modified by DJ Delorie (Jan 1991). If so, +** these modifications are Coyright (C) 1991 DJ Delorie, 24 Kirsten Ave, +** Rochester NH, 03867-2954, USA. +*/ + +/* + * Copyright (c) 1987 Regents of the University of California. + * All rights reserved. + * + * Redistribution and use in source and binary forms are permitted + * provided that: (1) source distributions retain this entire copyright + * notice and comment, and (2) distributions including binaries display + * the following acknowledgement: ``This product includes software + * developed by the University of California, Berkeley and its contributors'' + * in the documentation or other materials provided with the distribution + * and in all advertising materials mentioning features or use of this + * software. Neither the name of the University nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + */ + +#if defined(LIBC_SCCS) && !defined(lint) +static char sccsid[] = "@(#)printf.c 5.5 (Berkeley) 6/1/90"; +#endif /* LIBC_SCCS and not lint */ + +#include +#include + +int +printf(const char *fmt, ...) +{ + va_list ap; + int len; + + va_start (ap, fmt); + len = _doprnt(fmt, ap, stdout); + va_end (ap); + return(ferror(stdout) ? EOF : len); +} diff --git a/linux-0.11-lab/newlibc/stdio/putchar.c b/linux-0.11-lab/newlibc/stdio/putchar.c new file mode 100644 index 0000000..ed49a5c --- /dev/null +++ b/linux-0.11-lab/newlibc/stdio/putchar.c @@ -0,0 +1,23 @@ +/* This is file PUTCHAR.C */ +/* This file may have been modified by DJ Delorie (Jan 1991). If so, +** these modifications are Coyright (C) 1991 DJ Delorie, 24 Kirsten Ave, +** Rochester NH, 03867-2954, USA. +*/ + +#if defined(LIBC_SCCS) && !defined(lint) +static char sccsid[] = "@(#)putchar.c 5.2 (Berkeley) 3/9/86"; +#endif LIBC_SCCS and not lint + +/* + * A subroutine version of the macro putchar + */ +#include + +#undef putchar + +int +putchar(c) +register c; +{ + return (putc(c, stdout)); +} diff --git a/linux-0.11-lab/newlibc/stdio/puts.c b/linux-0.11-lab/newlibc/stdio/puts.c new file mode 100644 index 0000000..3fbf0fb --- /dev/null +++ b/linux-0.11-lab/newlibc/stdio/puts.c @@ -0,0 +1,22 @@ +/* This is file PUTS.C */ +/* This file may have been modified by DJ Delorie (Jan 1991). If so, +** these modifications are Coyright (C) 1991 DJ Delorie, 24 Kirsten Ave, +** Rochester NH, 03867-2954, USA. +*/ + +#if defined(LIBC_SCCS) && !defined(lint) +static char sccsid[] = "@(#)puts.c 5.2 (Berkeley) 3/9/86"; +#endif LIBC_SCCS and not lint + +#include + +int +puts(s) +register const char *s; +{ + register c; + + while (c = *s++) + putchar(c); + return(putchar('\n')); +} diff --git a/linux-0.11-lab/newlibc/stdio/putw.c b/linux-0.11-lab/newlibc/stdio/putw.c new file mode 100644 index 0000000..bddd227 --- /dev/null +++ b/linux-0.11-lab/newlibc/stdio/putw.c @@ -0,0 +1,23 @@ +/* This is file PUTW.C */ +/* This file may have been modified by DJ Delorie (Jan 1991). If so, +** these modifications are Coyright (C) 1991 DJ Delorie, 24 Kirsten Ave, +** Rochester NH, 03867-2954, USA. +*/ + +#if defined(LIBC_SCCS) && !defined(lint) +static char sccsid[] = "@(#)putw.c 5.2 (Berkeley) 3/9/86"; +#endif LIBC_SCCS and not lint + +#include + +int +putw(int w, register FILE *iop) +{ + register char *p; + register i; + + p = (char *)&w; + for (i=sizeof(int); --i>=0;) + putc(*p++, iop); + return(ferror(iop)); +} diff --git a/linux-0.11-lab/newlibc/stdio/rew.c b/linux-0.11-lab/newlibc/stdio/rew.c new file mode 100644 index 0000000..11c375e --- /dev/null +++ b/linux-0.11-lab/newlibc/stdio/rew.c @@ -0,0 +1,47 @@ +/* This is file REW.C */ +/* This file may have been modified by DJ Delorie (Jan 1991). If so, +** these modifications are Coyright (C) 1991 DJ Delorie, 24 Kirsten Ave, +** Rochester NH, 03867-2954, USA. +*/ + +/* + * Copyright (c) 1987 Regents of the University of California. + * All rights reserved. + * + * Redistribution and use in source and binary forms are permitted + * provided that: (1) source distributions retain this entire copyright + * notice and comment, and (2) distributions including binaries display + * the following acknowledgement: ``This product includes software + * developed by the University of California, Berkeley and its contributors'' + * in the documentation or other materials provided with the distribution + * and in all advertising materials mentioning features or use of this + * software. Neither the name of the University nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + */ + +#if defined(LIBC_SCCS) && !defined(lint) +static char sccsid[] = "@(#)rew.c 5.5 (Berkeley) 6/1/90"; +#endif /* LIBC_SCCS and not lint */ + +#include +#include +#include + +void +rewind(iop) + register FILE *iop; +{ + off_t lseek(); + + (void)fflush(iop); + (void)lseek(fileno(iop), 0L, L_SET); + iop->_cnt = 0; + iop->_ptr = iop->_base; + iop->_flag &= ~(_IOERR|_IOEOF); + if (iop->_flag & _IORW) + iop->_flag &= ~(_IOREAD|_IOWRT); +} diff --git a/linux-0.11-lab/newlibc/stdio/scanf.c b/linux-0.11-lab/newlibc/stdio/scanf.c new file mode 100644 index 0000000..cbc9a1f --- /dev/null +++ b/linux-0.11-lab/newlibc/stdio/scanf.c @@ -0,0 +1,56 @@ +/* This is file SCANF.C */ +/* This file may have been modified by DJ Delorie (Jan 1991). If so, +** these modifications are Coyright (C) 1991 DJ Delorie, 24 Kirsten Ave, +** Rochester NH, 03867-2954, USA. +*/ + +#if defined(LIBC_SCCS) && !defined(lint) +static char sccsid[] = "@(#)scanf.c 5.2 (Berkeley) 3/9/86"; +#endif LIBC_SCCS and not lint + +#include +#include + +int +scanf(const char *fmt, ...) +{ + va_list ap; + int ret; + + va_start (ap, fmt); + ret = _doscan(stdin, fmt, (void **) ap); + va_end (ap); + return(ret); +} + +int +fscanf(FILE *iop, const char *fmt, ...) +{ + va_list ap; + int ret; + + va_start (ap, fmt); + ret = _doscan(iop, fmt, (void **) ap); + va_end (ap); + return(ret); +} + +int +sscanf(char *str, const char *fmt, ...) +{ + va_list ap; + int ret; + FILE _strbuf; + + _strbuf._flag = _IOREAD|_IOSTRG; + _strbuf._ptr = _strbuf._base = str; + _strbuf._cnt = 0; + while (*str++) + _strbuf._cnt++; + _strbuf._bufsiz = _strbuf._cnt; + + va_start (ap, fmt); + ret = _doscan(&_strbuf, fmt, (void **) ap); + va_end (ap); + return(ret); +} diff --git a/linux-0.11-lab/newlibc/stdio/setbuf.c b/linux-0.11-lab/newlibc/stdio/setbuf.c new file mode 100644 index 0000000..8aafded --- /dev/null +++ b/linux-0.11-lab/newlibc/stdio/setbuf.c @@ -0,0 +1,42 @@ +/* This is file SETBUF.C */ +/* This file may have been modified by DJ Delorie (Jan 1991). If so, +** these modifications are Coyright (C) 1991 DJ Delorie, 24 Kirsten Ave, +** Rochester NH, 03867-2954, USA. +*/ + +/* + * Copyright (c) 1980 Regents of the University of California. + * All rights reserved. The Berkeley software License Agreement + * specifies the terms and conditions for redistribution. + */ + +#if defined(LIBC_SCCS) && !defined(lint) +static char sccsid[] = "@(#)setbuf.c 5.2 (Berkeley) 3/9/86"; +#endif LIBC_SCCS and not lint + +#include +#ifdef linux +#include +#endif + +void +setbuf(iop, buf) +register FILE *iop; +char *buf; +{ + if (iop->_base != NULL && iop->_flag&_IOMYBUF) + free(iop->_base); + iop->_flag &= ~(_IOMYBUF|_IONBF|_IOLBF); + if ((iop->_base = buf) == NULL) { + iop->_flag |= _IONBF; +#ifdef linux + iop->_bufsiz = 0; +#else + iop->_bufsiz = NULL; +#endif + } else { + iop->_ptr = iop->_base; + iop->_bufsiz = BUFSIZ; + } + iop->_cnt = 0; +} diff --git a/linux-0.11-lab/newlibc/stdio/setbuffe.c b/linux-0.11-lab/newlibc/stdio/setbuffe.c new file mode 100644 index 0000000..8c68010 --- /dev/null +++ b/linux-0.11-lab/newlibc/stdio/setbuffe.c @@ -0,0 +1,62 @@ +/* This is file SETBUFFE.C */ +/* This file may have been modified by DJ Delorie (Jan 1991). If so, +** these modifications are Coyright (C) 1991 DJ Delorie, 24 Kirsten Ave, +** Rochester NH, 03867-2954, USA. +*/ + +/* + * Copyright (c) 1983 Regents of the University of California. + * All rights reserved. The Berkeley software License Agreement + * specifies the terms and conditions for redistribution. + */ + +#if defined(LIBC_SCCS) && !defined(lint) +static char sccsid[] = "@(#)setbuffer.c 5.2 (Berkeley) 3/9/86"; +#endif LIBC_SCCS and not lint + +#include + +#ifdef linux +#include +#endif + +void +setbuffer(iop, buf, size) + register FILE *iop; + char *buf; + int size; +{ + if (iop->_base != NULL && iop->_flag&_IOMYBUF) + free(iop->_base); + iop->_flag &= ~(_IOMYBUF|_IONBF|_IOLBF); + if ((iop->_base = buf) == NULL) { + iop->_flag |= _IONBF; +#ifdef linux + iop->_bufsiz = 0; +#else + iop->_bufsiz = NULL; +#endif + } else { + iop->_ptr = iop->_base; + iop->_bufsiz = size; + } + iop->_cnt = 0; +} + +/* + * set line buffering for either stdout or stderr + */ +void +setlinebuf(iop) + register FILE *iop; +{ + char *buf; + + fflush(iop); + setbuffer(iop, NULL, 0); + buf = (char *) malloc(BUFSIZ); + if (buf != NULL) { + setbuffer(iop, buf, BUFSIZ); + iop->_flag |= _IOLBF|_IOMYBUF; + } +} diff --git a/linux-0.11-lab/newlibc/stdio/setvbuf.c b/linux-0.11-lab/newlibc/stdio/setvbuf.c new file mode 100644 index 0000000..f56207c --- /dev/null +++ b/linux-0.11-lab/newlibc/stdio/setvbuf.c @@ -0,0 +1,54 @@ +/* This is file SETVBUF.C */ +/* +** Copyright (C) 1991 DJ Delorie, 24 Kirsten Ave, Rochester NH 03867-2954 +** +** This file is distributed under the terms listed in the document +** "copying.dj", available from DJ Delorie at the address above. +** A copy of "copying.dj" should accompany this file; if not, a copy +** should be available from where this file was obtained. This file +** may not be distributed without a verbatim copy of "copying.dj". +** +** This file is distributed WITHOUT ANY WARRANTY; without even the implied +** warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +*/ + +#include + +#ifdef linux +#include +#endif + +int setvbuf(FILE *f, char *buf, int type, int len) +{ + int mine=0; + if (!f) + return -1; + fflush(f); + switch (type) + { + case _IOFBF: + case _IOLBF: + if (len <= 0) + return -1; + if (buf == 0) + { + buf = (char *)malloc(len); + if (buf == 0) + return -1; + mine = 1; + } + setbuffer(f, NULL, 0); + f->_flag &= ~_IONBF; + f->_flag |= type; + if (mine) + f->_flag |= _IOMYBUF; + f->_base = buf; + f->_bufsiz = len; + return 0; + case _IONBF: + setbuffer(f, NULL, 0); + return 0; + default: + return -1; + } +} diff --git a/linux-0.11-lab/newlibc/stdio/sprintf.c b/linux-0.11-lab/newlibc/stdio/sprintf.c new file mode 100644 index 0000000..850b3fc --- /dev/null +++ b/linux-0.11-lab/newlibc/stdio/sprintf.c @@ -0,0 +1,48 @@ +/* This is file SPRINTF.C */ +/* This file may have been modified by DJ Delorie (Jan 1991). If so, +** these modifications are Coyright (C) 1991 DJ Delorie, 24 Kirsten Ave, +** Rochester NH, 03867-2954, USA. +*/ + +/* + * Copyright (c) 1987 Regents of the University of California. + * All rights reserved. + * + * Redistribution and use in source and binary forms are permitted + * provided that: (1) source distributions retain this entire copyright + * notice and comment, and (2) distributions including binaries display + * the following acknowledgement: ``This product includes software + * developed by the University of California, Berkeley and its contributors'' + * in the documentation or other materials provided with the distribution + * and in all advertising materials mentioning features or use of this + * software. Neither the name of the University nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + */ + +#if defined(LIBC_SCCS) && !defined(lint) +static char sccsid[] = "@(#)sprintf.c 5.6 (Berkeley) 6/1/90"; +#endif /* LIBC_SCCS and not lint */ + +#include +#include + +int +sprintf(char *str, const char *fmt, ...) +{ + va_list ap; + FILE _strbuf; + int len; + + va_start (ap, fmt); + _strbuf._flag = _IOWRT+_IOSTRG; + _strbuf._ptr = str; + _strbuf._cnt = 32767; + len = _doprnt(fmt, ap, &_strbuf); + *_strbuf._ptr = 0; + va_end (ap); + return(len); +} diff --git a/linux-0.11-lab/newlibc/stdio/ungetc.c b/linux-0.11-lab/newlibc/stdio/ungetc.c new file mode 100644 index 0000000..ee4ca6a --- /dev/null +++ b/linux-0.11-lab/newlibc/stdio/ungetc.c @@ -0,0 +1,30 @@ +/* This is file UNGETC.C */ +/* This file may have been modified by DJ Delorie (Jan 1991). If so, +** these modifications are Coyright (C) 1991 DJ Delorie, 24 Kirsten Ave, +** Rochester NH, 03867-2954, USA. +*/ + +#if defined(LIBC_SCCS) && !defined(lint) +static char sccsid[] = "@(#)ungetc.c 5.3 (Berkeley) 3/26/86"; +#endif LIBC_SCCS and not lint + +#include + +int +ungetc(int c, register FILE *iop) +{ + if (c == EOF || (iop->_flag & (_IOREAD|_IORW)) == 0 || + iop->_ptr == NULL || iop->_base == NULL) + return (EOF); + + if (iop->_ptr == iop->_base) + if (iop->_cnt == 0) + iop->_ptr++; + else + return (EOF); + + iop->_cnt++; + *--iop->_ptr = c; + + return (c); +} diff --git a/linux-0.11-lab/newlibc/stdio/vfprintf.c b/linux-0.11-lab/newlibc/stdio/vfprintf.c new file mode 100644 index 0000000..8e85a39 --- /dev/null +++ b/linux-0.11-lab/newlibc/stdio/vfprintf.c @@ -0,0 +1,55 @@ +/* This is file VFPRINTF.C */ +/* This file may have been modified by DJ Delorie (Jan 1991). If so, +** these modifications are Coyright (C) 1991 DJ Delorie, 24 Kirsten Ave, +** Rochester NH, 03867-2954, USA. +*/ + +/* + * Copyright (c) 1988 Regents of the University of California. + * All rights reserved. + * + * Redistribution and use in source and binary forms are permitted provided + * that: (1) source distributions retain this entire copyright notice and + * comment, and (2) distributions including binaries display the following + * acknowledgement: ``This product includes software developed by the + * University of California, Berkeley and its contributors'' in the + * documentation or other materials provided with the distribution and in + * all advertising materials mentioning features or use of this software. + * Neither the name of the University nor the names of its contributors may + * be used to endorse or promote products derived from this software without + * specific prior written permission. + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR IMPLIED + * WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED WARRANTIES OF + * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + */ + +#if defined(LIBC_SCCS) && !defined(lint) +static char sccsid[] = "@(#)vfprintf.c 5.4 (Berkeley) 6/30/90"; +#endif /* LIBC_SCCS and not lint */ + +#include +#include + +int +vfprintf(FILE *iop, const char *fmt, ...) +{ + va_list ap; + int len; + char localbuf[BUFSIZ]; + + va_start (ap, fmt); + if (iop->_flag & _IONBF) { + iop->_flag &= ~_IONBF; + iop->_ptr = iop->_base = localbuf; + iop->_bufsiz = BUFSIZ; + len = _doprnt(fmt, ap, iop); + (void)fflush(iop); + iop->_flag |= _IONBF; + iop->_base = NULL; + iop->_bufsiz = 0; + iop->_cnt = 0; + } else + len = _doprnt(fmt, ap, iop); + va_start (ap, fmt); + return (ferror(iop) ? EOF : len); +} diff --git a/linux-0.11-lab/newlibc/stdio/vprintf.c b/linux-0.11-lab/newlibc/stdio/vprintf.c new file mode 100644 index 0000000..e639d43 --- /dev/null +++ b/linux-0.11-lab/newlibc/stdio/vprintf.c @@ -0,0 +1,43 @@ +/* This is file VPRINTF.C */ +/* This file may have been modified by DJ Delorie (Jan 1991). If so, +** these modifications are Coyright (C) 1991 DJ Delorie, 24 Kirsten Ave, +** Rochester NH, 03867-2954, USA. +*/ + +/* + * Copyright (c) 1988 Regents of the University of California. + * All rights reserved. + * + * Redistribution and use in source and binary forms are permitted + * provided that: (1) source distributions retain this entire copyright + * notice and comment, and (2) distributions including binaries display + * the following acknowledgement: ``This product includes software + * developed by the University of California, Berkeley and its contributors'' + * in the documentation or other materials provided with the distribution + * and in all advertising materials mentioning features or use of this + * software. Neither the name of the University nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + */ + +#if defined(LIBC_SCCS) && !defined(lint) +static char sccsid[] = "@(#)vprintf.c 5.3 (Berkeley) 6/1/90"; +#endif /* LIBC_SCCS and not lint */ + +#include +#include + +int +vprintf(const char *fmt, ...) +{ + va_list ap; + int len; + + va_start (ap, fmt); + len = _doprnt(fmt, ap, stdout); + va_end (ap); + return (ferror(stdout) ? EOF : len); +} diff --git a/linux-0.11-lab/newlibc/stdio/vsprintf.c b/linux-0.11-lab/newlibc/stdio/vsprintf.c new file mode 100644 index 0000000..2f33b7e --- /dev/null +++ b/linux-0.11-lab/newlibc/stdio/vsprintf.c @@ -0,0 +1,48 @@ +/* This is file VSPRINTF.C */ +/* This file may have been modified by DJ Delorie (Jan 1991). If so, +** these modifications are Coyright (C) 1991 DJ Delorie, 24 Kirsten Ave, +** Rochester NH, 03867-2954, USA. +*/ + +/* + * Copyright (c) 1988 Regents of the University of California. + * All rights reserved. + * + * Redistribution and use in source and binary forms are permitted + * provided that: (1) source distributions retain this entire copyright + * notice and comment, and (2) distributions including binaries display + * the following acknowledgement: ``This product includes software + * developed by the University of California, Berkeley and its contributors'' + * in the documentation or other materials provided with the distribution + * and in all advertising materials mentioning features or use of this + * software. Neither the name of the University nor the names of its + * contributors may be used to endorse or promote products derived + * from this software without specific prior written permission. + * THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR + * IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. + */ + +#if defined(LIBC_SCCS) && !defined(lint) +static char sccsid[] = "@(#)vsprintf.c 5.3 (Berkeley) 6/1/90"; +#endif /* LIBC_SCCS and not lint */ + +#include +#include + +int +vsprintf(char *str, const char *fmt, ...) +{ + va_list ap; + FILE f; + int len; + + va_start (ap, fmt); + f._flag = _IOWRT+_IOSTRG; + f._ptr = str; + f._cnt = 32767; + len = _doprnt(fmt, ap, &f); + *f._ptr = 0; + va_end (ap); + return (len); +} diff --git a/linux-0.11-lab/newlibc/termcap/COPYING b/linux-0.11-lab/newlibc/termcap/COPYING new file mode 100644 index 0000000..a43ea21 --- /dev/null +++ b/linux-0.11-lab/newlibc/termcap/COPYING @@ -0,0 +1,339 @@ + GNU GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1989, 1991 Free Software Foundation, Inc. + 675 Mass Ave, Cambridge, MA 02139, USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +License is intended to guarantee your freedom to share and change free +software--to make sure the software is free for all its users. This +General Public License applies to most of the Free Software +Foundation's software and to any other program whose authors commit to +using it. (Some other Free Software Foundation software is covered by +the GNU Library General Public License instead.) You can apply it to +your programs, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if you +distribute copies of the software, or if you modify it. + + For example, if you distribute copies of such a program, whether +gratis or for a fee, you must give the recipients all the rights that +you have. You must make sure that they, too, receive or can get the +source code. And you must show them these terms so they know their +rights. + + We protect your rights with two steps: (1) copyright the software, and +(2) offer you this license which gives you legal permission to copy, +distribute and/or modify the software. + + Also, for each author's protection and ours, we want to make certain +that everyone understands that there is no warranty for this free +software. If the software is modified by someone else and passed on, we +want its recipients to know that what they have is not the original, so +that any problems introduced by others will not reflect on the original +authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that redistributors of a free +program will individually obtain patent licenses, in effect making the +program proprietary. To prevent this, we have made it clear that any +patent must be licensed for everyone's free use or not licensed at all. + + The precise terms and conditions for copying, distribution and +modification follow. + + GNU GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License applies to any program or other work which contains +a notice placed by the copyright holder saying it may be distributed +under the terms of this General Public License. The "Program", below, +refers to any such program or work, and a "work based on the Program" +means either the Program or any derivative work under copyright law: +that is to say, a work containing the Program or a portion of it, +either verbatim or with modifications and/or translated into another +language. (Hereinafter, translation is included without limitation in +the term "modification".) Each licensee is addressed as "you". + +Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running the Program is not restricted, and the output from the Program +is covered only if its contents constitute a work based on the +Program (independent of having been made by running the Program). +Whether that is true depends on what the Program does. + + 1. You may copy and distribute verbatim copies of the Program's +source code as you receive it, in any medium, provided that you +conspicuously and appropriately publish on each copy an appropriate +copyright notice and disclaimer of warranty; keep intact all the +notices that refer to this License and to the absence of any warranty; +and give any other recipients of the Program a copy of this License +along with the Program. + +You may charge a fee for the physical act of transferring a copy, and +you may at your option offer warranty protection in exchange for a fee. + + 2. You may modify your copy or copies of the Program or any portion +of it, thus forming a work based on the Program, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) You must cause the modified files to carry prominent notices + stating that you changed the files and the date of any change. + + b) You must cause any work that you distribute or publish, that in + whole or in part contains or is derived from the Program or any + part thereof, to be licensed as a whole at no charge to all third + parties under the terms of this License. + + c) If the modified program normally reads commands interactively + when run, you must cause it, when started running for such + interactive use in the most ordinary way, to print or display an + announcement including an appropriate copyright notice and a + notice that there is no warranty (or else, saying that you provide + a warranty) and that users may redistribute the program under + these conditions, and telling the user how to view a copy of this + License. (Exception: if the Program itself is interactive but + does not normally print such an announcement, your work based on + the Program is not required to print an announcement.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Program, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Program, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Program. + +In addition, mere aggregation of another work not based on the Program +with the Program (or with a work based on the Program) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may copy and distribute the Program (or a work based on it, +under Section 2) in object code or executable form under the terms of +Sections 1 and 2 above provided that you also do one of the following: + + a) Accompany it with the complete corresponding machine-readable + source code, which must be distributed under the terms of Sections + 1 and 2 above on a medium customarily used for software interchange; or, + + b) Accompany it with a written offer, valid for at least three + years, to give any third party, for a charge no more than your + cost of physically performing source distribution, a complete + machine-readable copy of the corresponding source code, to be + distributed under the terms of Sections 1 and 2 above on a medium + customarily used for software interchange; or, + + c) Accompany it with the information you received as to the offer + to distribute corresponding source code. (This alternative is + allowed only for noncommercial distribution and only if you + received the program in object code or executable form with such + an offer, in accord with Subsection b above.) + +The source code for a work means the preferred form of the work for +making modifications to it. For an executable work, complete source +code means all the source code for all modules it contains, plus any +associated interface definition files, plus the scripts used to +control compilation and installation of the executable. However, as a +special exception, the source code distributed need not include +anything that is normally distributed (in either source or binary +form) with the major components (compiler, kernel, and so on) of the +operating system on which the executable runs, unless that component +itself accompanies the executable. + +If distribution of executable or object code is made by offering +access to copy from a designated place, then offering equivalent +access to copy the source code from the same place counts as +distribution of the source code, even though third parties are not +compelled to copy the source along with the object code. + + 4. You may not copy, modify, sublicense, or distribute the Program +except as expressly provided under this License. Any attempt +otherwise to copy, modify, sublicense or distribute the Program is +void, and will automatically terminate your rights under this License. +However, parties who have received copies, or rights, from you under +this License will not have their licenses terminated so long as such +parties remain in full compliance. + + 5. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Program or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Program (or any work based on the +Program), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Program or works based on it. + + 6. Each time you redistribute the Program (or any work based on the +Program), the recipient automatically receives a license from the +original licensor to copy, distribute or modify the Program subject to +these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 7. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Program at all. For example, if a patent +license would not permit royalty-free redistribution of the Program by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Program. + +If any portion of this section is held invalid or unenforceable under +any particular circumstance, the balance of the section is intended to +apply and the section as a whole is intended to apply in other +circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system, which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 8. If the distribution and/or use of the Program is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Program under this License +may add an explicit geographical distribution limitation excluding +those countries, so that distribution is permitted only in or among +countries not thus excluded. In such case, this License incorporates +the limitation as if written in the body of this License. + + 9. The Free Software Foundation may publish revised and/or new versions +of the General Public License from time to time. Such new versions will +be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + +Each version is given a distinguishing version number. If the Program +specifies a version number of this License which applies to it and "any +later version", you have the option of following the terms and conditions +either of that version or of any later version published by the Free +Software Foundation. If the Program does not specify a version number of +this License, you may choose any version ever published by the Free Software +Foundation. + + 10. If you wish to incorporate parts of the Program into other free +programs whose distribution conditions are different, write to the author +to ask for permission. For software which is copyrighted by the Free +Software Foundation, write to the Free Software Foundation; we sometimes +make exceptions for this. Our decision will be guided by the two goals +of preserving the free status of all derivatives of our free software and +of promoting the sharing and reuse of software generally. + + NO WARRANTY + + 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY +FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN +OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES +PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED +OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS +TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE +PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, +REPAIR OR CORRECTION. + + 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR +REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, +INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING +OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED +TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY +YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER +PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE +POSSIBILITY OF SUCH DAMAGES. + + END OF TERMS AND CONDITIONS + + Appendix: How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) 19yy + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + +Also add information on how to contact you by electronic and paper mail. + +If the program is interactive, make it output a short notice like this +when it starts in an interactive mode: + + Gnomovision version 69, Copyright (C) 19yy name of author + Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. + This is free software, and you are welcome to redistribute it + under certain conditions; type `show c' for details. + +The hypothetical commands `show w' and `show c' should show the appropriate +parts of the General Public License. Of course, the commands you use may +be called something other than `show w' and `show c'; they could even be +mouse-clicks or menu items--whatever suits your program. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the program, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the program + `Gnomovision' (which makes passes at compilers) written by James Hacker. + + , 1 April 1989 + Ty Coon, President of Vice + +This General Public License does not permit incorporating your program into +proprietary programs. If your program is a subroutine library, you may +consider it more useful to permit linking proprietary applications with the +library. If this is what you want to do, use the GNU Library General +Public License instead of this License. diff --git a/linux-0.11-lab/newlibc/termcap/COPYING.LIB b/linux-0.11-lab/newlibc/termcap/COPYING.LIB new file mode 100644 index 0000000..eb685a5 --- /dev/null +++ b/linux-0.11-lab/newlibc/termcap/COPYING.LIB @@ -0,0 +1,481 @@ + GNU LIBRARY GENERAL PUBLIC LICENSE + Version 2, June 1991 + + Copyright (C) 1991 Free Software Foundation, Inc. + 675 Mass Ave, Cambridge, MA 02139, USA + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + +[This is the first released version of the library GPL. It is + numbered 2 because it goes with version 2 of the ordinary GPL.] + + Preamble + + The licenses for most software are designed to take away your +freedom to share and change it. By contrast, the GNU General Public +Licenses are intended to guarantee your freedom to share and change +free software--to make sure the software is free for all its users. + + This license, the Library General Public License, applies to some +specially designated Free Software Foundation software, and to any +other libraries whose authors decide to use it. You can use it for +your libraries, too. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +this service if you wish), that you receive source code or can get it +if you want it, that you can change the software or use pieces of it +in new free programs; and that you know you can do these things. + + To protect your rights, we need to make restrictions that forbid +anyone to deny you these rights or to ask you to surrender the rights. +These restrictions translate to certain responsibilities for you if +you distribute copies of the library, or if you modify it. + + For example, if you distribute copies of the library, whether gratis +or for a fee, you must give the recipients all the rights that we gave +you. You must make sure that they, too, receive or can get the source +code. If you link a program with the library, you must provide +complete object files to the recipients so that they can relink them +with the library, after making changes to the library and recompiling +it. And you must show them these terms so they know their rights. + + Our method of protecting your rights has two steps: (1) copyright +the library, and (2) offer you this license which gives you legal +permission to copy, distribute and/or modify the library. + + Also, for each distributor's protection, we want to make certain +that everyone understands that there is no warranty for this free +library. If the library is modified by someone else and passed on, we +want its recipients to know that what they have is not the original +version, so that any problems introduced by others will not reflect on +the original authors' reputations. + + Finally, any free program is threatened constantly by software +patents. We wish to avoid the danger that companies distributing free +software will individually obtain patent licenses, thus in effect +transforming the program into proprietary software. To prevent this, +we have made it clear that any patent must be licensed for everyone's +free use or not licensed at all. + + Most GNU software, including some libraries, is covered by the ordinary +GNU General Public License, which was designed for utility programs. This +license, the GNU Library General Public License, applies to certain +designated libraries. This license is quite different from the ordinary +one; be sure to read it in full, and don't assume that anything in it is +the same as in the ordinary license. + + The reason we have a separate public license for some libraries is that +they blur the distinction we usually make between modifying or adding to a +program and simply using it. Linking a program with a library, without +changing the library, is in some sense simply using the library, and is +analogous to running a utility program or application program. However, in +a textual and legal sense, the linked executable is a combined work, a +derivative of the original library, and the ordinary General Public License +treats it as such. + + Because of this blurred distinction, using the ordinary General +Public License for libraries did not effectively promote software +sharing, because most developers did not use the libraries. We +concluded that weaker conditions might promote sharing better. + + However, unrestricted linking of non-free programs would deprive the +users of those programs of all benefit from the free status of the +libraries themselves. This Library General Public License is intended to +permit developers of non-free programs to use free libraries, while +preserving your freedom as a user of such programs to change the free +libraries that are incorporated in them. (We have not seen how to achieve +this as regards changes in header files, but we have achieved it as regards +changes in the actual functions of the Library.) The hope is that this +will lead to faster development of free libraries. + + The precise terms and conditions for copying, distribution and +modification follow. Pay close attention to the difference between a +"work based on the library" and a "work that uses the library". The +former contains code derived from the library, while the latter only +works together with the library. + + Note that it is possible for a library to be covered by the ordinary +General Public License rather than by this special one. + + GNU LIBRARY GENERAL PUBLIC LICENSE + TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION + + 0. This License Agreement applies to any software library which +contains a notice placed by the copyright holder or other authorized +party saying it may be distributed under the terms of this Library +General Public License (also called "this License"). Each licensee is +addressed as "you". + + A "library" means a collection of software functions and/or data +prepared so as to be conveniently linked with application programs +(which use some of those functions and data) to form executables. + + The "Library", below, refers to any such software library or work +which has been distributed under these terms. A "work based on the +Library" means either the Library or any derivative work under +copyright law: that is to say, a work containing the Library or a +portion of it, either verbatim or with modifications and/or translated +straightforwardly into another language. (Hereinafter, translation is +included without limitation in the term "modification".) + + "Source code" for a work means the preferred form of the work for +making modifications to it. For a library, complete source code means +all the source code for all modules it contains, plus any associated +interface definition files, plus the scripts used to control compilation +and installation of the library. + + Activities other than copying, distribution and modification are not +covered by this License; they are outside its scope. The act of +running a program using the Library is not restricted, and output from +such a program is covered only if its contents constitute a work based +on the Library (independent of the use of the Library in a tool for +writing it). Whether that is true depends on what the Library does +and what the program that uses the Library does. + + 1. You may copy and distribute verbatim copies of the Library's +complete source code as you receive it, in any medium, provided that +you conspicuously and appropriately publish on each copy an +appropriate copyright notice and disclaimer of warranty; keep intact +all the notices that refer to this License and to the absence of any +warranty; and distribute a copy of this License along with the +Library. + + You may charge a fee for the physical act of transferring a copy, +and you may at your option offer warranty protection in exchange for a +fee. + + 2. You may modify your copy or copies of the Library or any portion +of it, thus forming a work based on the Library, and copy and +distribute such modifications or work under the terms of Section 1 +above, provided that you also meet all of these conditions: + + a) The modified work must itself be a software library. + + b) You must cause the files modified to carry prominent notices + stating that you changed the files and the date of any change. + + c) You must cause the whole of the work to be licensed at no + charge to all third parties under the terms of this License. + + d) If a facility in the modified Library refers to a function or a + table of data to be supplied by an application program that uses + the facility, other than as an argument passed when the facility + is invoked, then you must make a good faith effort to ensure that, + in the event an application does not supply such function or + table, the facility still operates, and performs whatever part of + its purpose remains meaningful. + + (For example, a function in a library to compute square roots has + a purpose that is entirely well-defined independent of the + application. Therefore, Subsection 2d requires that any + application-supplied function or table used by this function must + be optional: if the application does not supply it, the square + root function must still compute square roots.) + +These requirements apply to the modified work as a whole. If +identifiable sections of that work are not derived from the Library, +and can be reasonably considered independent and separate works in +themselves, then this License, and its terms, do not apply to those +sections when you distribute them as separate works. But when you +distribute the same sections as part of a whole which is a work based +on the Library, the distribution of the whole must be on the terms of +this License, whose permissions for other licensees extend to the +entire whole, and thus to each and every part regardless of who wrote +it. + +Thus, it is not the intent of this section to claim rights or contest +your rights to work written entirely by you; rather, the intent is to +exercise the right to control the distribution of derivative or +collective works based on the Library. + +In addition, mere aggregation of another work not based on the Library +with the Library (or with a work based on the Library) on a volume of +a storage or distribution medium does not bring the other work under +the scope of this License. + + 3. You may opt to apply the terms of the ordinary GNU General Public +License instead of this License to a given copy of the Library. To do +this, you must alter all the notices that refer to this License, so +that they refer to the ordinary GNU General Public License, version 2, +instead of to this License. (If a newer version than version 2 of the +ordinary GNU General Public License has appeared, then you can specify +that version instead if you wish.) Do not make any other change in +these notices. + + Once this change is made in a given copy, it is irreversible for +that copy, so the ordinary GNU General Public License applies to all +subsequent copies and derivative works made from that copy. + + This option is useful when you wish to copy part of the code of +the Library into a program that is not a library. + + 4. You may copy and distribute the Library (or a portion or +derivative of it, under Section 2) in object code or executable form +under the terms of Sections 1 and 2 above provided that you accompany +it with the complete corresponding machine-readable source code, which +must be distributed under the terms of Sections 1 and 2 above on a +medium customarily used for software interchange. + + If distribution of object code is made by offering access to copy +from a designated place, then offering equivalent access to copy the +source code from the same place satisfies the requirement to +distribute the source code, even though third parties are not +compelled to copy the source along with the object code. + + 5. A program that contains no derivative of any portion of the +Library, but is designed to work with the Library by being compiled or +linked with it, is called a "work that uses the Library". Such a +work, in isolation, is not a derivative work of the Library, and +therefore falls outside the scope of this License. + + However, linking a "work that uses the Library" with the Library +creates an executable that is a derivative of the Library (because it +contains portions of the Library), rather than a "work that uses the +library". The executable is therefore covered by this License. +Section 6 states terms for distribution of such executables. + + When a "work that uses the Library" uses material from a header file +that is part of the Library, the object code for the work may be a +derivative work of the Library even though the source code is not. +Whether this is true is especially significant if the work can be +linked without the Library, or if the work is itself a library. The +threshold for this to be true is not precisely defined by law. + + If such an object file uses only numerical parameters, data +structure layouts and accessors, and small macros and small inline +functions (ten lines or less in length), then the use of the object +file is unrestricted, regardless of whether it is legally a derivative +work. (Executables containing this object code plus portions of the +Library will still fall under Section 6.) + + Otherwise, if the work is a derivative of the Library, you may +distribute the object code for the work under the terms of Section 6. +Any executables containing that work also fall under Section 6, +whether or not they are linked directly with the Library itself. + + 6. As an exception to the Sections above, you may also compile or +link a "work that uses the Library" with the Library to produce a +work containing portions of the Library, and distribute that work +under terms of your choice, provided that the terms permit +modification of the work for the customer's own use and reverse +engineering for debugging such modifications. + + You must give prominent notice with each copy of the work that the +Library is used in it and that the Library and its use are covered by +this License. You must supply a copy of this License. If the work +during execution displays copyright notices, you must include the +copyright notice for the Library among them, as well as a reference +directing the user to the copy of this License. Also, you must do one +of these things: + + a) Accompany the work with the complete corresponding + machine-readable source code for the Library including whatever + changes were used in the work (which must be distributed under + Sections 1 and 2 above); and, if the work is an executable linked + with the Library, with the complete machine-readable "work that + uses the Library", as object code and/or source code, so that the + user can modify the Library and then relink to produce a modified + executable containing the modified Library. (It is understood + that the user who changes the contents of definitions files in the + Library will not necessarily be able to recompile the application + to use the modified definitions.) + + b) Accompany the work with a written offer, valid for at + least three years, to give the same user the materials + specified in Subsection 6a, above, for a charge no more + than the cost of performing this distribution. + + c) If distribution of the work is made by offering access to copy + from a designated place, offer equivalent access to copy the above + specified materials from the same place. + + d) Verify that the user has already received a copy of these + materials or that you have already sent this user a copy. + + For an executable, the required form of the "work that uses the +Library" must include any data and utility programs needed for +reproducing the executable from it. However, as a special exception, +the source code distributed need not include anything that is normally +distributed (in either source or binary form) with the major +components (compiler, kernel, and so on) of the operating system on +which the executable runs, unless that component itself accompanies +the executable. + + It may happen that this requirement contradicts the license +restrictions of other proprietary libraries that do not normally +accompany the operating system. Such a contradiction means you cannot +use both them and the Library together in an executable that you +distribute. + + 7. You may place library facilities that are a work based on the +Library side-by-side in a single library together with other library +facilities not covered by this License, and distribute such a combined +library, provided that the separate distribution of the work based on +the Library and of the other library facilities is otherwise +permitted, and provided that you do these two things: + + a) Accompany the combined library with a copy of the same work + based on the Library, uncombined with any other library + facilities. This must be distributed under the terms of the + Sections above. + + b) Give prominent notice with the combined library of the fact + that part of it is a work based on the Library, and explaining + where to find the accompanying uncombined form of the same work. + + 8. You may not copy, modify, sublicense, link with, or distribute +the Library except as expressly provided under this License. Any +attempt otherwise to copy, modify, sublicense, link with, or +distribute the Library is void, and will automatically terminate your +rights under this License. However, parties who have received copies, +or rights, from you under this License will not have their licenses +terminated so long as such parties remain in full compliance. + + 9. You are not required to accept this License, since you have not +signed it. However, nothing else grants you permission to modify or +distribute the Library or its derivative works. These actions are +prohibited by law if you do not accept this License. Therefore, by +modifying or distributing the Library (or any work based on the +Library), you indicate your acceptance of this License to do so, and +all its terms and conditions for copying, distributing or modifying +the Library or works based on it. + + 10. Each time you redistribute the Library (or any work based on the +Library), the recipient automatically receives a license from the +original licensor to copy, distribute, link with or modify the Library +subject to these terms and conditions. You may not impose any further +restrictions on the recipients' exercise of the rights granted herein. +You are not responsible for enforcing compliance by third parties to +this License. + + 11. If, as a consequence of a court judgment or allegation of patent +infringement or for any other reason (not limited to patent issues), +conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot +distribute so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you +may not distribute the Library at all. For example, if a patent +license would not permit royalty-free redistribution of the Library by +all those who receive copies directly or indirectly through you, then +the only way you could satisfy both it and this License would be to +refrain entirely from distribution of the Library. + +If any portion of this section is held invalid or unenforceable under any +particular circumstance, the balance of the section is intended to apply, +and the section as a whole is intended to apply in other circumstances. + +It is not the purpose of this section to induce you to infringe any +patents or other property right claims or to contest validity of any +such claims; this section has the sole purpose of protecting the +integrity of the free software distribution system which is +implemented by public license practices. Many people have made +generous contributions to the wide range of software distributed +through that system in reliance on consistent application of that +system; it is up to the author/donor to decide if he or she is willing +to distribute software through any other system and a licensee cannot +impose that choice. + +This section is intended to make thoroughly clear what is believed to +be a consequence of the rest of this License. + + 12. If the distribution and/or use of the Library is restricted in +certain countries either by patents or by copyrighted interfaces, the +original copyright holder who places the Library under this License may add +an explicit geographical distribution limitation excluding those countries, +so that distribution is permitted only in or among countries not thus +excluded. In such case, this License incorporates the limitation as if +written in the body of this License. + + 13. The Free Software Foundation may publish revised and/or new +versions of the Library General Public License from time to time. +Such new versions will be similar in spirit to the present version, +but may differ in detail to address new problems or concerns. + +Each version is given a distinguishing version number. If the Library +specifies a version number of this License which applies to it and +"any later version", you have the option of following the terms and +conditions either of that version or of any later version published by +the Free Software Foundation. If the Library does not specify a +license version number, you may choose any version ever published by +the Free Software Foundation. + + 14. If you wish to incorporate parts of the Library into other free +programs whose distribution conditions are incompatible with these, +write to the author to ask for permission. For software which is +copyrighted by the Free Software Foundation, write to the Free +Software Foundation; we sometimes make exceptions for this. Our +decision will be guided by the two goals of preserving the free status +of all derivatives of our free software and of promoting the sharing +and reuse of software generally. + + NO WARRANTY + + 15. BECAUSE THE LIBRARY IS LICENSED FREE OF CHARGE, THERE IS NO +WARRANTY FOR THE LIBRARY, TO THE EXTENT PERMITTED BY APPLICABLE LAW. +EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR +OTHER PARTIES PROVIDE THE LIBRARY "AS IS" WITHOUT WARRANTY OF ANY +KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE +IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE +LIBRARY IS WITH YOU. SHOULD THE LIBRARY PROVE DEFECTIVE, YOU ASSUME +THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN +WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY +AND/OR REDISTRIBUTE THE LIBRARY AS PERMITTED ABOVE, BE LIABLE TO YOU +FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR +CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE +LIBRARY (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING +RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A +FAILURE OF THE LIBRARY TO OPERATE WITH ANY OTHER SOFTWARE), EVEN IF +SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH +DAMAGES. + + END OF TERMS AND CONDITIONS + + Appendix: How to Apply These Terms to Your New Libraries + + If you develop a new library, and you want it to be of the greatest +possible use to the public, we recommend making it free software that +everyone can redistribute and change. You can do so by permitting +redistribution under these terms (or, alternatively, under the terms of the +ordinary General Public License). + + To apply these terms, attach the following notices to the library. It is +safest to attach them to the start of each source file to most effectively +convey the exclusion of warranty; and each file should have at least the +"copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This library is free software; you can redistribute it and/or + modify it under the terms of the GNU Library General Public + License as published by the Free Software Foundation; either + version 2 of the License, or (at your option) any later version. + + This library is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + Library General Public License for more details. + + You should have received a copy of the GNU Library General Public + License along with this library; if not, write to the Free + Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + +Also add information on how to contact you by electronic and paper mail. + +You should also get your employer (if you work as a programmer) or your +school, if any, to sign a "copyright disclaimer" for the library, if +necessary. Here is a sample; alter the names: + + Yoyodyne, Inc., hereby disclaims all copyright interest in the + library `Frob' (a library for tweaking knobs) written by James Random Hacker. + + , 1 April 1990 + Ty Coon, President of Vice + +That's all there is to it! diff --git a/linux-0.11-lab/newlibc/termcap/ChangeLog b/linux-0.11-lab/newlibc/termcap/ChangeLog new file mode 100644 index 0000000..f28d9e9 --- /dev/null +++ b/linux-0.11-lab/newlibc/termcap/ChangeLog @@ -0,0 +1,26 @@ +Thu Jul 11 22:23:01 1991 David J. MacKenzie (djm at nutrimat) + + * Version 1.0. + +Wed Jul 10 03:10:20 1991 David J. MacKenzie (djm at wookumz.gnu.ai.mit.edu) + + * Replace Makefile with configure and Makefile.in. + + * Update to GPL 2. + +Sat Aug 11 00:33:39 1990 David J. MacKenzie (djm at albert.ai.mit.edu) + + * tput.c (main): Don't strip leading path from argv[0]. + Remove -V +version option. + Rename a few things. + +Sun Dec 3 18:48:36 1989 David J. MacKenzie (djm at hobbes.ai.mit.edu) + + * tput.c, tput.texinfo: Merge short and long option usage + messages. + +Local Variables: +mode: indented-text +left-margin: 8 +version-control: never +End: diff --git a/linux-0.11-lab/newlibc/termcap/Makefile.in b/linux-0.11-lab/newlibc/termcap/Makefile.in new file mode 100644 index 0000000..1354a62 --- /dev/null +++ b/linux-0.11-lab/newlibc/termcap/Makefile.in @@ -0,0 +1,80 @@ +# Makefile for GNU tput +# Copyright (C) 1989-1991 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + +SHELL = /bin/sh + +#### Start of system configuration section. #### + +CC = @CC@ +INSTALL = @INSTALL@ + +# Things you might add to DEFS: +# -DSTDC_HEADERS If you have ANSI C headers and libraries. +# -DUSG If you have System V/ANSI C string and +# memory functions and headers. +# -DSIGTYPE=int If your signal handlers return int, not void. + +DEFS = @DEFS@ + +CFLAGS = -I. -g $(DEFS) +LDFLAGS = -g +LIBS = @LIBS@ + +# Where to install the executable. +bindir = /usr/local/gnubin + +#### End of system configuration section. #### + +SRCS = tput.c conversions.c getopt.c getopt1.c termcap.c tparam.c bsearch.c +OBJS = tput.o conversions.o getopt.o getopt1.o termcap.o tparam.o @LIBOBJS@ +DISTFILES = COPYING COPYING.LIB ChangeLog Makefile.in configure README \ +tput.texinfo tput.h getopt.h termcap.h $(SRCS) +VERSION = 1.0 + +all: tput +.PHONY: all + +tput: $(OBJS) + $(CC) -o $@ $(LDFLAGS) $(OBJS) $(LIBS) + +install: all + $(INSTALL) tput $(bindir) +.PHONY: install + +tput.o conversions.o: tput.h +getopt1.o tput.o: getopt.h + +clean: + rm -f tput *.o a.out tags TAGS core +.PHONY: clean + +realclean: clean + rm -f Makefile +.PHONY: realclean + +distclean: realclean + rm -f *.tar.Z +.PHONY: distclean + +dist: $(DISTFILES) + echo tput-$(VERSION) > .fname + rm -rf `cat .fname` + mkdir `cat .fname` + ln $(DISTFILES) `cat .fname` + tar chZf `cat .fname`.tar.Z `cat .fname` + rm -rf `cat .fname` .fname +.PHONY: dist diff --git a/linux-0.11-lab/newlibc/termcap/README b/linux-0.11-lab/newlibc/termcap/README new file mode 100644 index 0000000..c77562d --- /dev/null +++ b/linux-0.11-lab/newlibc/termcap/README @@ -0,0 +1,42 @@ +This directory contains GNU tput, a program to enable shell scripts to +portably use special terminal capabilities. Although its interface is +similar to that of terminfo-based tput programs, it actually uses termcap. + +To compile: + +1. Type `./configure'. This shell script attempts to guess correct +values for various system-dependent variables used during compilation, +and creates the file `Makefile'. This takes a minute or so. + +If your system requires unusual options for compilation or linking +that `configure' doesn't know about, you can give `configure' initial +values for variables by setting them in the environment; in +Bourne-compatible shells, you can do that on the command line like +this: +$ CC='gcc -traditional' LIBS=-lposix ./configure + +2. If you want to change the directory where the program will be +installed, or the optimization options, edit `Makefile' and change +those values. If you have an unusual system that needs special +compilation options that `configure' doesn't know about, and you +didn't pass them in the environment when running `configure', you +should add them to `Makefile' now. Alternately, teach `configure' how +to figure out that it is being run on a system where they are needed, +and mail the diffs to the address listed at the end of this file so we +can include them in the next release. + +3. Type `make'. + +4. If the program compiles successfully, type `make install' to +install it. + +5. After you have installed the program, you can remove the binary +from the source directory by typing `make clean'. Type `make +realclean' if you also want to remove `Makefile', for instance if you +are going to recompile next on another type of machine. + +To do for POSIX: +Add `init' and `reset' options. + +Mail suggestions and bug reports for GNU tput to +bug-gnu-utils@prep.ai.mit.edu. diff --git a/linux-0.11-lab/newlibc/termcap/bsearch.c b/linux-0.11-lab/newlibc/termcap/bsearch.c new file mode 100644 index 0000000..9943e25 --- /dev/null +++ b/linux-0.11-lab/newlibc/termcap/bsearch.c @@ -0,0 +1,61 @@ +/* Copyright (C) 1991 Free Software Foundation, Inc. +This file is part of the GNU C Library. + +The GNU C Library is free software; you can redistribute it and/or +modify it under the terms of the GNU Library General Public License as +published by the Free Software Foundation; either version 2 of the +License, or (at your option) any later version. + +The GNU C Library is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +Library General Public License for more details. + +You should have received a copy of the GNU Library General Public +License along with the GNU C Library; see the file COPYING.LIB. If +not, write to the Free Software Foundation, Inc., 675 Mass Ave, +Cambridge, MA 02139, USA. */ + +#ifdef STDC_HEADERS +#include +#else +#define NULL 0 +#include +#endif + +/* Perform a binary search for KEY in BASE which has NMEMB elements + of SIZE bytes each. The comparisons are done by (*COMPAR)(). */ +char * +bsearch (key, base, nmemb, size, compar) + register char *key; + register char *base; + size_t nmemb; + register size_t size; + register int (*compar) (); +{ + register size_t l, u, idx; + register char *p; + register int comparison; + + l = 0; + u = nmemb - 1; + while (l <= u) + { + idx = (l + u) / 2; + p = (char *) (((char *) base) + (idx * size)); + comparison = (*compar) (key, p); + /* Don't make U negative because it will wrap around. */ + if (comparison < 0) + { + if (idx == 0) + break; + u = idx - 1; + } + else if (comparison > 0) + l = idx + 1; + else + return (char *) p; + } + + return NULL; +} diff --git a/linux-0.11-lab/newlibc/termcap/configure b/linux-0.11-lab/newlibc/termcap/configure new file mode 100755 index 0000000..cebb067 --- /dev/null +++ b/linux-0.11-lab/newlibc/termcap/configure @@ -0,0 +1,129 @@ +: +# Guess values for system-dependant variables and create `Makefile'. +# Copyright (C) 1991 Free Software Foundation, Inc. + +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. + +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. + +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. + +trap 'rm -f defstest defstest.c Makefile; exit 1' 1 3 15 + +set +u # Make sure unset variables are ok. + +# Make sure we don't find the System V /etc/install. +PATH=`echo $PATH|sed 's,^:,|, +s,:$,|, +s,:/usr/etc,,g +s,/usr/etc:,,g +s,:/etc,,g +s,/etc:,,g +s,|,:,g'` + +if test "$RANDOM" = "$RANDOM"; then + # Plain old Bourne shell. + echo checking for gcc + test -z "$CC" -a -n "`gcc 2>&1`" && CC="gcc -O" + + echo checking for install + if test -z "$INSTALL" -a -n "`install 2>&1`"; then + INSTALL="install -c" + fi +else + # ksh, bash or zsh. + echo checking for gcc + test -z "$CC" && type gcc && CC="gcc -O" + + echo checking for install + if test -z "$INSTALL" && type install; then + INSTALL="install -c" + fi +fi + +CC=${CC-cc} +INSTALL=${INSTALL-cp} +INCLUDEDIR=${INCLUDEDIR-/usr/include} + +rm -f defstest defstest.c +compile="$CC $DEFS defstest.c -o defstest $LIBS >/dev/null 2>&1" + +# Check for various header files. + +echo checking signal handler return type +grep 'int[ ]*(\*signal[ ]*(' $INCLUDEDIR/signal.h >/dev/null 2>&1 && + DEFS="$DEFS -DSIGTYPE=int" + +echo checking for ANSI C header files +echo "#include +#include +main () { exit(0); strerror(0); }" > defstest.c +eval $compile +if test -s defstest && ./defstest 2>/dev/null; then + DEFS="$DEFS -DSTDC_HEADERS" +fi +rm -f defstest defstest.c + +echo checking for BSD string and memory functions +echo "#include +main () { exit(0); rindex(0, 0); bzero(0, 0); }" > defstest.c +eval $compile +if test -s defstest && ./defstest 2>/dev/null; then : + else DEFS="$DEFS -DUSG" +fi +rm -f defstest defstest.c + +# Check whether various functions exist. + +# Functions we provide replacements for. +for func in bsearch +do + echo checking for $func + echo "main() { exit(0); ${func}(); }" > defstest.c + eval $compile + if test -s defstest && ./defstest 2>/dev/null; then : + else LIBOBJS="$LIBOBJS ${func}.o" + fi + rm -f defstest defstest.c +done + +# Check other misc. things. + +echo checking how to get alloca +echo ' +#ifdef __GNUC__ +#define alloca __builtin_alloca +#else +#ifdef sparc +#include +#else +#ifdef _AIX +#pragma alloca +#else +char *alloca (); +#endif +#endif +#endif +main() { char *p = (char *) alloca(1); exit(0); }' > defstest.c +eval $compile +if test -s defstest && ./defstest 2>/dev/null; then : +else LIBS="$LIBS -lPW" +fi +rm -f defstest defstest.c + +echo '# Generated automatically from Makefile.in by configure.' > Makefile +sed -e " +s,@CC@,$CC, +s,@INSTALL@,$INSTALL, +s,@DEFS@,$DEFS, +s,@LIBS@,$LIBS, +s,@LIBOBJS@,$LIBOBJS, +" Makefile.in >> Makefile diff --git a/linux-0.11-lab/newlibc/termcap/conversions.c b/linux-0.11-lab/newlibc/termcap/conversions.c new file mode 100644 index 0000000..92753c7 --- /dev/null +++ b/linux-0.11-lab/newlibc/termcap/conversions.c @@ -0,0 +1,337 @@ +/* conversions.c -- table of termcap/terminfo equivalencies + Copyright (C) 1989 Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ + +#include "tput.h" + +/* `conversions' is binary-searched to retrieve the termcap equivalent + of the given terminfo capability, along with information about what + type of capability it is. If you add entries, keep the table sorted + by terminfo capability and adjust `CAPABILITIES' in tput.h. */ + +struct conversion conversions[CAPABILITIES] = +{ + {"acsc", "ac", STR}, + {"am", "am", BOOL}, + {"bel", "bl", STR}, + {"blink", "mb", STR}, + {"bold", "md", STR}, + {"bw", "bw", BOOL}, + {"cbt", "bt", STR}, + {"chts", "HC", BOOL}, + {"civis", "vi", STR}, + {"clear", "cl", STR | PAD}, + {"cmdch", "CC", STR}, + {"cnorm", "ve", STR}, + {"cols", "co", NUM}, + {"cr", "cr", STR}, + {"csr", "cs", STR}, + {"cub", "LE", STR}, + {"cub1", "le", STR}, + {"cud", "DO", STR | PAD}, + {"cud1", "do", STR}, + {"cuf", "RI", STR}, + {"cuf1", "nd", STR}, + {"cup", "cm", STR}, + {"cuu", "UP", STR}, + {"cuu1", "up", STR}, + {"cvvis", "vs", STR}, + {"da", "da", BOOL}, + {"db", "db", BOOL}, + {"dch", "DC", STR}, + {"dch1", "dc", STR}, + {"dim", "mh", STR}, + {"dl", "DL", STR | PAD}, + {"dl1", "dl", STR}, + {"dsl", "ds", STR}, + {"ech", "ec", STR}, + {"ed", "cd", STR | PAD}, + {"el", "ce", STR}, + {"el1", "cb", STR}, + {"enacs", "eA", STR}, + {"eo", "eo", BOOL}, + {"eslok", "es", BOOL}, + {"ff", "ff", STR}, + {"flash", "vb", STR}, + {"fsl", "fs", STR}, + {"gn", "gn", BOOL}, + {"hc", "hc", BOOL}, + {"hd", "hd", STR}, + {"home", "ho", STR}, + {"hpa", "ch", STR}, + {"hs", "hs", BOOL}, + {"ht", "ta", STR}, + {"hts", "st", STR}, + {"hu", "hu", STR}, + {"hz", "hz", BOOL}, + {"ich", "IC", STR}, + {"ich1", "ic", STR}, + {"if", "if", STR}, + {"il", "AL", STR | PAD}, + {"il1", "al", STR}, + {"in", "in", BOOL}, + {"ind", "sf", STR}, + {"indn", "SF", STR | PAD}, + {"invis", "mk", STR}, + {"ip", "ip", STR}, + {"iprog", "iP", STR}, + {"is1", "i1", STR}, + {"is2", "is", STR}, + {"is3", "i3", STR}, + {"it", "it", NUM}, + {"kBEG", "&9", STR}, + {"kCAN", "&0", STR}, + {"kCMD", "*1", STR}, + {"kCPY", "*2", STR}, + {"kCRT", "*3", STR}, + {"kDC", "*4", STR}, + {"kDL", "*5", STR}, + {"kEND", "*7", STR}, + {"kEOL", "*8", STR}, + {"kEXT", "*9", STR}, + {"kFND", "*0", STR}, + {"kHLP", "#1", STR}, + {"kHOM", "#2", STR}, + {"kIC", "#3", STR}, + {"kLFT", "#4", STR}, + {"kMOV", "%b", STR}, + {"kMSG", "%a", STR}, + {"kNXT", "%c", STR}, + {"kOPT", "%d", STR}, + {"kPRT", "%f", STR}, + {"kPRV", "%e", STR}, + {"kRDO", "%g", STR}, + {"kRES", "%j", STR}, + {"kRIT", "%i", STR}, + {"kRPL", "%h", STR}, + {"kSAV", "!1", STR}, + {"kSPD", "!2", STR}, + {"kUND", "!3", STR}, + {"ka1", "K1", STR}, + {"ka3", "K3", STR}, + {"kb2", "K2", STR}, + {"kbeg", "@1", STR}, + {"kbs", "kb", STR}, + {"kc1", "K4", STR}, + {"kc3", "K5", STR}, + {"kcan", "@2", STR}, + {"kcbt", "kB", STR}, + {"kclo", "@3", STR}, + {"kclr", "kC", STR}, + {"kcmd", "@4", STR}, + {"kcpy", "@5", STR}, + {"kcrt", "@6", STR}, + {"kctab", "kt", STR}, + {"kcub1", "kl", STR}, + {"kcud1", "kd", STR}, + {"kcuf1", "kr", STR}, + {"kcuu1", "ku", STR}, + {"kdch1", "kD", STR}, + {"kdl1", "kL", STR}, + {"ked", "kS", STR}, + {"kel", "kE", STR}, + {"kend", "@7", STR}, + {"kent", "@8", STR}, + {"kext", "@9", STR}, + {"kf0", "k0", STR}, + {"kf1", "k1", STR}, + {"kf10", "k;", STR}, + {"kf11", "F1", STR}, + {"kf12", "F2", STR}, + {"kf13", "F3", STR}, + {"kf14", "F4", STR}, + {"kf15", "F5", STR}, + {"kf16", "F6", STR}, + {"kf17", "F7", STR}, + {"kf18", "F8", STR}, + {"kf19", "F9", STR}, + {"kf2", "k2", STR}, + {"kf20", "FA", STR}, + {"kf21", "FB", STR}, + {"kf22", "FC", STR}, + {"kf23", "FD", STR}, + {"kf24", "FE", STR}, + {"kf25", "FF", STR}, + {"kf26", "FG", STR}, + {"kf27", "FH", STR}, + {"kf28", "FI", STR}, + {"kf29", "FJ", STR}, + {"kf3", "k3", STR}, + {"kf30", "FK", STR}, + {"kf31", "FL", STR}, + {"kf32", "FM", STR}, + {"kf33", "FN", STR}, + {"kf34", "FO", STR}, + {"kf35", "FP", STR}, + {"kf36", "FQ", STR}, + {"kf37", "FR", STR}, + {"kf38", "FS", STR}, + {"kf39", "FT", STR}, + {"kf4", "k4", STR}, + {"kf40", "FU", STR}, + {"kf41", "FV", STR}, + {"kf42", "FW", STR}, + {"kf43", "FX", STR}, + {"kf44", "FY", STR}, + {"kf45", "FZ", STR}, + {"kf46", "Fa", STR}, + {"kf47", "Fb", STR}, + {"kf48", "Fc", STR}, + {"kf49", "Fd", STR}, + {"kf5", "k5", STR}, + {"kf50", "Fe", STR}, + {"kf51", "Ff", STR}, + {"kf52", "Fg", STR}, + {"kf53", "Fh", STR}, + {"kf54", "Fi", STR}, + {"kf55", "Fj", STR}, + {"kf56", "Fk", STR}, + {"kf57", "Fl", STR}, + {"kf58", "Fm", STR}, + {"kf59", "Fn", STR}, + {"kf6", "k6", STR}, + {"kf60", "Fo", STR}, + {"kf61", "Fp", STR}, + {"kf62", "Fq", STR}, + {"kf63", "Fr", STR}, + {"kf7", "k7", STR}, + {"kf8", "k8", STR}, + {"kf9", "k9", STR}, + {"kfnd", "@0", STR}, + {"khlp", "%1", STR}, + {"khome", "kh", STR}, + {"khts", "kT", STR}, + {"kich1", "kI", STR}, + {"kil1", "kA", STR}, + {"kind", "kF", STR}, + {"kll", "kH", STR}, + {"km", "km", BOOL}, + {"kmov", "%4", STR}, + {"kmrk", "%2", STR}, + {"kmsg", "%3", STR}, + {"knp", "kN", STR}, + {"knxt", "%5", STR}, + {"kopn", "%6", STR}, + {"kopt", "%7", STR}, + {"kpp", "kP", STR}, + {"kprt", "%9", STR}, + {"kprv", "%8", STR}, + {"krdo", "%0", STR}, + {"kref", "&1", STR}, + {"kres", "&5", STR}, + {"krfr", "&2", STR}, + {"kri", "kR", STR}, + {"krmir", "kM", STR}, + {"krpl", "&3", STR}, + {"krst", "&4", STR}, + {"ksav", "&6", STR}, + {"kslt", "*6", STR}, + {"kspd", "&7", STR}, + {"ktbc", "ka", STR}, + {"kund", "&8", STR}, + {"lf0", "l0", STR}, + {"lf1", "l1", STR}, + {"lf10", "la", STR}, + {"lf2", "l2", STR}, + {"lf3", "l3", STR}, + {"lf4", "l4", STR}, + {"lf5", "l5", STR}, + {"lf6", "l6", STR}, + {"lf7", "l7", STR}, + {"lf8", "l8", STR}, + {"lf9", "l9", STR}, + {"lh", "lh", NUM}, + {"lines", "li", NUM}, + {"ll", "ll", STR}, + {"lm", "lm", NUM}, + {"lw", "lw", NUM}, + {"mc0", "ps", STR}, + {"mc4", "pf", STR}, + {"mc5", "po", STR}, + {"mc5i", "5i", BOOL}, + {"mc5p", "pO", STR}, + {"mgc", "MC", STR}, + {"mir", "mi", BOOL}, + {"mrcup", "CM", STR}, + {"msgr", "ms", BOOL}, + {"nel", "nw", STR}, + {"nlab", "Nl", NUM}, + {"npc", "NP", BOOL}, + {"nrrmc", "NR", BOOL}, + {"nxon", "nx", BOOL}, + {"os", "os", BOOL}, + {"pad", "pc", STR}, + {"pb", "pb", NUM}, + {"pfkey", "pk", STR}, + {"pfloc", "pl", STR}, + {"pfx", "px", STR}, + {"pln", "pn", STR}, + {"prot", "mp", STR}, + {"rc", "rc", STR}, + {"rep", "rp", STR}, + {"rev", "mr", STR}, + {"rf", "rf", STR}, + {"rfi", "RF", STR}, + {"ri", "sr", STR}, + {"rin", "SR", STR | PAD}, + {"rmacs", "ae", STR}, + {"rmam", "RA", STR}, + {"rmcup", "te", STR}, + {"rmdc", "ed", STR}, + {"rmir", "ei", STR}, + {"rmkx", "ke", STR}, + {"rmln", "LF", STR}, + {"rmm", "mo", STR}, + {"rmp", "rP", STR}, + {"rmso", "se", STR}, + {"rmul", "ue", STR}, + {"rmxon", "RX", STR}, + {"rs1", "r1", STR}, + {"rs2", "r2", STR}, + {"rs3", "r3", STR}, + {"sc", "sc", STR}, + {"sgr", "sa", STR}, + {"sgr0", "me", STR}, + {"smacs", "as", STR}, + {"smam", "SA", STR}, + {"smcup", "ti", STR}, + {"smdc", "dm", STR}, + {"smgl", "ML", STR}, + {"smgr", "MR", STR}, + {"smir", "im", STR}, + {"smkx", "ks", STR}, + {"smln", "LO", STR}, + {"smm", "mm", STR}, + {"smso", "so", STR}, + {"smul", "us", STR}, + {"smxon", "SX", STR}, + {"tbc", "ct", STR}, + {"tsl", "ts", STR}, + {"uc", "uc", STR}, + {"ul", "ul", BOOL}, + {"vpa", "cv", STR}, + {"vt", "vt", NUM}, + {"wind", "wi", STR}, + {"wsl", "ws", NUM}, + {"xenl", "xn", BOOL}, + {"xhp", "xs", BOOL}, + {"xmc", "sg", NUM}, + {"xoffc", "XF", STR}, + {"xon", "xo", BOOL}, + {"xonc", "XN", STR}, + {"xsb", "xb", BOOL}, + {"xt", "xt", BOOL} +}; diff --git a/linux-0.11-lab/newlibc/termcap/getopt.c b/linux-0.11-lab/newlibc/termcap/getopt.c new file mode 100644 index 0000000..d7e2137 --- /dev/null +++ b/linux-0.11-lab/newlibc/termcap/getopt.c @@ -0,0 +1,596 @@ +/* Getopt for GNU. + Copyright (C) 1987, 1989, 1990, 1991 Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ + +#ifdef __STDC__ +#define CONST const +#else +#define CONST +#endif + +/* This version of `getopt' appears to the caller like standard Unix `getopt' + but it behaves differently for the user, since it allows the user + to intersperse the options with the other arguments. + + As `getopt' works, it permutes the elements of `argv' so that, + when it is done, all the options precede everything else. Thus + all application programs are extended to handle flexible argument order. + + Setting the environment variable _POSIX_OPTION_ORDER disables permutation. + Then the behavior is completely standard. + + GNU application programs can use a third alternative mode in which + they can distinguish the relative order of options and other arguments. */ + +#include + +/* If compiled with GNU C, use the built-in alloca */ +#ifdef __GNUC__ +#define alloca __builtin_alloca +#else /* not __GNUC__ */ +#ifdef sparc +#include +#else +#ifdef _AIX +#pragma alloca +#else +char *alloca (); +#endif +#endif /* sparc */ +#endif /* not __GNUC__ */ + +#if defined(STDC_HEADERS) || defined(__GNU_LIBRARY__) +#include +#else /* STDC_HEADERS or __GNU_LIBRARY__ */ +char *getenv (); +char *malloc (); +#endif /* STDC_HEADERS or __GNU_LIBRARY__ */ + +#if defined(USG) || defined(STDC_HEADERS) || defined(__GNU_LIBRARY__) +#include +#define bcopy(s, d, n) memcpy ((d), (s), (n)) +#define index strchr +#else /* USG or STDC_HEADERS or __GNU_LIBRARY__ */ +#ifdef VMS +#include +#else /* VMS */ +#include +#endif /* VMS */ +/* Declaring bcopy causes errors on systems whose declarations are different. + If the declaration is omitted, everything works fine. */ +#endif /* USG or STDC_HEADERS or __GNU_LIBRARY__ */ + +/* For communication from `getopt' to the caller. + When `getopt' finds an option that takes an argument, + the argument value is returned here. + Also, when `ordering' is RETURN_IN_ORDER, + each non-option ARGV-element is returned here. */ + +char *optarg = 0; + +/* Index in ARGV of the next element to be scanned. + This is used for communication to and from the caller + and for communication between successive calls to `getopt'. + + On entry to `getopt', zero means this is the first call; initialize. + + When `getopt' returns EOF, this is the index of the first of the + non-option elements that the caller should itself scan. + + Otherwise, `optind' communicates from one call to the next + how much of ARGV has been scanned so far. */ + +int optind = 0; + +/* The next char to be scanned in the option-element + in which the last option character we returned was found. + This allows us to pick up the scan where we left off. + + If this is zero, or a null string, it means resume the scan + by advancing to the next ARGV-element. */ + +static char *nextchar; + +/* Callers store zero here to inhibit the error message + for unrecognized options. */ + +int opterr = 1; + +/* Describe how to deal with options that follow non-option ARGV-elements. + + If the caller did not specify anything, + the default is REQUIRE_ORDER if the environment variable + _POSIX_OPTION_ORDER is defined, PERMUTE otherwise. + + REQUIRE_ORDER means don't recognize them as options; + stop option processing when the first non-option is seen. + This is what Unix does. + This mode of operation is selected by either setting the environment + variable _POSIX_OPTION_ORDER, or using `+' as the first character + of the list of option characters. + + PERMUTE is the default. We permute the contents of ARGV as we scan, + so that eventually all the non-options are at the end. This allows options + to be given in any order, even with programs that were not written to + expect this. + + RETURN_IN_ORDER is an option available to programs that were written + to expect options and other ARGV-elements in any order and that care about + the ordering of the two. We describe each non-option ARGV-element + as if it were the argument of an option with character code 1. + Using `-' as the first character of the list of option characters + selects this mode of operation. + + The special argument `--' forces an end of option-scanning regardless + of the value of `ordering'. In the case of RETURN_IN_ORDER, only + `--' can cause `getopt' to return EOF with `optind' != ARGC. */ + +static enum +{ + REQUIRE_ORDER, PERMUTE, RETURN_IN_ORDER +} ordering; + +/* Describe the long-named options requested by the application. + _GETOPT_LONG_OPTIONS is a vector of `struct option' terminated by an + element containing a name which is zero. + The field `has_arg' is 1 if the option takes an argument, + 2 if it takes an optional argument. */ + +struct option +{ + char *name; + int has_arg; + int *flag; + int val; +}; + +CONST struct option *_getopt_long_options; + +int _getopt_long_only = 0; + +/* Index in _GETOPT_LONG_OPTIONS of the long-named option actually found. + Only valid when a long-named option was found. */ + +int option_index; + +/* Handle permutation of arguments. */ + +/* Describe the part of ARGV that contains non-options that have + been skipped. `first_nonopt' is the index in ARGV of the first of them; + `last_nonopt' is the index after the last of them. */ + +static int first_nonopt; +static int last_nonopt; + +/* Exchange two adjacent subsequences of ARGV. + One subsequence is elements [first_nonopt,last_nonopt) + which contains all the non-options that have been skipped so far. + The other is elements [last_nonopt,optind), which contains all + the options processed since those non-options were skipped. + + `first_nonopt' and `last_nonopt' are relocated so that they describe + the new indices of the non-options in ARGV after they are moved. */ + +static void +exchange (argv) + char **argv; +{ + int nonopts_size = (last_nonopt - first_nonopt) * sizeof (char *); + char **temp = (char **) alloca (nonopts_size); + + /* Interchange the two blocks of data in ARGV. */ + + bcopy (&argv[first_nonopt], temp, nonopts_size); + bcopy (&argv[last_nonopt], &argv[first_nonopt], + (optind - last_nonopt) * sizeof (char *)); + bcopy (temp, &argv[first_nonopt + optind - last_nonopt], nonopts_size); + + /* Update records for the slots the non-options now occupy. */ + + first_nonopt += (optind - last_nonopt); + last_nonopt = optind; +} + +/* Scan elements of ARGV (whose length is ARGC) for option characters + given in OPTSTRING. + + If an element of ARGV starts with '-', and is not exactly "-" or "--", + then it is an option element. The characters of this element + (aside from the initial '-') are option characters. If `getopt' + is called repeatedly, it returns successively each of the option characters + from each of the option elements. + + If `getopt' finds another option character, it returns that character, + updating `optind' and `nextchar' so that the next call to `getopt' can + resume the scan with the following option character or ARGV-element. + + If there are no more option characters, `getopt' returns `EOF'. + Then `optind' is the index in ARGV of the first ARGV-element + that is not an option. (The ARGV-elements have been permuted + so that those that are not options now come last.) + + OPTSTRING is a string containing the legitimate option characters. + If an option character is seen that is not listed in OPTSTRING, + return '?' after printing an error message. If you set `opterr' to + zero, the error message is suppressed but we still return '?'. + + If a char in OPTSTRING is followed by a colon, that means it wants an arg, + so the following text in the same ARGV-element, or the text of the following + ARGV-element, is returned in `optarg'. Two colons mean an option that + wants an optional arg; if there is text in the current ARGV-element, + it is returned in `optarg', otherwise `optarg' is set to zero. + + If OPTSTRING starts with `-' or `+', it requests different methods of + handling the non-option ARGV-elements. + See the comments about RETURN_IN_ORDER and REQUIRE_ORDER, above. + + Long-named options begin with `+' instead of `-'. + Their names may be abbreviated as long as the abbreviation is unique + or is an exact match for some defined option. If they have an + argument, it follows the option name in the same ARGV-element, separated + from the option name by a `=', or else the in next ARGV-element. + When `getopt' finds a long-named option, it returns 0 if that option's + `flag' field is nonzero, the value of the option's `val' field + otherwise. */ + +int +getopt (argc, argv, optstring) + int argc; + char **argv; + CONST char *optstring; +{ + optarg = 0; + + /* Initialize the internal data when the first call is made. + Start processing options with ARGV-element 1 (since ARGV-element 0 + is the program name); the sequence of previously skipped + non-option ARGV-elements is empty. */ + + if (optind == 0) + { + first_nonopt = last_nonopt = optind = 1; + + nextchar = 0; + + /* Determine how to handle the ordering of options and nonoptions. */ + + if (optstring[0] == '-') + { + ordering = RETURN_IN_ORDER; + ++optstring; + } + else if (optstring[0] == '+') + { + ordering = REQUIRE_ORDER; + ++optstring; + } + else if (getenv ("_POSIX_OPTION_ORDER") != 0) + ordering = REQUIRE_ORDER; + else + ordering = PERMUTE; + } + + if (nextchar == 0 || *nextchar == 0) + { + if (ordering == PERMUTE) + { + /* If we have just processed some options following some non-options, + exchange them so that the options come first. */ + + if (first_nonopt != last_nonopt && last_nonopt != optind) + exchange (argv); + else if (last_nonopt != optind) + first_nonopt = optind; + + /* Now skip any additional non-options + and extend the range of non-options previously skipped. */ + + while (optind < argc + && (argv[optind][0] != '-' + || argv[optind][1] == 0) + && (_getopt_long_options == 0 + || argv[optind][0] != '+' + || argv[optind][1] == 0)) + optind++; + last_nonopt = optind; + } + + /* Special ARGV-element `--' means premature end of options. + Skip it like a null option, + then exchange with previous non-options as if it were an option, + then skip everything else like a non-option. */ + + if (optind != argc && !strcmp (argv[optind], "--")) + { + optind++; + + if (first_nonopt != last_nonopt && last_nonopt != optind) + exchange (argv); + else if (first_nonopt == last_nonopt) + first_nonopt = optind; + last_nonopt = argc; + + optind = argc; + } + + /* If we have done all the ARGV-elements, stop the scan + and back over any non-options that we skipped and permuted. */ + + if (optind == argc) + { + /* Set the next-arg-index to point at the non-options + that we previously skipped, so the caller will digest them. */ + if (first_nonopt != last_nonopt) + optind = first_nonopt; + return EOF; + } + + /* If we have come to a non-option and did not permute it, + either stop the scan or describe it to the caller and pass it by. */ + + if ((argv[optind][0] != '-' || argv[optind][1] == 0) + && (_getopt_long_options == 0 + || argv[optind][0] != '+' || argv[optind][1] == 0)) + { + if (ordering == REQUIRE_ORDER) + return EOF; + optarg = argv[optind++]; + return 1; + } + + /* We have found another option-ARGV-element. + Start decoding its characters. */ + + nextchar = argv[optind] + 1; + } + + if (_getopt_long_options != 0 + && (argv[optind][0] == '+' + || (_getopt_long_only && argv[optind][0] == '-')) + ) + { + CONST struct option *p; + char *s = nextchar; + int exact = 0; + int ambig = 0; + CONST struct option *pfound = 0; + int indfound; + + while (*s && *s != '=') + s++; + + /* Test all options for either exact match or abbreviated matches. */ + for (p = _getopt_long_options, option_index = 0; p->name; + p++, option_index++) + if (!strncmp (p->name, nextchar, s - nextchar)) + { + if (s - nextchar == strlen (p->name)) + { + /* Exact match found. */ + pfound = p; + indfound = option_index; + exact = 1; + break; + } + else if (pfound == 0) + { + /* First nonexact match found. */ + pfound = p; + indfound = option_index; + } + else + /* Second nonexact match found. */ + ambig = 1; + } + + if (ambig && !exact) + { + fprintf (stderr, "%s: option `%s' is ambiguous\n", + argv[0], argv[optind]); + nextchar += strlen (nextchar); + optind++; + return '?'; + } + + if (pfound != 0) + { + option_index = indfound; + optind++; + if (*s) + { + if (pfound->has_arg > 0) + optarg = s + 1; + else + { + fprintf (stderr, + "%s: option `%c%s' doesn't allow an argument\n", + argv[0], argv[optind - 1][0], pfound->name); + nextchar += strlen (nextchar); + return '?'; + } + } + else if (pfound->has_arg == 1) + { + if (optind < argc) + optarg = argv[optind++]; + else + { + fprintf (stderr, "%s: option `%s' requires an argument\n", + argv[0], argv[optind - 1]); + nextchar += strlen (nextchar); + return '?'; + } + } + nextchar += strlen (nextchar); + if (pfound->flag) + { + *(pfound->flag) = pfound->val; + return 0; + } + return pfound->val; + } + /* Can't find it as a long option. If this is getopt_long_only, + and the option starts with '-' and is a valid short + option, then interpret it as a short option. Otherwise it's + an error. */ + if (_getopt_long_only == 0 || argv[optind][0] == '+' || + index (optstring, *nextchar) == 0) + { + if (opterr != 0) + fprintf (stderr, "%s: unrecognized option `%c%s'\n", + argv[0], argv[optind][0], nextchar); + nextchar += strlen (nextchar); + optind++; + return '?'; + } + } + + /* Look at and handle the next option-character. */ + + { + char c = *nextchar++; + char *temp = index (optstring, c); + + /* Increment `optind' when we start to process its last character. */ + if (*nextchar == 0) + optind++; + + if (temp == 0 || c == ':') + { + if (opterr != 0) + { + if (c < 040 || c >= 0177) + fprintf (stderr, "%s: unrecognized option, character code 0%o\n", + argv[0], c); + else + fprintf (stderr, "%s: unrecognized option `-%c'\n", + argv[0], c); + } + return '?'; + } + if (temp[1] == ':') + { + if (temp[2] == ':') + { + /* This is an option that accepts an argument optionally. */ + if (*nextchar != 0) + { + optarg = nextchar; + optind++; + } + else + optarg = 0; + nextchar = 0; + } + else + { + /* This is an option that requires an argument. */ + if (*nextchar != 0) + { + optarg = nextchar; + /* If we end this ARGV-element by taking the rest as an arg, + we must advance to the next element now. */ + optind++; + } + else if (optind == argc) + { + if (opterr != 0) + fprintf (stderr, "%s: option `-%c' requires an argument\n", + argv[0], c); + c = '?'; + } + else + /* We already incremented `optind' once; + increment it again when taking next ARGV-elt as argument. */ + optarg = argv[optind++]; + nextchar = 0; + } + } + return c; + } +} + +#ifdef TEST + +/* Compile with -DTEST to make an executable for use in testing + the above definition of `getopt'. */ + +int +main (argc, argv) + int argc; + char **argv; +{ + int c; + int digit_optind = 0; + + while (1) + { + int this_option_optind = optind ? optind : 1; + + c = getopt (argc, argv, "abc:d:0123456789"); + if (c == EOF) + break; + + switch (c) + { + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + if (digit_optind != 0 && digit_optind != this_option_optind) + printf ("digits occur in two different argv-elements.\n"); + digit_optind = this_option_optind; + printf ("option %c\n", c); + break; + + case 'a': + printf ("option a\n"); + break; + + case 'b': + printf ("option b\n"); + break; + + case 'c': + printf ("option c with value `%s'\n", optarg); + break; + + case '?': + break; + + default: + printf ("?? getopt returned character code 0%o ??\n", c); + } + } + + if (optind < argc) + { + printf ("non-option ARGV-elements: "); + while (optind < argc) + printf ("%s ", argv[optind++]); + printf ("\n"); + } + + exit (0); +} + +#endif /* TEST */ diff --git a/linux-0.11-lab/newlibc/termcap/getopt.h b/linux-0.11-lab/newlibc/termcap/getopt.h new file mode 100644 index 0000000..151379f --- /dev/null +++ b/linux-0.11-lab/newlibc/termcap/getopt.h @@ -0,0 +1,102 @@ +/* declarations for getopt + Copyright (C) 1989, 1990, 1991 Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ + +/* For communication from `getopt' to the caller. + When `getopt' finds an option that takes an argument, + the argument value is returned here. + Also, when `ordering' is RETURN_IN_ORDER, + each non-option ARGV-element is returned here. */ + +extern char *optarg; + +/* Index in ARGV of the next element to be scanned. + This is used for communication to and from the caller + and for communication between successive calls to `getopt'. + + On entry to `getopt', zero means this is the first call; initialize. + + When `getopt' returns EOF, this is the index of the first of the + non-option elements that the caller should itself scan. + + Otherwise, `optind' communicates from one call to the next + how much of ARGV has been scanned so far. */ + +extern int optind; + +/* Callers store zero here to inhibit the error message `getopt' prints + for unrecognized options. */ + +extern int opterr; + +/* Describe the long-named options requested by the application. + _GETOPT_LONG_OPTIONS is a vector of `struct option' terminated by an + element containing a name which is zero. + + The field `has_arg' is: + 0 if the option does not take an argument, + 1 if the option requires an argument, + 2 if the option takes an optional argument. + + If the field `flag' is nonzero, it points to a variable that is set + to the value given in the field `val' when the option is found, but + left unchanged if the option is not found. + + To have a long-named option do something other than set an `int' to + a compiled-in constant, such as set a value from `optarg', set the + option's `flag' field to zero and its `val' field to a nonzero + value (the equivalent single-letter option character, if there is + one). For long options that have a zero `flag' field, `getopt' + returns the contents of the `val' field. */ + +struct option +{ + char *name; + int has_arg; + int *flag; + int val; +}; + +#ifdef __STDC__ +extern const struct option *_getopt_long_options; +#else +extern struct option *_getopt_long_options; +#endif + +/* If nonzero, '-' can introduce long-named options. + Set by getopt_long_only. */ + +extern int _getopt_long_only; + +/* The index in GETOPT_LONG_OPTIONS of the long-named option found. + Only valid when a long-named option has been found by the most + recent call to `getopt'. */ + +extern int option_index; + +#ifdef __STDC__ +int getopt (int argc, char **argv, const char *shortopts); +int getopt_long (int argc, char **argv, const char *shortopts, + const struct option *longopts, int *longind); +int getopt_long_only (int argc, char **argv, const char *shortopts, + const struct option *longopts, int *longind); +void envopt(int *pargc, char ***pargv, char *optstr); +#else +int getopt (); +int getopt_long (); +int getopt_long_only (); +void envopt(); +#endif diff --git a/linux-0.11-lab/newlibc/termcap/getopt1.c b/linux-0.11-lab/newlibc/termcap/getopt1.c new file mode 100644 index 0000000..d739acb --- /dev/null +++ b/linux-0.11-lab/newlibc/termcap/getopt1.c @@ -0,0 +1,160 @@ +/* Getopt for GNU. + Copyright (C) 1987, 1989, 1991 Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ + +#include "getopt.h" + +#ifdef __STDC__ +#define CONST const +#else +#define CONST +#endif + +#if !defined (NULL) +#define NULL 0 +#endif + +int +getopt_long (argc, argv, options, long_options, opt_index) + int argc; + char **argv; + CONST char *options; + CONST struct option *long_options; + int *opt_index; +{ + int val; + + _getopt_long_options = long_options; + val = getopt (argc, argv, options); + if (val == 0 && opt_index != NULL) + *opt_index = option_index; + return val; +} + +/* Like getopt_long, but '-' as well as '+' can indicate a long option. + If an option that starts with '-' doesn't match a long option, + but does match a short option, it is parsed as a short option + instead. */ + +int +getopt_long_only (argc, argv, options, long_options, opt_index) + int argc; + char **argv; + CONST char *options; + CONST struct option *long_options; + int *opt_index; +{ + int val; + + _getopt_long_options = long_options; + _getopt_long_only = 1; + val = getopt (argc, argv, options); + if (val == 0 && opt_index != NULL) + *opt_index = option_index; + return val; +} + + +#ifdef TEST + +#include + +int +main (argc, argv) + int argc; + char **argv; +{ + int c; + int digit_optind = 0; + + while (1) + { + int this_option_optind = optind ? optind : 1; + char *name = '\0'; + int option_index = 0; + static struct option long_options[] = + { + {"add", 1, 0, 0}, + {"append", 0, 0, 0}, + {"delete", 1, 0, 0}, + {"verbose", 0, 0, 0}, + {"create", 0, 0, 0}, + {"file", 1, 0, 0}, + {0, 0, 0, 0} + }; + + c = getopt_long (argc, argv, "abc:d:0123456789", + long_options, &option_index); + if (c == EOF) + break; + + switch (c) + { + case 0: + printf ("option %s", (long_options[option_index]).name); + if (optarg) + printf (" with arg %s", optarg); + printf ("\n"); + break; + + case '0': + case '1': + case '2': + case '3': + case '4': + case '5': + case '6': + case '7': + case '8': + case '9': + if (digit_optind != 0 && digit_optind != this_option_optind) + printf ("digits occur in two different argv-elements.\n"); + digit_optind = this_option_optind; + printf ("option %c\n", c); + break; + + case 'a': + printf ("option a\n"); + break; + + case 'b': + printf ("option b\n"); + break; + + case 'c': + printf ("option c with value `%s'\n", optarg); + break; + + case '?': + break; + + default: + printf ("?? getopt returned character code 0%o ??\n", c); + } + } + + if (optind < argc) + { + printf ("non-option ARGV-elements: "); + while (optind < argc) + printf ("%s ", argv[optind++]); + printf ("\n"); + } + + exit (0); +} + +#endif /* TEST */ diff --git a/linux-0.11-lab/newlibc/termcap/makefile b/linux-0.11-lab/newlibc/termcap/makefile new file mode 100644 index 0000000..455858f --- /dev/null +++ b/linux-0.11-lab/newlibc/termcap/makefile @@ -0,0 +1,45 @@ +# +# Makefile for some odd library functions +# + +LIB =../Libtermcap.a +AR =gar +AS =gas +LD =gld +LDFLAGS =-s -x +CC =gcc +INC =#-nostdinc -I/linux/usr/include +CFLAGS =-Wall -O -fstrength-reduce -fomit-frame-pointer \ + -finline-functions $(INC) -DUSG -DSTDC_HEADERS + +CPP =$(CC) -E $(INC) + +.c.s: + $(CC) $(CFLAGS) \ + -S -o $*.s $< +.s.o: + $(CC) -c -o $*.o $< +.c.o: + $(CC) $(CFLAGS) \ + -c -o $*.o $< + +OBJS = tput.o conversions.o getopt.o getopt1.o termcap.o tparam.o +OBJS = termcap.o tparam.o + +all: library + +library: $(OBJS) + $(AR) uvc $(LIB) $(OBJS) + sync + +clean: + $(RM) -f core *.o *.a tmp_make + for i in *.c;do $(RM) -f `basename $$i .c`.s;done + +dep: + sed '/\#\#\# Dependencies/q' < Makefile > tmp_make + (for i in *.c;do echo -n `echo $$i | sed 's,\.c,\.s,'`" "; \ + $(CPP) -M $$i;done) >> tmp_make + cp tmp_make Makefile + +### Dependencies: diff --git a/linux-0.11-lab/newlibc/termcap/termcap.c b/linux-0.11-lab/newlibc/termcap/termcap.c new file mode 100644 index 0000000..9ea1bb8 --- /dev/null +++ b/linux-0.11-lab/newlibc/termcap/termcap.c @@ -0,0 +1,681 @@ +/* Work-alike for termcap, plus extra features. + Copyright (C) 1985, 1986 Free Software Foundation, Inc. + +This file is part of GNU Emacs. + +GNU Emacs is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 1, or (at your option) +any later version. + +GNU Emacs is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU Emacs; see the file COPYING. If not, write to +the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ + + +/* BUFSIZE is the initial size allocated for the buffer + for reading the termcap file. + It is not a limit. + Make it large normally for speed. + Make it variable when debugging, so can exercise + increasing the space dynamically. */ + +#ifdef emacs +#include "config.h" +#else +#if defined(USG) || defined(STDC_HEADERS) +#ifdef __STDC__ +#include +#include +#include +#endif +#define bcopy(s, d, n) memcpy ((d), (s), (n)) +#endif +#endif + +#ifndef BUFSIZE +#ifdef DEBUG +#define BUFSIZE bufsize + +int bufsize = 128; +#else +#define BUFSIZE 2048 +#endif +#endif + +#ifndef emacs +static void +memory_out () +{ + write (2, "Virtual memory exhausted\n", 25); + exit (1); +} + +static void * +xmalloc (size) + int size; +{ + register void *tem = malloc (size); + if (!tem) + memory_out (); + return tem; +} + +static void * +xrealloc (ptr, size) + void *ptr; + int size; +{ + register void *tem = realloc (ptr, size); + if (!tem) + memory_out (); + return tem; +} +#endif /* not emacs */ + +/* Looking up capabilities in the entry already found */ + +/* The pointer to the data made by tgetent is left here + for tgetnum, tgetflag and tgetstr to find. */ + +static char *term_entry; + +static char *tgetst1 (); + +/* This is the main subroutine that is used to search + an entry for a particular capability */ + +static char * +find_capability (bp, cap) + register char *bp, *cap; +{ + for (; *bp; bp++) + if (bp[0] == ':' + && bp[1] == cap[0] + && bp[2] == cap[1]) + return &bp[4]; + return 0; +} + +int +tgetnum (cap) + char *cap; +{ + register char *ptr = find_capability (term_entry, cap); + if (!ptr || ptr[-1] != '#') + return -1; + return atoi (ptr); +} + +int +tgetflag (cap) + char *cap; +{ + register char *ptr = find_capability (term_entry, cap); + return 0 != ptr && ptr[-1] == ':'; +} + +/* Look up a string-valued capability `cap'. + If `area' is nonzero, it points to a pointer to a block in which + to store the string. That pointer is advanced over the space used. + If `area' is zero, space is allocated with `malloc'. */ + +char * +tgetstr (cap, area) + char *cap; + char **area; +{ + register char *ptr = find_capability (term_entry, cap); + if (!ptr || (ptr[-1] != '=' && ptr[-1] != '~')) + return 0; + return tgetst1 (ptr, area); +} + +/* Table, indexed by a character in range 0100 to 0140 with 0100 subtracted, + gives meaning of character following \, or a space if no special meaning. + Eight characters per line within the string. */ + +static char esctab[] + = " \007\010 \033\014 \ + \012 \ + \015 \011 \013 \ + "; + +/* Given a pointer to a string value inside a termcap entry (`ptr'), + copy the value and process \ and ^ abbreviations. + Copy into block that *area points to, + or to newly allocated storage if area is 0. */ + +static char * +tgetst1 (ptr, area) + char *ptr; + char **area; +{ + register char *p, *r; + register int c; + register int size; + char *ret; + register int c1; + + if (!ptr) + return 0; + + /* `ret' gets address of where to store the string */ + if (!area) + { + /* Compute size of block needed (may overestimate) */ + p = ptr; + while ((c = *p++) && c != ':' && c != '\n'); + ret = (char *) xmalloc (p - ptr + 1); + } + else + ret = *area; + + /* Copy the string value, stopping at null or colon. */ + /* Also process ^ and \ abbreviations. */ + p = ptr; + r = ret; + while ((c = *p++) && c != ':' && c != '\n') + { + if (c == '^') + c = *p++ & 037; + else if (c == '\\') + { + c = *p++; + if (c >= '0' && c <= '7') + { + c -= '0'; + size = 0; + + while (++size < 3 && (c1 = *p) >= '0' && c1 <= '7') + { + c *= 8; + c += c1 - '0'; + p++; + } + } + else if (c >= 0100 && c < 0200) + { + c1 = esctab[(c & ~040) - 0100]; + if (c1 != ' ') + c = c1; + } + } + *r++ = c; + } + *r = 0; + /* Update *area */ + if (area) + *area = r + 1; + return ret; +} + +/* Outputting a string with padding */ + +short ospeed; +/* If OSPEED is 0, we use this as the actual baud rate. */ +int tputs_baud_rate; +char PC; + +/* Actual baud rate if positive; + - baud rate / 100 if negative. */ + +static short speeds[] = + { +#ifdef VMS + 0, 50, 75, 110, 134, 150, -3, -6, -12, -18, + -20, -24, -36, -48, -72, -96, -192 +#else /* not VMS */ + 0, 50, 75, 110, 135, 150, -2, -3, -6, -12, + -18, -24, -48, -96, -192, -384 +#endif /* not VMS */ + }; + +void +tputs (string, nlines, outfun) + register char *string; + int nlines; + register int (*outfun) (); +{ + register int padcount = 0; + register int speed; + +#ifdef emacs + extern baud_rate; + speed = baud_rate; +#else + if (ospeed == 0) + speed = tputs_baud_rate; + else + speed = speeds[ospeed]; +#endif + + if (string == (char *) 0) + return; + + while (*string >= '0' && *string <= '9') + { + padcount += *string++ - '0'; + padcount *= 10; + } + if (*string == '.') + { + string++; + padcount += *string++ - '0'; + } + if (*string == '*') + { + string++; + padcount *= nlines; + } + while (*string) + (*outfun) (*string++); + + /* padcount is now in units of tenths of msec. */ + padcount *= speeds[ospeed]; + padcount += 500; + padcount /= 1000; + if (speeds[ospeed] < 0) + padcount = -padcount; + else + { + padcount += 50; + padcount /= 100; + } + + while (padcount-- > 0) + (*outfun) (PC); +} + +/* Finding the termcap entry in the termcap data base */ + +struct buffer + { + char *beg; + int size; + char *ptr; + int ateof; + int full; + }; + +/* Forward declarations of static functions */ + +static int scan_file (); +static char *gobble_line (); +static int compare_contin (); +static int name_match (); + +#ifdef VMS + +#include +#include +#include + +static int +legal_filename_p (fn) + char *fn; +{ + struct FAB fab = cc$rms_fab; + struct NAM nam = cc$rms_nam; + char esa[NAM$C_MAXRSS]; + + fab.fab$l_fna = fn; + fab.fab$b_fns = strlen(fn); + fab.fab$l_nam = &nam; + fab.fab$l_fop = FAB$M_NAM; + + nam.nam$l_esa = esa; + nam.nam$b_ess = sizeof esa; + + return SYS$PARSE(&fab, 0, 0) == RMS$_NORMAL; +} + +#endif /* VMS */ + +/* Find the termcap entry data for terminal type `name' + and store it in the block that `bp' points to. + Record its address for future use. + + If `bp' is zero, space is dynamically allocated. */ + +int +tgetent (bp, name) + char *bp, *name; +{ + register char *tem; + register int fd; + struct buffer buf; + register char *bp1; + char *bp2; + char *term; + int malloc_size = 0; + register int c; + char *tcenv; /* TERMCAP value, if it contais :tc=. */ + char *indirect = 0; /* Terminal type in :tc= in TERMCAP value. */ + int filep; + + tem = (char *) getenv ("TERMCAP"); + if (tem && *tem == 0) tem = 0; + +#ifdef VMS + filep = tem && legal_filename_p (tem); +#else + filep = tem && (*tem == '/'); +#endif /* VMS */ + + /* If tem is non-null and starts with / (in the un*x case, that is), + it is a file name to use instead of /etc/termcap. + If it is non-null and does not start with /, + it is the entry itself, but only if + the name the caller requested matches the TERM variable. */ + + if (tem && !filep && !strcmp (name, getenv ("TERM"))) + { + indirect = tgetst1 (find_capability (tem, "tc"), 0); + if (!indirect) + { + if (!bp) + bp = tem; + else + strcpy (bp, tem); + goto ret; + } + else + { /* we will need to read /etc/termcap */ + tcenv = tem; + tem = 0; + } + } + else + indirect = (char *) 0; + + if (!tem) +#ifdef VMS + tem = "emacs_library:[etc]termcap.dat"; +#else + tem = "/etc/termcap"; +#endif + + /* Here we know we must search a file and tem has its name. */ + + fd = open (tem, 0, 0); + if (fd < 0) + return -1; + + buf.size = BUFSIZE; + /* Add 1 to size to ensure room for terminating null. */ + buf.beg = (char *) xmalloc (buf.size + 1); + term = indirect ? indirect : name; + + if (!bp) + { + malloc_size = indirect ? strlen (tcenv) + 1 : buf.size; + bp = (char *) xmalloc (malloc_size); + } + bp1 = bp; + + if (indirect) /* copy the data from the environment variable */ + { + strcpy (bp, tcenv); + bp1 += strlen (tcenv); + } + + while (term) + { + /* Scan file, reading it via buf, till find start of main entry */ + if (scan_file (term, fd, &buf) == 0) + return 0; + + /* Free old `term' if appropriate. */ + if (term != name) + free (term); + + /* If `bp' is malloc'd by us, make sure it is big enough. */ + if (malloc_size) + { + malloc_size = bp1 - bp + buf.size; + tem = (char *) xrealloc (bp, malloc_size); + bp1 += tem - bp; + bp = tem; + } + + bp2 = bp1; + + /* Copy the line of the entry from buf into bp. */ + tem = buf.ptr; + while ((*bp1++ = c = *tem++) && c != '\n') + /* Drop out any \ newline sequence. */ + if (c == '\\' && *tem == '\n') + { + bp1--; + tem++; + } + *bp1 = 0; + + /* Does this entry refer to another terminal type's entry? */ + /* If something is found, copy it into heap and null-terminate it */ + term = tgetst1 (find_capability (bp2, "tc"), 0); + } + + close (fd); + free (buf.beg); + + if (malloc_size) + { + bp = (char *) xrealloc (bp, bp1 - bp + 1); + } + + ret: + term_entry = bp; + if (malloc_size) + return (int) bp; + return 1; +} + +/* Given file open on `fd' and buffer `bufp', + scan the file from the beginning until a line is found + that starts the entry for terminal type `string'. + Returns 1 if successful, with that line in `bufp', + or returns 0 if no entry found in the file. */ + +static int +scan_file (string, fd, bufp) + char *string; + int fd; + register struct buffer *bufp; +{ + register char *end; + + bufp->ptr = bufp->beg; + bufp->full = 0; + bufp->ateof = 0; + *bufp->ptr = 0; + + lseek (fd, 0L, 0); + + while (!bufp->ateof) + { + /* Read a line into the buffer */ + end = 0; + do + { + /* if it is continued, append another line to it, + until a non-continued line ends */ + end = gobble_line (fd, bufp, end); + } + while (!bufp->ateof && end[-2] == '\\'); + + if (*bufp->ptr != '#' + && name_match (bufp->ptr, string)) + return 1; + + /* Discard the line just processed */ + bufp->ptr = end; + } + return 0; +} + +/* Return nonzero if NAME is one of the names specified + by termcap entry LINE. */ + +static int +name_match (line, name) + char *line, *name; +{ + register char *tem; + + if (!compare_contin (line, name)) + return 1; + /* This line starts an entry. Is it the right one? */ + for (tem = line; *tem && *tem != '\n' && *tem != ':'; tem++) + if (*tem == '|' && !compare_contin (tem + 1, name)) + return 1; + + return 0; +} + +static int +compare_contin (str1, str2) + register char *str1, *str2; +{ + register int c1, c2; + while (1) + { + c1 = *str1++; + c2 = *str2++; + while (c1 == '\\' && *str1 == '\n') + { + str1++; + while ((c1 = *str1++) == ' ' || c1 == '\t'); + } + if (c2 == '\0') /* end of type being looked up */ + { + if (c1 == '|' || c1 == ':') /* If end of name in data base, */ + return 0; /* we win. */ + else + return 1; + } + else if (c1 != c2) + return 1; + } +} + +/* Make sure that the buffer <- `bufp' contains a full line + of the file open on `fd', starting at the place `bufp->ptr' + points to. Can read more of the file, discard stuff before + `bufp->ptr', or make the buffer bigger. + + Returns the pointer to after the newline ending the line, + or to the end of the file, if there is no newline to end it. + + Can also merge on continuation lines. If `append_end' is + nonzero, it points past the newline of a line that is + continued; we add another line onto it and regard the whole + thing as one line. The caller decides when a line is continued. */ + +static char * +gobble_line (fd, bufp, append_end) + int fd; + register struct buffer *bufp; + char *append_end; +{ + register char *end; + register int nread; + register char *buf = bufp->beg; + register char *tem; + + if (append_end == 0) + append_end = bufp->ptr; + + while (1) + { + end = append_end; + while (*end && *end != '\n') end++; + if (*end) + break; + if (bufp->ateof) + return buf + bufp->full; + if (bufp->ptr == buf) + { + if (bufp->full == bufp->size) + { + bufp->size *= 2; + /* Add 1 to size to ensure room for terminating null. */ + tem = (char *) xrealloc (buf, bufp->size + 1); + bufp->ptr = (bufp->ptr - buf) + tem; + append_end = (append_end - buf) + tem; + bufp->beg = buf = tem; + } + } + else + { + append_end -= bufp->ptr - buf; + bcopy (bufp->ptr, buf, bufp->full -= bufp->ptr - buf); + bufp->ptr = buf; + } + if (!(nread = read (fd, buf + bufp->full, bufp->size - bufp->full))) + bufp->ateof = 1; + bufp->full += nread; + buf[bufp->full] = 0; + } + return end + 1; +} + +#ifdef TEST + +#include + +main (argc, argv) + int argc; + char **argv; +{ + char *term; + char *buf; + + term = argv[1]; + printf ("TERM: %s\n", term); + + buf = (char *) tgetent (0, term); + if ((int) buf <= 0) + { + printf ("No entry.\n"); + return 0; + } + + printf ("Entry: %s\n", buf); + + tprint ("cm"); + tprint ("AL"); + + printf ("co: %d\n", tgetnum ("co")); + printf ("am: %d\n", tgetflag ("am")); +} + +tprint (cap) + char *cap; +{ + char *x = tgetstr (cap, 0); + register char *y; + + printf ("%s: ", cap); + if (x) + { + for (y = x; *y; y++) + if (*y <= ' ' || *y == 0177) + printf ("\\%0o", *y); + else + putchar (*y); + free (x); + } + else + printf ("none"); + putchar ('\n'); +} + +#endif /* TEST */ + diff --git a/linux-0.11-lab/newlibc/termcap/termcap.h b/linux-0.11-lab/newlibc/termcap/termcap.h new file mode 100644 index 0000000..9cd702b --- /dev/null +++ b/linux-0.11-lab/newlibc/termcap/termcap.h @@ -0,0 +1,42 @@ +/* Header file for termcap library. */ + +#ifdef __STDC__ + +extern int tgetent (char *buffer, char *termtype); + +extern int tgetnum (char *name); +extern int tgetflag (char *name); +extern char *tgetstr (char *name, char **area); + +extern char PC; +extern short ospeed; +extern int tputs (char *string, int nlines, int (*outfun) ()); + +extern char *tparam (char *ctlstring, char *buffer, int size, ...); + +extern char *UP; +extern char *BC; + +extern char *tgoto (char *cstring, int hpos, int vpos); + +#else /* not ANSI C */ + +extern int tgetent (); + +extern int tgetnum (); +extern int tgetflag (); +extern char *tgetstr (); + +extern char PC; +extern short ospeed; + +extern int tputs (); + +extern char *tparam (); + +extern char *UP; +extern char *BC; + +extern char *tgoto (); + +#endif /* not ANSI C */ diff --git a/linux-0.11-lab/newlibc/termcap/tparam.c b/linux-0.11-lab/newlibc/termcap/tparam.c new file mode 100644 index 0000000..ff5bfae --- /dev/null +++ b/linux-0.11-lab/newlibc/termcap/tparam.c @@ -0,0 +1,283 @@ +/* Merge parameters into a termcap entry string. + Copyright (C) 1985, 1987 Free Software Foundation, Inc. + +This file is part of GNU Emacs. + +GNU Emacs is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 1, or (at your option) +any later version. + +GNU Emacs is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with GNU Emacs; see the file COPYING. If not, write to +the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA. */ + + +/* config.h may rename various library functions such as malloc. */ +#ifdef emacs +#include "config.h" +#else +#if defined(USG) || defined(STDC_HEADERS) +#ifdef __STDC__ +#include +#include +#endif +#define bcopy(s, d, n) memcpy ((d), (s), (n)) +#endif +#endif + +/* Assuming STRING is the value of a termcap string entry + containing `%' constructs to expand parameters, + merge in parameter values and store result in block OUTSTRING points to. + LEN is the length of OUTSTRING. If more space is needed, + a block is allocated with `malloc'. + + The value returned is the address of the resulting string. + This may be OUTSTRING or may be the address of a block got with `malloc'. + In the latter case, the caller must free the block. + + The fourth and following args to tparam serve as the parameter values. */ + +static char *tparam1 (); + +/* VARARGS 2 */ +char * +tparam (string, outstring, len, arg0, arg1, arg2, arg3) + char *string; + char *outstring; + int len; + int arg0, arg1, arg2, arg3; +{ +#ifdef NO_ARG_ARRAY + int arg[4]; + arg[0] = arg0; + arg[1] = arg1; + arg[2] = arg2; + arg[3] = arg3; + return tparam1 (string, outstring, len, 0, 0, arg); +#else + return tparam1 (string, outstring, len, 0, 0, &arg0); +#endif +} + +char *BC; +char *UP; + +static char tgoto_buf[50]; + +char * +tgoto (cm, hpos, vpos) + char *cm; + int hpos, vpos; +{ + int args[2]; + if (!cm) + return 0; + args[0] = vpos; + args[1] = hpos; + return tparam1 (cm, tgoto_buf, 50, UP, BC, args); +} + +static char * +tparam1 (string, outstring, len, up, left, argp) + char *string; + char *outstring; + int len; + char *up, *left; + register int *argp; +{ + register int c; + register char *p = string; + register char *op = outstring; + char *outend; + int outlen = 0; + + register int tem; + int *oargp = argp; + int doleft = 0; + int doup = 0; + + outend = outstring + len; + + while (1) + { + /* If the buffer might be too short, make it bigger. */ + if (op + 5 >= outend) + { + register char *new; + if (outlen == 0) + { + new = (char *) malloc (outlen = 40 + len); + outend += 40; + bcopy (outstring, new, op - outstring); + } + else + { + outend += outlen; + new = (char *) realloc (outstring, outlen *= 2); + } + op += new - outstring; + outend += new - outstring; + outstring = new; + } + if (!(c = *p++)) + break; + if (c == '%') + { + c = *p++; + tem = *argp; + switch (c) + { + case 'd': /* %d means output in decimal */ + if (tem < 10) + goto onedigit; + if (tem < 100) + goto twodigit; + case '3': /* %3 means output in decimal, 3 digits. */ + if (tem > 999) + { + *op++ = tem / 1000 + '0'; + tem %= 1000; + } + *op++ = tem / 100 + '0'; + case '2': /* %2 means output in decimal, 2 digits. */ + twodigit: + tem %= 100; + *op++ = tem / 10 + '0'; + onedigit: + *op++ = tem % 10 + '0'; + argp++; + break; + + case 'C': + /* For c-100: print quotient of value by 96, if nonzero, + then do like %+ */ + if (tem >= 96) + { + *op++ = tem / 96; + tem %= 96; + } + case '+': /* %+x means add character code of char x */ + tem += *p++; + case '.': /* %. means output as character */ + if (left) + { + /* If want to forbid output of 0 and \n and \t, + and this is one of them, increment it. */ + while (tem == 0 || tem == '\n' || tem == '\t') + { + tem++; + if (argp == oargp) + doup++, outend -= strlen (up); + else + doleft++, outend -= strlen (left); + } + } + *op++ = tem | 0200; + case 'f': /* %f means discard next arg */ + argp++; + break; + + case 'b': /* %b means back up one arg (and re-use it) */ + argp--; + break; + + case 'r': /* %r means interchange following two args */ + argp[0] = argp[1]; + argp[1] = tem; + oargp++; + break; + + case '>': /* %>xy means if arg is > char code of x, */ + if (argp[0] > *p++) /* then add char code of y to the arg, */ + argp[0] += *p; /* and in any case don't output. */ + p++; /* Leave the arg to be output later. */ + break; + + case 'a': /* %a means arithmetic */ + /* Next character says what operation. + Add or subtract either a constant or some other arg */ + /* First following character is + to add or - to subtract + or = to assign. */ + /* Next following char is 'p' and an arg spec + (0100 plus position of that arg relative to this one) + or 'c' and a constant stored in a character */ + tem = p[2] & 0177; + if (p[1] == 'p') + tem = argp[tem - 0100]; + if (p[0] == '-') + argp[0] -= tem; + else if (p[0] == '+') + argp[0] += tem; + else if (p[0] == '*') + argp[0] *= tem; + else if (p[0] == '/') + argp[0] /= tem; + else + argp[0] = tem; + + p += 3; + break; + + case 'i': /* %i means add one to arg, */ + argp[0] ++; /* and leave it to be output later. */ + argp[1] ++; /* Increment the following arg, too! */ + break; + + case '%': /* %% means output %; no arg. */ + goto ordinary; + + case 'n': /* %n means xor each of next two args with 140 */ + argp[0] ^= 0140; + argp[1] ^= 0140; + break; + + case 'm': /* %m means xor each of next two args with 177 */ + argp[0] ^= 0177; + argp[1] ^= 0177; + break; + + case 'B': /* %B means express arg as BCD char code. */ + argp[0] += 6 * (tem / 10); + break; + + case 'D': /* %D means weird Delta Data transformation */ + argp[0] -= 2 * (tem % 16); + break; + } + } + else + /* Ordinary character in the argument string. */ + ordinary: + *op++ = c; + } + *op = 0; + while (doup-- > 0) + strcat (op, up); + while (doleft-- > 0) + strcat (op, left); + return outstring; +} + +#ifdef DEBUG + +main (argc, argv) + int argc; + char **argv; +{ + char buf[50]; + int args[3]; + args[0] = atoi (argv[2]); + args[1] = atoi (argv[3]); + args[2] = atoi (argv[4]); + tparam1 (argv[1], buf, "LEFT", "UP", args); + printf ("%s\n", buf); + return 0; +} + +#endif /* DEBUG */ diff --git a/linux-0.11-lab/newlibc/termcap/tput.c b/linux-0.11-lab/newlibc/termcap/tput.c new file mode 100644 index 0000000..256ac4b --- /dev/null +++ b/linux-0.11-lab/newlibc/termcap/tput.c @@ -0,0 +1,341 @@ +/* tput -- shell-level interface to terminfo, emulated by termcap. + Copyright (C) 1989 Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ + +/* Usage: tput [-T termtype] [+terminal=termtype] capability [parameter...] + + Options: + -T termtype + +terminal=termtype Override $TERM. + + Link with -ltermcap. + Requires the GNU termcap library. + Also requires the bsearch library function. + + David MacKenzie */ + +#include +#include +#include +#include +#include +#include "tput.h" + +#ifndef SIGTYPE +#define SIGTYPE void +#endif + +/* Exit codes. */ +#define CAP_PRESENT 0 /* Normal operation. */ +#define BOOLEAN_FALSE 1 /* Boolean capability not present. */ +#define USAGE_ERROR 2 /* Invalid arguments given. */ +#define UNKNOWN_TERM 3 /* $TERM not found in termcap file. */ +#define MISSING_CAP 4 /* Termcap entry lacks this capability. */ +#define ERROR_EXIT 5 /* Real error or signal. */ + +char *bsearch (); +char *getenv (); + +int info_compare (); +SIGTYPE signal_handler (); +int tcputchar (); +struct conversion *find_info (); +void put_bool (); +void put_num (); +void put_str (); +void restore_translations (); +void translations_off (); +void setup_termcap (); +void usage (); + +/* The name this program was run with, for error messages. */ +char *program_name; + +struct option long_options[] = +{ + {"terminal", 1, NULL, 0}, + {NULL, 0, NULL, 0} +}; + +void +main (argc, argv) + int argc; + char **argv; +{ + struct conversion *conv; /* Conversion table entry. */ + char *term; /* Terminal type. */ + int c; /* Option character. */ + + program_name = argv[0]; + term = getenv ("TERM"); + + while ((c = getopt_long (argc, argv, "T:", long_options, (int *) 0)) != EOF) + { + switch (c) + { + case 0: + break; + + case 'T': + term = optarg; + break; + + default: + usage (); + } + } + + if (optind == argc) + usage (); + + setup_termcap (term); + + conv = find_info (argv[optind]); + if (conv == NULL) + { + fprintf (stderr, "%s: Unknown terminfo capability `%s'\n", + program_name, argv[optind]); + exit (MISSING_CAP); + } + + ++optind; + + if (conv->type & NUM) + put_num (conv); + else if (conv->type & BOOL) + put_bool (conv); + else + put_str (conv, argv, argc); + + exit (CAP_PRESENT); +} + +/* Return a pointer to the conversion table entry for terminfo + capability INFONAME. + Return NULL if INFONAME is not a valid terminfo capability. */ + +struct conversion * +find_info (infoname) + char *infoname; +{ + struct conversion conv; + + conv.info = infoname; + return (struct conversion *) + bsearch ((char *) &conv, (char *) conversions, CAPABILITIES, + sizeof (struct conversion), info_compare); +} + +/* Terminfo capability name comparison function for bsearch. */ + +int +info_compare (conv1, conv2) + struct conversion *conv1, *conv2; +{ + return strcmp (conv1->info, conv2->info); +} + +void +put_num (conv) + struct conversion *conv; +{ + printf ("%d\n", tgetnum (conv->cap)); +} + +void +put_bool (conv) + struct conversion *conv; +{ + if (!tgetflag (conv->cap)) + exit (BOOLEAN_FALSE); +} + +void +put_str (conv, argv, argc) + struct conversion *conv; + char **argv; + int argc; +{ + char *string_value; /* String capability. */ + int lines_affected; /* Number of lines affected by capability. */ + + string_value = tgetstr (conv->cap, (char **) NULL); + if (string_value == NULL) + exit (MISSING_CAP); + + if (!strcmp (conv->cap, "cm")) + { + BC = tgetstr ("le", (char **) NULL); + UP = tgetstr ("up", (char **) NULL); + + /* The order of command-line arguments is `vertical horizontal'. + If horizontal is not given, it defaults to 0. */ + switch (argc - optind) + { + case 0: + break; + case 1: + string_value = tgoto (string_value, 0, atoi (argv[optind])); + break; + default: + string_value = tgoto (string_value, + atoi (argv[optind + 1]), atoi (argv[optind])); + break; + } + } + else + /* Although the terminfo `sgr' capability can take 9 parameters, + the GNU tparam function only accepts up to 4. + I don't know whether tparam could interpret an `sgr' + capability reasonably even if it could accept that many + parameters. For now, we'll live with the 4-parameter limit. */ + switch (argc - optind) + { + case 0: + break; + case 1: + string_value = tparam (string_value, (char *) NULL, 0, + atoi (argv[optind])); + break; + case 2: + string_value = tparam (string_value, (char *) NULL, 0, + atoi (argv[optind]), + atoi (argv[optind + 1])); + break; + case 3: + string_value = tparam (string_value, (char *) NULL, 0, + atoi (argv[optind]), + atoi (argv[optind + 1]), + atoi (argv[optind + 2])); + break; + default: + string_value = tparam (string_value, (char *) NULL, 0, + atoi (argv[optind]), + atoi (argv[optind + 1]), + atoi (argv[optind + 2]), + atoi (argv[optind + 3])); + break; + } + + /* Since we don't know where the cursor is, we have to be + pessimistic for capabilities that need padding proportional to + the number of lines affected, and tell them that the whole + screen is affected. */ + if (conv->type & PAD) + lines_affected = tgetnum ("li"); + else + lines_affected = 1; + + if (lines_affected < 1) + lines_affected = 1; + + translations_off (); + tputs (string_value, lines_affected, tcputchar); + fflush (stdout); + restore_translations (); +} + +/* Output function for tputs. */ + +int +tcputchar (c) + char c; +{ + putchar (c & 0x7f); + return c; +} + +/* Read in the needed termcap strings for terminal type TERM. */ + +void +setup_termcap (term) + char *term; +{ + char *tc_pc; /* "pc" termcap string. */ + + if (term == NULL) + { + fprintf (stderr, "%s: No value for $TERM and no -T specified\n", + program_name); + exit (UNKNOWN_TERM); + } + switch (tgetent ((char *) NULL, term)) + { + case 0: + fprintf (stderr, "%s: Unknown terminal type `%s'\n", program_name, term); + exit (UNKNOWN_TERM); + case -1: + fprintf (stderr, "%s: No termcap database\n", program_name); + exit (UNKNOWN_TERM); + } + + tc_pc = tgetstr ("pc", (char **) NULL); + PC = tc_pc ? *tc_pc : 0; +} + +struct sgttyb old_modes, new_modes; + +/* Turn off expansion of tabs into spaces, saving the old + terminal settings first. + Also set OSPEED. */ + +void +translations_off () +{ + if (isatty (1)) + { + gtty (1, &old_modes); + + if (signal (SIGINT, SIG_IGN) != SIG_IGN) + signal (SIGINT, signal_handler); + if (signal (SIGHUP, SIG_IGN) != SIG_IGN) + signal (SIGHUP, signal_handler); + if (signal (SIGQUIT, SIG_IGN) != SIG_IGN) + signal (SIGQUIT, signal_handler); + signal (SIGTERM, signal_handler); + + new_modes = old_modes; + new_modes.sg_flags &= ~XTABS; + stty (1, &new_modes); + ospeed = old_modes.sg_ospeed; + } + else + ospeed = 0; +} + +/* Restore the old terminal settings. */ + +void +restore_translations () +{ + stty (1, &old_modes); +} + +SIGTYPE +signal_handler () +{ + restore_translations (); + exit (ERROR_EXIT); +} + +void +usage () +{ + fprintf (stderr, "\ +Usage: %s [-T termtype] [+terminal=termtype] capability [parameter...]\n", + program_name); + exit (USAGE_ERROR); +} diff --git a/linux-0.11-lab/newlibc/termcap/tput.h b/linux-0.11-lab/newlibc/termcap/tput.h new file mode 100644 index 0000000..988b93a --- /dev/null +++ b/linux-0.11-lab/newlibc/termcap/tput.h @@ -0,0 +1,35 @@ +/* tput.h -- constants and declarations for tput + Copyright (C) 1989 Free Software Foundation, Inc. + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; either version 2, or (at your option) + any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. */ + +/* Capability types. */ +#define BOOL 1 /* Boolean capability. */ +#define NUM 2 /* Numeric capability. */ +#define STR 4 /* String capability. */ +#define PAD 8 /* String accepts padding. */ + +struct conversion +{ + char *info; /* Terminfo name. */ + char *cap; /* Termcap name. */ + char type; /* Capability type. */ +}; + +/* The number of entries in `conversions'. */ + +#define CAPABILITIES 310 + +extern struct conversion conversions[]; diff --git a/linux-0.11-lab/newlibc/termcap/tput.texinfo b/linux-0.11-lab/newlibc/termcap/tput.texinfo new file mode 100644 index 0000000..09d9720 --- /dev/null +++ b/linux-0.11-lab/newlibc/termcap/tput.texinfo @@ -0,0 +1,651 @@ +\input texinfo @c -*-texinfo-*- +@c %**start of header +@setfilename tput.info +@settitle @code{tput}: Portable Terminal Control for Shell Scripts +@setchapternewpage odd +@c %**end of header + +@ifinfo +This file documents the the GNU @code{tput} command for translating +terminal capability names into escape and control codes for a particular +terminal. + +Copyright @copyright{} 1989-1991 Free Software Foundation, Inc. + +Permission is granted to make and distribute verbatim copies of +this manual provided the copyright notice and this permission notice +are preserved on all copies. + +@ignore +Permission is granted to process this file through TeX and print the +results, provided the printed document carries copying permission +notice identical to this one except for the removal of this paragraph +(this paragraph not being relevant to the printed manual). + +@end ignore +Permission is granted to copy and distribute modified versions of this +manual under the conditions for verbatim copying, provided that the entire +resulting derived work is distributed under the terms of a permission +notice identical to this one. + +Permission is granted to copy and distribute translations of this manual +into another language, under the above conditions for modified versions, +except that this permission notice may be stated in a translation approved +by the Foundation. +@end ifinfo + +@titlepage +@title The GNU @code{tput} Command +@subtitle Portable Terminal Control for Shell Scripts + +@page +@vskip 0pt plus 1filll +Copyright @copyright{} 1989-1991 Free Software Foundation, Inc. + +Permission is granted to make and distribute verbatim copies of +this manual provided the copyright notice and this permission notice +are preserved on all copies. + +Permission is granted to copy and distribute modified versions of this +manual under the conditions for verbatim copying, provided that the entire +resulting derived work is distributed under the terms of a permission +notice identical to this one. + +Permission is granted to copy and distribute translations of this manual +into another language, under the above conditions for modified versions, +except that this permission notice may be stated in a translation approved +by the Foundation. +@end titlepage + +@node Top, , (dir), (dir) +@comment node-name, next, previous, up +@chapter @code{tput}: Portable Terminal Control for Shell Scripts + +The @code{tput} command translates the terminal-independent name of a +terminal capability into its actual value for the terminal type being +used. This allows shell scripts to do things like clear the screen, +underline text, and center text no matter how wide the screen is. + +@code{tput} takes as an argument the name of a Unix System V terminfo +capability, which it translates into the equivalent termcap capability +name (@pxref{Capabilities}, for a list of the equivalencies). + +There are three types of terminfo (and termcap) capabilities: string, +Boolean, and numeric. String capabilities either cause a special +effect on the terminal when they are displayed or are the value sent by +a special key on the terminal (the latter type are probably of no use +in shell scripts). Numeric and Boolean capabilities give +information about the terminal such as how many columns wide it is or +whether whether it has a meta key. @xref{Output}, for more detailed +information on the three types of capabilities. + +The format of the @code{tput} command is illustrated below, with the +optional portions in square brackets, @samp{[@dots{}]}: + +@example +tput [-T @var{terminal-type}] [+terminal=@var{terminal-type}] @var{capability} [@var{parameter} @dots{}] +@end example + +Here is an example of how to clear the terminal screen using @code{tput}: + +@example +tput clear +@end example + +@menu +* Using tput:: Using the @code{tput} command. +* Output:: Output and exit status. +* More Examples:: More examples of using @code{tput}. +* Capabilities:: Summary of terminfo capabilities. +* Error Messages:: Error messages produced by @code{tput}. +* Notes:: Miscellaneous information about @code{tput}. +@end menu + +@node Using tput, Output, , Top +@c node-name, next, previous, up +@section Using the @code{tput} Command + +The format of the @code{tput} command is illustrated below, with the +optional portions in square brackets, @samp{[@dots{}]}: + +@example +tput [-T @var{terminal-type}] [+terminal=@var{terminal-type}] @var{capability} [@var{parameter} @dots{}] +@end example + +Some string capabilities accept parameters, such as the number of lines +to delete or the column to move to. These parameters are specified on +the command line following the capability name. They are always numbers. + +@table @samp +@item -T @var{termtype} +@itemx +terminal=@var{termtype} +This option indicates the type of terminal. By default, this value is +taken from the @samp{TERM} environment variable. +@end table + +Below are some example uses of @code{tput}. @xref{Capabilities}, for +a complete list of the functions that @code{tput} can cause terminals to +perform. Note that not all terminals can perform any given function. +@xref{More Examples}, for some more complex samples of @code{tput} use. + +The following command moves the cursor to row 10, column 30 of the screen: + +@example +tput cup 10 30 +@end example + +The following command makes the cursor invisible: + +@example +tput civis +@end example + +The following command makes the cursor visible again: + +@example +tput cnorm +@end example + +The following command deletes 10 lines below and including the one +on which the cursor is positioned: + +@example +tput dl 10 +@end example + +@node Output, More Examples, Using tput, Top +@comment node-name, next, previous, up +@section Output and Exit Status + +The @code{tput} command produces different kinds of output for each of +the three types of terminal capabilities: string, numeric, and Boolean. + +If the terminfo capability given on the command line is a string +capability, @code{tput} displays its value and exits with a status of 0. +If the capability is not defined for the terminal type being used, +@code{tput} produces no output and exits with a status of 1. + +If the capability is a numeric capability, @code{tput} displays its +value (an integer). If the capability is not defined for the terminal +type being used, @code{tput} displays the value @samp{-1}. The exit +status is always 0 for numeric capabilities, unless an error occurs +(@pxref{Notes} for a complete list of the possible exit status +values).@refill + +If the capability is a Boolean capability, @code{tput} produces no +output and exits with status 0 if the capability is defined for the +terminal type being used, or status 1 if the capability is not defined. +@xref{Capabilities,,Definitions of the Terminal Capabilities,termcap,Termcap}, +for a more detailed description of termcap capabilities.@refill + +The values of numeric capabilities should be saved into shell +variables so they can be used later without having to run @code{tput} +again. Here is how it can be done: + +@example +For the Bourne, Bourne-again, and Korn shells: + +To set an environment variable: COLUMNS=`tput cols` export COLUMNS + +To set a local variable: tabwidth=`tput it` + +For the C shell: + +To set an environment variable: setenv COLUMNS `tput cols` + +To set a local variable: set tabwidth = `tput it` +@end example + +@noindent +The values of string capabilities can be saved in shell variables in the +same way, then displayed later using the @code{echo} command. Since +@code{echo} is built into most shells, it runs more quickly than +@code{tput} does. However, using @code{echo} instead of @code{tput} to +display string values can cause problems for capabilities that use +padding, because null padding characters cannot be passed as arguments +to commands, including @code{echo}. + +@node More Examples, Capabilities, Output, Top +@c node-name, next, previous, up +@section Yet More Examples + +Here are some more advanced examples of using @code{tput}; most involve +some shell programming. Because the C shell's flow control (decision +making) constructs differ from those of the other shells, these +examples do not work under the C shell. + +The following sequence of commands prints @samp{I am infalible} and +then crosses it out on terminals that can overstrike, and prints +@samp{I am on strike} on terminals that cannot. + +@example +if tput os; then + echo 'I am infalible\r- -- ---------' +else + echo 'I am on strike' +fi +@end example + +The following example is a shell script that centers a line of text +given as command line arguments. An alternative approach would be to +have @code{tput} send the @samp{rep} terminfo capability to print the +multiple spaces instead of using the @code{while} loop. + +@example +COLUMNS=`tput cols` export COLUMNS # Get screen width. +echo "$@@" | awk ' +@{ spaces = ('$COLUMNS' - length) / 2 + while (spaces-- > 0) printf (" ") + print +@}' +@end example + +The following commands cause the terminal to save the current cursor +position, print @samp{Hello, World} centered in the screen in reverse +video, then return to the original cursor position. + +@example +COLUMNS=`tput cols` +LINES=`tput lines` +line=`expr $LINES / 2` +column=`expr \( $COLUMNS - 6 \) / 2` +tput sc +tput cup $line $column +tput rev +echo 'Hello, World' +tput sgr0 +tput rc +@end example + +@node Capabilities, Error Messages, More Examples, Top +@c node-name, next, previous, up +@section Capabilities + +@subsection Boolean Capabilities + +@example +Name Termcap Description + Equiv. + +am am Has automatic margins +bw bw @samp{cub1} wraps from column 0 to last column +chts HC Cursor is hard to see +da da Display may be retained above screen +db db Display may be retained below screen +eo eo Can erase overstrikes with a blank +eslok es Using escape on status line is ok +gn gn Generic line type (e.g., @samp{dialup}, @samp{switch}) +hc hc Hardcopy terminal +hs hs Has a status line +hz hz Hazeltine; cannot print tildes +in in Insert mode distinguishes nulls +km km Has a meta key (a shift that sets parity bit) +mc5i 5i Data sent to printer does not echo on screen +mir mi Safe to move while in insert mode +msgr ms Safe to move in standout modes +npc NP No pad character is needed +nrrmc NR @samp{smcup} does not reverse @samp{rmcup} +nxon nx Padding does not work; xon/xoff is required +os os Overstrikes +ul ul Underline character overstrikes +xenl xn Newline ignored after 80 columns (Concept) +xhp xs Standout is not erased by overwriting (HP) +xon xo Uses xon/xoff handshaking +xsb xb Beehive (f1=escape, f2=ctrl-c) +xt xt Tabs are destructive, magic @samp{smso} (t1061) +@end example + +@subsection Numeric Capabilities + +@example +Name Termcap Description + Equiv. + +cols co Number of columns in a line +it it Width of initial tab settings +lh lh Number of rows in each label +lines li Number of lines on screen or page +lm lm Lines of memory if > @samp{lines}; 0 means varies +lw lw Number of columns in each label +nlab Nl Number of labels on screen (start at 1) +pb pb Lowest baud rate where padding is needed +vt vt Virtual terminal number (CB/Unix) +wsl ws Number of columns in status line +xmc sg Number of blanks left by @samp{smso} or @samp{rmso} +@end example + +@subsection String Capabilities + +In the following table, @samp{(P)} following an explanation means +that the capability takes one or more parameters (and is evaluated by +the @code{tparam} function, or in the case of @samp{cup}, +@code{tgoto}); @samp{(*)} means that padding may be based on the +number of lines affected; and @samp{#n} refers to the @samp{n}th +parameter.@refill + +@example +Name Termcap Description + Equiv. + +acsc ac Graphic character set pairs aAbBcC - default vt100 +bel bl Ring bell (beep) +blink mb Begin blinking mode +bold md Begin double intensity mode +cbt bt Back tab +civis vi Make cursor invisible +clear cl Clear screen (*) +cmdch CC Settable command character in prototype +cnorm ve Make cursor normal (undo @samp{cvvis} & @samp{civis)} +cr cr Carriage return (*) +csr cs Change scrolling region to lines #1 through #2 (P) +cub LE Move cursor left #1 spaces (P) +cub1 le Move cursor left one space +cud DO Move cursor down #1 lines (P*) +cud1 do Move cursor down one line +cuf RI Move cursor right #1 spaces (P*) +cuf1 nd Move cursor right one space +cup cm Move cursor to row #1, column #2 of screen (P) +cuu UP Move cursor up #1 lines (P*) +cuu1 up Move cursor up one line +cvvis vs Make cursor very visible +dch DC Delete #1 characters (P*) +dch1 dc Delete one character (*) +dim mh Begin half intensity mode +dl DL Delete #1 lines (P*) +dl1 dl Delete one line (*) +dsl ds Disable status line +ech ec Erase #1 characters (P) +ed cd Clear to end of display (*) +el ce Clear to end of line +el1 cb Clear to beginning of line, inclusive +enacs eA Enable alternate character set +ff ff Form feed for hardcopy terminal (*) +flash vb Visible bell (must not move cursor) +fsl fs Return from status line +hd hd Move cursor down one-half line +home ho Home cursor (if no @samp{cup}) +hpa ch Move cursor to column #1 (P) +ht ta Tab to next 8 space hardware tab stop +hts st Set a tab in all rows, current column +hu hu Move cursor up one-half line +ich IC Insert #1 blank characters (P*) +ich1 ic Insert one blank character +if if Name of file containing initialization string +il AL Add #1 new blank lines (P*) +il1 al Add one new blank line (*) +ind sf Scroll forward (up) one line +indn SF Scroll forward #1 lines (P) +invis mk Begin invisible text mode +ip ip Insert pad after character inserted (*) +iprog iP Path of program for initialization +is1 i1 Terminal initialization string +is2 is Terminal initialization string +is3 i3 Terminal initialization string +kBEG &9 Shifted beginning key +kCAN &0 Shifted cancel key +kCMD *1 Shifted command key +kCPY *2 Shifted copy key +kCRT *3 Shifted create key +kDC *4 Shifted delete char key +kDL *5 Shifted delete line key +kEND *7 Shifted end key +kEOL *8 Shifted clear line key +kEXT *9 Shifted exit key +kFND *0 Shifted find key +kHLP #1 Shifted help key +kHOM #2 Shifted home key +kIC #3 Shifted input key +kLFT #4 Shifted left arrow key +kMOV %b Shifted move key +kMSG %a Shifted message key +kNXT %c Shifted next key +kOPT %d Shifted options key +kPRT %f Shifted print key +kPRV %e Shifted prev key +kRDO %g Shifted redo key +kRES %j Shifted resume key +kRIT %i Shifted right arrow +kRPL %h Shifted replace key +kSAV !1 Shifted save key +kSPD !2 Shifted suspend key +kUND !3 Shifted undo key +ka1 K1 Upper left of keypad +ka3 K3 Upper right of keypad +kb2 K2 Center of keypad +kbeg @@1 Beginning key +kbs kb Backspace key +kc1 K4 Lower left of keypad +kc3 K5 Lower right of keypad +kcan @@2 Cancel key +kcbt kB Back tab key +kclo @@3 Close key +kclr kC Clear screen or erase key +kcmd @@4 Command key +kcpy @@5 Copy key +kcrt @@6 Create key +kctab kt Clear tab key +kcub1 kl Left arrow key +kcud1 kd Down arrow key +kcuf1 kr Right arrow key +kcuu1 ku Up arrow key +kdch1 kD Delete character key +kdl1 kL Delete line key +ked kS Clear to end of screen key +kel kE Clear to end of line key +kend @@7 End key +kent @@8 Enter/send key (unreliable) +kext @@9 Exit key +kf0 k0 Function key f0 +kf1 k1 Function key f1 +kf10 k; Function key f10 +kf11 F1 Function key f11 +kf12 F2 Function key f12 +kf13 F3 Function key f13 +kf14 F4 Function key f14 +kf15 F5 Function key f15 +kf16 F6 Function key f16 +kf17 F7 Function key f17 +kf18 F8 Function key f18 +kf19 F9 Function key f19 +kf2 k2 Function key f2 +kf20 FA Function key f20 +kf21 FB Function key f21 +kf22 FC Function key f22 +kf23 FD Function key f23 +kf24 FE Function key f24 +kf25 FF Function key f25 +kf26 FG Function key f26 +kf27 FH Function key f27 +kf28 FI Function key f28 +kf29 FJ Function key f29 +kf3 k3 Function key f3 +kf30 FK Function key f30 +kf31 FL Function key f31 +kf32 FM Function key f32 +kf33 FN Function key f13 +kf34 FO Function key f34 +kf35 FP Function key f35 +kf36 FQ Function key f36 +kf37 FR Function key f37 +kf38 FS Function key f38 +kf39 FT Function key f39 +kf4 k4 Function key f4 +kf40 FU Function key f40 +kf41 FV Function key f41 +kf42 FW Function key f42 +kf43 FX Function key f43 +kf44 FY Function key f44 +kf45 FZ Function key f45 +kf46 Fa Function key f46 +kf47 Fb Function key f47 +kf48 Fc Function key f48 +kf49 Fd Function key f49 +kf5 k5 Function key f5 +kf50 Fe Function key f50 +kf51 Ff Function key f51 +kf52 Fg Function key f52 +kf53 Fh Function key f53 +kf54 Fi Function key f54 +kf55 Fj Function key f55 +kf56 Fk Function key f56 +kf57 Fl Function key f57 +kf58 Fm Function key f58 +kf59 Fn Function key f59 +kf6 k6 Function key f6 +kf60 Fo Function key f60 +kf61 Fp Function key f61 +kf62 Fq Function key f62 +kf63 Fr Function key f63 +kf7 k7 Function key f7 +kf8 k8 Function key f8 +kf9 k9 Function key f9 +kfnd @@0 Find key +khlp %1 Help key +khome kh Home key +khts kT Set tab key +kich1 kI Ins char/enter ins mode key +kil1 kA Insert line key +kind kF Scroll forward/down key +kll kH Home down key +kmov %4 Move key +kmrk %2 Mark key +kmsg %3 Message key +knp kN Next page key +knxt %5 Next object key +kopn %6 Open key +kopt %7 Options key +kpp kP Previous page key +kprt %9 Print or copy key +kprv %8 Previous object key +krdo %0 Redo key +kref &1 Reference key +kres &5 Resume key +krfr &2 Refresh key +kri kR Scroll backward/up key +krmir kM @code{rmir} or @code{smir} in insert mode +krpl &3 Replace key +krst &4 Restart key +ksav &6 Save key +kslt *6 Select key +kspd &7 Suspend key +ktbc ka Clear all tabs key +kund &8 Undo key +lf0 l0 Label on function key f0 if not @samp{f0} +lf1 l1 Label on function key f1 if not @samp{f1} +lf10 la Label on function key f10 if not @samp{f10} +lf2 l2 Label on function key f2 if not @samp{f2} +lf3 l3 Label on function key f3 if not @samp{f3} +lf4 l4 Label on function key f4 if not @samp{f4} +lf5 l5 Label on function key f5 if not @samp{f5} +lf6 l6 Label on function key f6 if not @samp{f6} +lf7 l7 Label on function key f7 if not @samp{f7} +lf8 l8 Label on function key f8 if not @samp{f8} +lf9 l9 Label on function key f9 if not @samp{f9} +ll ll Go to last line, first column (if no @samp{cup}) +mc0 ps Print screen contents +mc4 pf Turn printer off +mc5 po Turn printer on +mc5p pO Turn printer on for #1 bytes (P) +mgc MC Clear left and right soft margins +mrcup CM Move cursor to row #1, column #2 of memory (P) +nel nw Newline (like cr followed by lf) +pad pc Pad character (rather than nul) +pfkey pk Program function key #1 to type string #2 (P) +pfloc pl Program function key #1 to execute string #2 (P) +pfx px Program function key #1 to transmit string #2 (P) +pln pn Program label #1 to show string #2 (P) +prot mp Begin protected mode +rc rc Restore cursor to position of last @samp{sc} +rep rp Repeat character #1, #2 times (P*) +rev mr Begin reverse video mode +rf rf Name of file containing reset string +rfi RF Send next input character (for ptys) +ri sr Scroll backward (down) one line +rin SR Scroll backward #1 lines (P) +rmacs ae End alternate character set +rmam RA Turn off automatic margins +rmcup te String to end programs that use @samp{cup} +rmdc ed End delete mode +rmir ei End insert mode +rmkx ke End keypad transmit mode +rmln LF Turn off soft labels +rmm mo End meta mode +rmp rP Like @samp{ip} but when in replace mode +rmso se End standout mode +rmul ue End underscore mode +rmxon RX Turn off xon/xoff handshaking +rs1 r1 Reset terminal to sane modes +rs2 r2 Reset terminal to sane modes +rs3 r3 Reset terminal to sane modes +sc sc Save cursor position +sgr sa Define video attributes #1 through #9 (P) +sgr0 me Turn off all attributes +smacs as Begin alternate character set +smam SA Turn on automatic margins +smcup ti String to begin programs that use @samp{cup} +smdc dm Begin delete mode +smgl ML Set soft left margin to #1 (P) +smgr MR Set soft right margin to #1 (P) +smir im Begin insert mode +smkx ks Begin keypad transmit mode +smln LO Turn on soft labels +smm mm Begin meta mode (8th bit set) +smso so Begin standout mode +smul us Begin underscore mode +smxon SX Turn on xon/xoff handshaking +tbc ct Clear all tab stops +tsl ts Go to status line, column #1 (P) +uc uc Underscore one character and move past it +vpa cv Move cursor to row #1 (P) +wind wi Set window to lines #1-#2, columns #3-#4 (P) +xoffc XF xoff character +xonc XN xon character +@end example + +@node Error Messages, Notes, Capabilities, Top +@c node-name, next, previous, up +@section Error Messages + +@code{tput} displays various error messages if problems occur. In +addition, it exits with one of the following status values: + +@table @asis +@item 0 +Normal status; the given capability is present. + +@item 1 +The given Boolean or string capability is not present. + +@item 2 +Usage error; @code{tput} was given invalid arguments. + +@item 3 +The terminal type given (either in the @samp{TERM} environment variable +or by the @samp{-T} switch) is unknown, or the termcap database can not +be read. + +@item 4 +The given capability is unknown. +@end table + +@node Notes, , Error Messages, Top +@c node-name, next, previous, up +@section Notes + +Terminfo is a database that is similar to termcap but which has +different capability names and is stored in a different format. The GNU +@code{tput} command takes a terminfo name as an argument to make it +compatible with the Unix System V @code{tput} command; there is no +equivalent command, using termcap, in Berkeley Unix. + +@subsection Bugs + +The @samp{longname}, @samp{init}, and @samp{reset} options of the +System V @code{tput} command are not implemented; however, the @code{tset} +command can perform the latter two functions.@refill + +@subsection Author + +David MacKenzie wrote the GNU @code{tput} command. + +@bye diff --git a/linux-0.11-lab/newlibc/unistd/Makefile b/linux-0.11-lab/newlibc/unistd/Makefile new file mode 100644 index 0000000..bf9527e --- /dev/null +++ b/linux-0.11-lab/newlibc/unistd/Makefile @@ -0,0 +1,53 @@ +# +# Makefile for some ansi-library functions +# + +OBJS = _exit.o access.o acct.o alarm.o brk.o chdir.o chmod.o chown.o \ +chroot.o close.o creat.o dup.o dup2.o exec.o execp.o execve.o fcntl.o \ +fork.o fstat.o getegid.o geteuid.o getgid.o getpid.o getppid.o getuid.o \ +getpgrp.o ioctl.o kill.o link.o lseek.o mkdir.o mknod.o mount.o nice.o \ +open.o pause.o pipe.o read.o rmdir.o setgid.o setpgrp.o setsid.o setuid.o \ +signal.o stat.o stime.o sync.o time.o times.o ulimit.o umask.o umount.o \ +uname.o unlink.o ustat.o utime.o wait.o write.o setreuid.o setregid.o \ +sigsusp.o sigpend.o sethostnam.o gethostnam.o \ +getgroups.o setgroups.o \ +symlink.o lstat.o readlink.o uselib.o +#select.o setrlimit.o getrlimit.o getrusage.o gettime.o settime.o + +LIB =../Libc.a +AR =/usr/local/bin/ar +AS =/usr/local/bin/as +LD =/usr/local/bin/ld +LDFLAGS =-s -x +CC =/usr/local/bin/gcc -B/usr/local/bin/ +INC =-nostdinc \ + -I../include +CFLAGS =-Wall -O -fstrength-reduce -fomit-frame-pointer \ + -finline-functions $(INC) +CPP =$(CC) -E $(INC) + +.c.s: + $(CC) $(CFLAGS) -S -o $*.s $< +.s.o: + $(CC) -c -o $*.o $< + +.c.o: + $(CC) $(CFLAGS) -c -o $*.o $< + +all: library + +library: $(OBJS) + $(AR) uvc $(LIB) $(OBJS) + sync + +clean: + $(RM) -f core *.o *.a tmp_make + for i in *.c;do $(RM) -f `basename $$i .c`.s;done + +dep: + sed '/\#\#\# Dependencies/q' < Makefile > tmp_make + (for i in *.c;do echo -n `echo $$i | sed 's,\.c,\.s,'`" "; \ + $(CPP) -M $$i;done) >> tmp_make + cp tmp_make Makefile + +### Dependencies: diff --git a/linux-0.11-lab/newlibc/unistd/_exit.c b/linux-0.11-lab/newlibc/unistd/_exit.c new file mode 100644 index 0000000..c58ba9d --- /dev/null +++ b/linux-0.11-lab/newlibc/unistd/_exit.c @@ -0,0 +1,12 @@ +#define __LIBRARY__ +#include + +volatile void _exit(int exit_code) +{ +#ifdef PRE_GCC_2 + __asm__("movl %1,%%ebx\n\t" + "int $0x80"::"a" (__NR_exit),"g" (exit_code): "bx"); +#else + __asm__("int $0x80"::"a" (__NR_exit),"b" (exit_code)); +#endif +} diff --git a/linux-0.11-lab/newlibc/unistd/access.c b/linux-0.11-lab/newlibc/unistd/access.c new file mode 100644 index 0000000..e763a80 --- /dev/null +++ b/linux-0.11-lab/newlibc/unistd/access.c @@ -0,0 +1,4 @@ +#define __LIBRARY__ +#include + +_syscall2(int,access,const char *,filename,mode_t,mode) diff --git a/linux-0.11-lab/newlibc/unistd/acct.c b/linux-0.11-lab/newlibc/unistd/acct.c new file mode 100644 index 0000000..b60ea4b --- /dev/null +++ b/linux-0.11-lab/newlibc/unistd/acct.c @@ -0,0 +1,4 @@ +#define __LIBRARY__ +#include + +_syscall1(int,acct,const char *,filename) diff --git a/linux-0.11-lab/newlibc/unistd/alarm.c b/linux-0.11-lab/newlibc/unistd/alarm.c new file mode 100644 index 0000000..fb3fa75 --- /dev/null +++ b/linux-0.11-lab/newlibc/unistd/alarm.c @@ -0,0 +1,4 @@ +#define __LIBRARY__ +#include + +_syscall1(int,alarm,int,sec) diff --git a/linux-0.11-lab/newlibc/unistd/brk.c b/linux-0.11-lab/newlibc/unistd/brk.c new file mode 100644 index 0000000..3f81756 --- /dev/null +++ b/linux-0.11-lab/newlibc/unistd/brk.c @@ -0,0 +1,48 @@ +#define __LIBRARY__ +#include +#include + +#if 1 +extern long _end; + +static void * ___brk_addr = &_end; +#else +void * ___brk_addr = NULL; +#endif + +int brk(void * end_data_seg) +{ +#ifdef PRE_GCC_2 + __asm__ volatile ("movl %0,%%ebx" : : "g" (end_data_seg): "bx"); + __asm__ volatile ("int $0x80" + :"=a" (___brk_addr) + :"0" (__NR_brk)); +#else + __asm__ volatile ("int $0x80" + :"=a" (___brk_addr) + :"0" (__NR_brk),"b" (end_data_seg)); +#endif + if (___brk_addr == end_data_seg) + return 0; + errno = ENOMEM; + return -1; +} + +void * sbrk(ptrdiff_t increment) +{ + void * tmp = ___brk_addr+increment; +#ifdef PRE_GCC_2 + __asm__ volatile ("movl %0,%%ebx" : : "g" (tmp): "bx"); + __asm__ volatile ("int $0x80" + :"=a" (___brk_addr) + :"0" (__NR_brk)); +#else + __asm__ volatile ("int $0x80" + :"=a" (___brk_addr) + :"0" (__NR_brk),"b" (tmp)); +#endif + if (___brk_addr == tmp) + return tmp-increment; + errno = ENOMEM; + return ((void *) -1); +} diff --git a/linux-0.11-lab/newlibc/unistd/chdir.c b/linux-0.11-lab/newlibc/unistd/chdir.c new file mode 100644 index 0000000..140c5a0 --- /dev/null +++ b/linux-0.11-lab/newlibc/unistd/chdir.c @@ -0,0 +1,4 @@ +#define __LIBRARY__ +#include + +_syscall1(int,chdir,const char *,pathname) diff --git a/linux-0.11-lab/newlibc/unistd/chmod.c b/linux-0.11-lab/newlibc/unistd/chmod.c new file mode 100644 index 0000000..b9488c5 --- /dev/null +++ b/linux-0.11-lab/newlibc/unistd/chmod.c @@ -0,0 +1,4 @@ +#define __LIBRARY__ +#include + +_syscall2(int,chmod,const char *,filename,mode_t,mode) diff --git a/linux-0.11-lab/newlibc/unistd/chown.c b/linux-0.11-lab/newlibc/unistd/chown.c new file mode 100644 index 0000000..6b6c1d0 --- /dev/null +++ b/linux-0.11-lab/newlibc/unistd/chown.c @@ -0,0 +1,4 @@ +#define __LIBRARY__ +#include + +_syscall3(int,chown,const char *,filename,uid_t,owned,gid_t,group) diff --git a/linux-0.11-lab/newlibc/unistd/chroot.c b/linux-0.11-lab/newlibc/unistd/chroot.c new file mode 100644 index 0000000..fd1848b --- /dev/null +++ b/linux-0.11-lab/newlibc/unistd/chroot.c @@ -0,0 +1,4 @@ +#define __LIBRARY__ +#include + +_syscall1(int,chroot,const char *,pathname) diff --git a/linux-0.11-lab/newlibc/unistd/close.c b/linux-0.11-lab/newlibc/unistd/close.c new file mode 100644 index 0000000..182d7eb --- /dev/null +++ b/linux-0.11-lab/newlibc/unistd/close.c @@ -0,0 +1,4 @@ +#define __LIBRARY__ +#include + +_syscall1(int,close,int,fd) diff --git a/linux-0.11-lab/newlibc/unistd/creat.c b/linux-0.11-lab/newlibc/unistd/creat.c new file mode 100644 index 0000000..2b94677 --- /dev/null +++ b/linux-0.11-lab/newlibc/unistd/creat.c @@ -0,0 +1,4 @@ +#define __LIBRARY__ +#include + +_syscall2(int,creat,const char *,filename,mode_t,mode) diff --git a/linux-0.11-lab/newlibc/unistd/dup.c b/linux-0.11-lab/newlibc/unistd/dup.c new file mode 100644 index 0000000..03bd5d0 --- /dev/null +++ b/linux-0.11-lab/newlibc/unistd/dup.c @@ -0,0 +1,4 @@ +#define __LIBRARY__ +#include + +_syscall1(int,dup,int,fd) diff --git a/linux-0.11-lab/newlibc/unistd/dup2.c b/linux-0.11-lab/newlibc/unistd/dup2.c new file mode 100644 index 0000000..7b626ad --- /dev/null +++ b/linux-0.11-lab/newlibc/unistd/dup2.c @@ -0,0 +1,4 @@ +#define __LIBRARY__ +#include + +_syscall2(int,dup2,int,fd1,int,fd2) diff --git a/linux-0.11-lab/newlibc/unistd/exec.c b/linux-0.11-lab/newlibc/unistd/exec.c new file mode 100644 index 0000000..6bc64a2 --- /dev/null +++ b/linux-0.11-lab/newlibc/unistd/exec.c @@ -0,0 +1,30 @@ +#define __LIBRARY__ +#include +#include +#include +#include +#include +#include +#include + +extern char ** environ; + +static inline _syscall3(int,execve,const char *,file,char **,argv,char **,envp) + +int execv(const char * pathname, char ** argv) +{ + return execve(pathname,argv,environ); +} + +int execl(const char * pathname, char * arg0, ...) +{ + return execve(pathname,&arg0,environ); +} + +int execle(const char * pathname, char * arg0, ...) +{ + char ** env = &arg0; + + while (!*(env++)) ; + return execve(pathname,&arg0,env); +} diff --git a/linux-0.11-lab/newlibc/unistd/execp.c b/linux-0.11-lab/newlibc/unistd/execp.c new file mode 100644 index 0000000..4c060f8 --- /dev/null +++ b/linux-0.11-lab/newlibc/unistd/execp.c @@ -0,0 +1,60 @@ +#define __LIBRARY__ +#include +#include +#include +#include +#include +#include +#include + +extern char ** environ; + +static char tmp_path[PATH_MAX+1]; + +static inline _syscall3(int,execve,const char *,file,char **,argv,char **,envp) + +static int execvep(const char * file, char ** argv, char ** envp) +{ + char * path, * tmp; + int len; + struct stat st; + + if (*file=='/' || !*file || !(path=getenv("PATH"))) + return execve(file,argv,envp); + while (*path) { + tmp=tmp_path; + len=0; + while (len=PATH_MAX) + continue; + strncpy(tmp,file,PATH_MAX-len); + if (stat(tmp_path,&st)) + continue; + else + if (!(st.st_mode & S_IFREG)) + continue; + if (!access(tmp_path,1)) + return execve(tmp_path,argv,envp); + } + errno = ENOEXEC; + return -1; +} + +int execvp(const char * file, char ** argv) +{ + return execvep(file,argv,environ); +} + +int execlp(const char * file, char * arg0, ...) +{ + return execvep(file,&arg0,environ); +} diff --git a/linux-0.11-lab/newlibc/unistd/execve.c b/linux-0.11-lab/newlibc/unistd/execve.c new file mode 100644 index 0000000..03772e3 --- /dev/null +++ b/linux-0.11-lab/newlibc/unistd/execve.c @@ -0,0 +1,4 @@ +#define __LIBRARY__ +#include + +_syscall3(int,execve,const char *,file,char **,argv,char **,envp) diff --git a/linux-0.11-lab/newlibc/unistd/fcntl.c b/linux-0.11-lab/newlibc/unistd/fcntl.c new file mode 100644 index 0000000..bf505a5 --- /dev/null +++ b/linux-0.11-lab/newlibc/unistd/fcntl.c @@ -0,0 +1,27 @@ +#define __LIBRARY__ +#include +#include + +int fcntl(int fildes, int cmd, ...) +{ + register int res; + va_list arg; + + va_start(arg,cmd); +#ifdef PRE_GCC_2 + __asm__("movl %0,%%ebx" : : "g" (fildes) : "bx"); + __asm__("movl %0,%%ecx" : : "g" (cmd)); + __asm__("movl %0,%%edx" : : "g" (va_arg(arg,int))); + __asm__("int $0x80" :"=a" (res) :"0" (__NR_fcntl)); +#else + __asm__("int $0x80" + :"=a" (res) + :"0" (__NR_fcntl),"b" (fildes),"c" (cmd), + "d" (va_arg(arg,int))); +#endif + if (res>=0) + return res; + errno = -res; + va_end (arg); + return -1; +} diff --git a/linux-0.11-lab/newlibc/unistd/fork.c b/linux-0.11-lab/newlibc/unistd/fork.c new file mode 100644 index 0000000..651e1e5 --- /dev/null +++ b/linux-0.11-lab/newlibc/unistd/fork.c @@ -0,0 +1,4 @@ +#define __LIBRARY__ +#include + +_syscall0(int,fork) diff --git a/linux-0.11-lab/newlibc/unistd/fstat.c b/linux-0.11-lab/newlibc/unistd/fstat.c new file mode 100644 index 0000000..d191465 --- /dev/null +++ b/linux-0.11-lab/newlibc/unistd/fstat.c @@ -0,0 +1,4 @@ +#define __LIBRARY__ +#include + +_syscall2(int,fstat,int,fd,struct stat *,stat_buf) diff --git a/linux-0.11-lab/newlibc/unistd/getegid.c b/linux-0.11-lab/newlibc/unistd/getegid.c new file mode 100644 index 0000000..8afdfb1 --- /dev/null +++ b/linux-0.11-lab/newlibc/unistd/getegid.c @@ -0,0 +1,4 @@ +#define __LIBRARY__ +#include + +_syscall0(int,getegid) diff --git a/linux-0.11-lab/newlibc/unistd/geteuid.c b/linux-0.11-lab/newlibc/unistd/geteuid.c new file mode 100644 index 0000000..ba3812b --- /dev/null +++ b/linux-0.11-lab/newlibc/unistd/geteuid.c @@ -0,0 +1,4 @@ +#define __LIBRARY__ +#include + +_syscall0(int,geteuid) diff --git a/linux-0.11-lab/newlibc/unistd/getgid.c b/linux-0.11-lab/newlibc/unistd/getgid.c new file mode 100644 index 0000000..9873de2 --- /dev/null +++ b/linux-0.11-lab/newlibc/unistd/getgid.c @@ -0,0 +1,4 @@ +#define __LIBRARY__ +#include + +_syscall0(int,getgid) diff --git a/linux-0.11-lab/newlibc/unistd/getgroups.c b/linux-0.11-lab/newlibc/unistd/getgroups.c new file mode 100644 index 0000000..8491dea --- /dev/null +++ b/linux-0.11-lab/newlibc/unistd/getgroups.c @@ -0,0 +1,4 @@ +#define __LIBRARY__ +#include + +_syscall2(int,getgroups,int,getsetlen,gid_t *,gidset) diff --git a/linux-0.11-lab/newlibc/unistd/gethostnam.c b/linux-0.11-lab/newlibc/unistd/gethostnam.c new file mode 100644 index 0000000..8869a9d --- /dev/null +++ b/linux-0.11-lab/newlibc/unistd/gethostnam.c @@ -0,0 +1,16 @@ +#include +#include +#include + +int gethostname(char *name, int len) +{ + struct utsname uts; + + uname(&uts); + if (strlen(uts.nodename)+1 > len) { + errno = EINVAL; + return -1; + } + strcpy(name, uts.nodename); + return 0; +} diff --git a/linux-0.11-lab/newlibc/unistd/getpgrp.c b/linux-0.11-lab/newlibc/unistd/getpgrp.c new file mode 100644 index 0000000..4f4b440 --- /dev/null +++ b/linux-0.11-lab/newlibc/unistd/getpgrp.c @@ -0,0 +1,4 @@ +#define __LIBRARY__ +#include + +_syscall0(pid_t,getpgrp) diff --git a/linux-0.11-lab/newlibc/unistd/getpid.c b/linux-0.11-lab/newlibc/unistd/getpid.c new file mode 100644 index 0000000..73fccfd --- /dev/null +++ b/linux-0.11-lab/newlibc/unistd/getpid.c @@ -0,0 +1,4 @@ +#define __LIBRARY__ +#include + +_syscall0(int,getpid) diff --git a/linux-0.11-lab/newlibc/unistd/getppid.c b/linux-0.11-lab/newlibc/unistd/getppid.c new file mode 100644 index 0000000..e59099a --- /dev/null +++ b/linux-0.11-lab/newlibc/unistd/getppid.c @@ -0,0 +1,4 @@ +#define __LIBRARY__ +#include + +_syscall0(int,getppid) diff --git a/linux-0.11-lab/newlibc/unistd/getrlimit.c b/linux-0.11-lab/newlibc/unistd/getrlimit.c new file mode 100644 index 0000000..021727d --- /dev/null +++ b/linux-0.11-lab/newlibc/unistd/getrlimit.c @@ -0,0 +1,4 @@ +#define __LIBRARY__ +#include + +_syscall2(int,getrlimit,int,resource,struct rlimit *,rlp) diff --git a/linux-0.11-lab/newlibc/unistd/getrusage.c b/linux-0.11-lab/newlibc/unistd/getrusage.c new file mode 100644 index 0000000..16f2e81 --- /dev/null +++ b/linux-0.11-lab/newlibc/unistd/getrusage.c @@ -0,0 +1,5 @@ +#define __LIBRARY__ +#include + +_syscall2(int,getrusage,int,who,struct rusage *,rusage) + diff --git a/linux-0.11-lab/newlibc/unistd/gettime.c b/linux-0.11-lab/newlibc/unistd/gettime.c new file mode 100644 index 0000000..12c1971 --- /dev/null +++ b/linux-0.11-lab/newlibc/unistd/gettime.c @@ -0,0 +1,5 @@ +#define __LIBRARY__ +#include + +_syscall2(int,gettimeofday,struct timeval *,tv,struct timezone *,tz) + diff --git a/linux-0.11-lab/newlibc/unistd/getuid.c b/linux-0.11-lab/newlibc/unistd/getuid.c new file mode 100644 index 0000000..eb43aaa --- /dev/null +++ b/linux-0.11-lab/newlibc/unistd/getuid.c @@ -0,0 +1,4 @@ +#define __LIBRARY__ +#include + +_syscall0(int,getuid) diff --git a/linux-0.11-lab/newlibc/unistd/ioctl.c b/linux-0.11-lab/newlibc/unistd/ioctl.c new file mode 100644 index 0000000..d9ea4f0 --- /dev/null +++ b/linux-0.11-lab/newlibc/unistd/ioctl.c @@ -0,0 +1,27 @@ +#define __LIBRARY__ +#include +#include + +int ioctl(int fildes, int cmd, ...) +{ + register int res; + va_list arg; + + va_start(arg,cmd); +#ifdef PRE_GCC_2 + __asm__("movl %0,%%ebx" : : "g" (fildes) : "bx"); + __asm__("movl %0,%%ecx" : : "g" (cmd)); + __asm__("movl %0,%%edx" : : "g" (va_arg(arg,int))); + __asm__("int $0x80" :"=a" (res) :"0" (__NR_ioctl)); +#else + __asm__("int $0x80" + :"=a" (res) + :"0" (__NR_ioctl),"b" (fildes),"c" (cmd), + "d" (va_arg(arg,int))); +#endif + if (res>=0) + return res; + errno = -res; + va_end(arg); + return -1; +} diff --git a/linux-0.11-lab/newlibc/unistd/kill.c b/linux-0.11-lab/newlibc/unistd/kill.c new file mode 100644 index 0000000..4e0a48b --- /dev/null +++ b/linux-0.11-lab/newlibc/unistd/kill.c @@ -0,0 +1,4 @@ +#define __LIBRARY__ +#include + +_syscall2(int,kill,pid_t,pid,int,signal) diff --git a/linux-0.11-lab/newlibc/unistd/link.c b/linux-0.11-lab/newlibc/unistd/link.c new file mode 100644 index 0000000..7bb5e2a --- /dev/null +++ b/linux-0.11-lab/newlibc/unistd/link.c @@ -0,0 +1,4 @@ +#define __LIBRARY__ +#include + +_syscall2(int,link,const char *,filename1,const char *,filename2) diff --git a/linux-0.11-lab/newlibc/unistd/lseek.c b/linux-0.11-lab/newlibc/unistd/lseek.c new file mode 100644 index 0000000..9e6a718 --- /dev/null +++ b/linux-0.11-lab/newlibc/unistd/lseek.c @@ -0,0 +1,4 @@ +#define __LIBRARY__ +#include + +_syscall3(int,lseek,int,fildes,off_t,offset,int,origin) diff --git a/linux-0.11-lab/newlibc/unistd/lstat.c b/linux-0.11-lab/newlibc/unistd/lstat.c new file mode 100644 index 0000000..ec8768a --- /dev/null +++ b/linux-0.11-lab/newlibc/unistd/lstat.c @@ -0,0 +1,4 @@ +#define __LIBRARY__ +#include + +_syscall2(int,lstat,const char *,filename,struct stat *,stat_buf) diff --git a/linux-0.11-lab/newlibc/unistd/mkdir.c b/linux-0.11-lab/newlibc/unistd/mkdir.c new file mode 100644 index 0000000..3354793 --- /dev/null +++ b/linux-0.11-lab/newlibc/unistd/mkdir.c @@ -0,0 +1,4 @@ +#define __LIBRARY__ +#include + +_syscall2(int,mkdir,const char *,pathname,mode_t,mode) diff --git a/linux-0.11-lab/newlibc/unistd/mknod.c b/linux-0.11-lab/newlibc/unistd/mknod.c new file mode 100644 index 0000000..9ebb388 --- /dev/null +++ b/linux-0.11-lab/newlibc/unistd/mknod.c @@ -0,0 +1,4 @@ +#define __LIBRARY__ +#include + +_syscall3(int,mknod,const char *,nodename,mode_t,mode,dev_t,dev) diff --git a/linux-0.11-lab/newlibc/unistd/mount.c b/linux-0.11-lab/newlibc/unistd/mount.c new file mode 100644 index 0000000..da3f371 --- /dev/null +++ b/linux-0.11-lab/newlibc/unistd/mount.c @@ -0,0 +1,4 @@ +#define __LIBRARY__ +#include + +_syscall3(int,mount,const char *,specialfile,const char *,dir,int,rwflag) diff --git a/linux-0.11-lab/newlibc/unistd/nice.c b/linux-0.11-lab/newlibc/unistd/nice.c new file mode 100644 index 0000000..3544e7b --- /dev/null +++ b/linux-0.11-lab/newlibc/unistd/nice.c @@ -0,0 +1,4 @@ +#define __LIBRARY__ +#include + +_syscall1(int,nice,int,val) diff --git a/linux-0.11-lab/newlibc/unistd/open.c b/linux-0.11-lab/newlibc/unistd/open.c new file mode 100644 index 0000000..23528c1 --- /dev/null +++ b/linux-0.11-lab/newlibc/unistd/open.c @@ -0,0 +1,27 @@ +#define __LIBRARY__ +#include +#include + +int open(const char * filename, int flag, ...) +{ + register int res; + va_list arg; + + va_start(arg,flag); +#ifdef PRE_GCC_2 + __asm__("movl %0,%%ebx" : : "g" (filename) : "bx"); + __asm__("movl %0,%%ecx" : : "g" (flag)); + __asm__("movl %0,%%edx" : : "g" (va_arg(arg,int))); + __asm__("int $0x80" :"=a" (res) :"0" (__NR_open)); +#else + __asm__("int $0x80" + :"=a" (res) + :"0" (__NR_open),"b" (filename),"c" (flag), + "d" (va_arg(arg,int))); +#endif + if (res>=0) + return res; + errno = -res; + va_end(arg); + return -1; +} diff --git a/linux-0.11-lab/newlibc/unistd/pause.c b/linux-0.11-lab/newlibc/unistd/pause.c new file mode 100644 index 0000000..30238c3 --- /dev/null +++ b/linux-0.11-lab/newlibc/unistd/pause.c @@ -0,0 +1,4 @@ +#define __LIBRARY__ +#include + +_syscall0(int,pause) diff --git a/linux-0.11-lab/newlibc/unistd/pipe.c b/linux-0.11-lab/newlibc/unistd/pipe.c new file mode 100644 index 0000000..1b01eb0 --- /dev/null +++ b/linux-0.11-lab/newlibc/unistd/pipe.c @@ -0,0 +1,4 @@ +#define __LIBRARY__ +#include + +_syscall1(int,pipe,int *,fildes) diff --git a/linux-0.11-lab/newlibc/unistd/read.c b/linux-0.11-lab/newlibc/unistd/read.c new file mode 100644 index 0000000..47e8335 --- /dev/null +++ b/linux-0.11-lab/newlibc/unistd/read.c @@ -0,0 +1,4 @@ +#define __LIBRARY__ +#include + +_syscall3(int,read,int,fd,char *,buf,off_t,count) diff --git a/linux-0.11-lab/newlibc/unistd/readlink.c b/linux-0.11-lab/newlibc/unistd/readlink.c new file mode 100644 index 0000000..e6f1236 --- /dev/null +++ b/linux-0.11-lab/newlibc/unistd/readlink.c @@ -0,0 +1,4 @@ +#define __LIBRARY__ +#include + +_syscall3(int,readlink,const char *,path,char *,buffer,int,bufsiz) diff --git a/linux-0.11-lab/newlibc/unistd/rmdir.c b/linux-0.11-lab/newlibc/unistd/rmdir.c new file mode 100644 index 0000000..888ce66 --- /dev/null +++ b/linux-0.11-lab/newlibc/unistd/rmdir.c @@ -0,0 +1,4 @@ +#define __LIBRARY__ +#include + +_syscall1(int,rmdir,const char *,pathname) diff --git a/linux-0.11-lab/newlibc/unistd/select.c b/linux-0.11-lab/newlibc/unistd/select.c new file mode 100644 index 0000000..3a0ac19 --- /dev/null +++ b/linux-0.11-lab/newlibc/unistd/select.c @@ -0,0 +1,24 @@ +#define __LIBRARY__ +#include +#include + +int select(int nd, fd_set * in, fd_set * out, fd_set * ex, + struct timeval * tv) +{ + long __res; + +#ifdef PRE_GCC_2 + __asm__ volatile ("movl %0,%%ebx" : : "g" ((long) &nd) + : "bx"); + __asm__ volatile ("int $0x80" : "=a" (__res) + : "0" (__NR_select)); +#else + __asm__ volatile ("int $0x80" + : "=a" (__res) + : "0" (__NR_select),"b" ((long) &nd)); +#endif + if (__res >= 0) + return (int) __res; + errno = -__res; + return -1; +} diff --git a/linux-0.11-lab/newlibc/unistd/setgid.c b/linux-0.11-lab/newlibc/unistd/setgid.c new file mode 100644 index 0000000..2d2f245 --- /dev/null +++ b/linux-0.11-lab/newlibc/unistd/setgid.c @@ -0,0 +1,4 @@ +#define __LIBRARY__ +#include + +_syscall1(int,setgid,gid_t,gid) diff --git a/linux-0.11-lab/newlibc/unistd/setgroups.c b/linux-0.11-lab/newlibc/unistd/setgroups.c new file mode 100644 index 0000000..7a96b47 --- /dev/null +++ b/linux-0.11-lab/newlibc/unistd/setgroups.c @@ -0,0 +1,4 @@ +#define __LIBRARY__ +#include + +_syscall2(int,setgroups,int,getsetlen,gid_t *,gidset) diff --git a/linux-0.11-lab/newlibc/unistd/sethostnam.c b/linux-0.11-lab/newlibc/unistd/sethostnam.c new file mode 100644 index 0000000..4756773 --- /dev/null +++ b/linux-0.11-lab/newlibc/unistd/sethostnam.c @@ -0,0 +1,5 @@ +#define __LIBRARY__ +#include + +_syscall2(int,sethostname,char *, name,int,len) + diff --git a/linux-0.11-lab/newlibc/unistd/setpgrp.c b/linux-0.11-lab/newlibc/unistd/setpgrp.c new file mode 100644 index 0000000..802c836 --- /dev/null +++ b/linux-0.11-lab/newlibc/unistd/setpgrp.c @@ -0,0 +1,9 @@ +#define __LIBRARY__ +#include + +_syscall2(int,setpgid,pid_t,pid,pid_t,pgid) + +int setpgrp(void) +{ + return setpgid(0,0); +} diff --git a/linux-0.11-lab/newlibc/unistd/setregid.c b/linux-0.11-lab/newlibc/unistd/setregid.c new file mode 100644 index 0000000..bcc428c --- /dev/null +++ b/linux-0.11-lab/newlibc/unistd/setregid.c @@ -0,0 +1,4 @@ +#define __LIBRARY__ +#include + +_syscall2(int,setregid,gid_t,gid1,gid_t,gid2) diff --git a/linux-0.11-lab/newlibc/unistd/setreuid.c b/linux-0.11-lab/newlibc/unistd/setreuid.c new file mode 100644 index 0000000..fd5a16c --- /dev/null +++ b/linux-0.11-lab/newlibc/unistd/setreuid.c @@ -0,0 +1,4 @@ +#define __LIBRARY__ +#include + +_syscall2(int,setreuid,uid_t,uid1,uid_t,uid2) diff --git a/linux-0.11-lab/newlibc/unistd/setrlimit.c b/linux-0.11-lab/newlibc/unistd/setrlimit.c new file mode 100644 index 0000000..64ee9fe --- /dev/null +++ b/linux-0.11-lab/newlibc/unistd/setrlimit.c @@ -0,0 +1,4 @@ +#define __LIBRARY__ +#include + +_syscall2(int,setrlimit,int,resource,struct rlimit *,rlp) diff --git a/linux-0.11-lab/newlibc/unistd/setsid.c b/linux-0.11-lab/newlibc/unistd/setsid.c new file mode 100644 index 0000000..730abf0 --- /dev/null +++ b/linux-0.11-lab/newlibc/unistd/setsid.c @@ -0,0 +1,4 @@ +#define __LIBRARY__ +#include + +_syscall0(pid_t,setsid) diff --git a/linux-0.11-lab/newlibc/unistd/settime.c b/linux-0.11-lab/newlibc/unistd/settime.c new file mode 100644 index 0000000..b080369 --- /dev/null +++ b/linux-0.11-lab/newlibc/unistd/settime.c @@ -0,0 +1,4 @@ +#define __LIBRARY__ +#include + +_syscall2(int,settimeofday,struct timeval *,tv,struct timezone *,tz) diff --git a/linux-0.11-lab/newlibc/unistd/setuid.c b/linux-0.11-lab/newlibc/unistd/setuid.c new file mode 100644 index 0000000..cb3d7ce --- /dev/null +++ b/linux-0.11-lab/newlibc/unistd/setuid.c @@ -0,0 +1,4 @@ +#define __LIBRARY__ +#include + +_syscall1(int,setuid,uid_t,uid) diff --git a/linux-0.11-lab/newlibc/unistd/signal.c b/linux-0.11-lab/newlibc/unistd/signal.c new file mode 100644 index 0000000..a52f0a1 --- /dev/null +++ b/linux-0.11-lab/newlibc/unistd/signal.c @@ -0,0 +1,64 @@ +#define __LIBRARY__ +#include +#include + +extern void ___sig_restore(); +extern void ___masksig_restore(); + +int ___ssetmask(int mask) +{ + long res; +#ifdef PRE_GCC_2 + __asm__("movl %0,%%ebx" : : "g" (mask) : "bx"); + __asm__("int $0x80" :"=a" (res) :"0" (__NR_ssetmask)); +#else + __asm__("int $0x80":"=a" (res) + :"0" (__NR_ssetmask),"b" (mask)); +#endif + return res; +} + +int ___sgetmask(void) +{ + long res; + __asm__("int $0x80":"=a" (res) + :"0" (__NR_sgetmask)); + return res; +} + +void (*signal(int sig, void (*func)(int)))(int) +{ + void (*res)(); + +#ifdef PRE_GCC_2 + __asm__("movl %0,%%ebx" : : "g" (sig) : "bx"); + __asm__("movl %0,%%ecx" : : "g" (func)); + __asm__("movl %0,%%edx" : : "g" ((long)___sig_restore)); + __asm__("int $0x80" :"=a" (res) :"0" (__NR_signal)); +#else + __asm__("int $0x80":"=a" (res): + "0" (__NR_signal),"b" (sig),"c" (func),"d" ((long)___sig_restore)); +#endif + return res; +} + +int sigaction(int sig,struct sigaction * sa, struct sigaction * old) +{ + if (sa->sa_flags & SA_NOMASK) + sa->sa_restorer=___sig_restore; + else + sa->sa_restorer=___masksig_restore; +#ifdef PRE_GCC_2 + __asm__("movl %0,%%ebx" : : "g" (sig) : "bx"); + __asm__("movl %0,%%ecx" : : "g" (sa)); + __asm__("movl %0,%%edx" : : "g" (old)); + __asm__("int $0x80" :"=a" (sig) :"0" (__NR_sigaction)); +#else + __asm__("int $0x80":"=a" (sig) + :"0" (__NR_sigaction),"b" (sig),"c" (sa),"d" (old)); +#endif + if (sig>=0) + return sig; + errno = -sig; + return -1; +} diff --git a/linux-0.11-lab/newlibc/unistd/sigpend.c b/linux-0.11-lab/newlibc/unistd/sigpend.c new file mode 100644 index 0000000..934ff49 --- /dev/null +++ b/linux-0.11-lab/newlibc/unistd/sigpend.c @@ -0,0 +1,5 @@ +#define __LIBRARY__ +#include +#include + +_syscall1(int,sigpending,sigset_t *,sigmask) diff --git a/linux-0.11-lab/newlibc/unistd/sigsusp.c b/linux-0.11-lab/newlibc/unistd/sigsusp.c new file mode 100644 index 0000000..251d991 --- /dev/null +++ b/linux-0.11-lab/newlibc/unistd/sigsusp.c @@ -0,0 +1,24 @@ +#define __LIBRARY__ +#include +#include + +int sigsuspend(sigset_t *set) +{ + int res; + +#ifdef PRE_GCC_2 + __asm__("xorl %%ebx,%%ebx" : : : "bx"); + __asm__("xorl %%ecx,%%ecx" : : : "cx"); + __asm__("movl %0,%%edx" : : "g" (*set)); + __asm__("int $0x80" :"=a" (res) :"0" (__NR_sigsuspend)); +#else + __asm__("int $0x80" + :"=a" (res) + :"0" (__NR_sigsuspend), "b" (0), "c" (0), "d" (*set) + :"bx","cx"); +#endif + if (res >= 0) + return res; + errno = -res; + return -1; +} diff --git a/linux-0.11-lab/newlibc/unistd/stat.c b/linux-0.11-lab/newlibc/unistd/stat.c new file mode 100644 index 0000000..5daaf6e --- /dev/null +++ b/linux-0.11-lab/newlibc/unistd/stat.c @@ -0,0 +1,4 @@ +#define __LIBRARY__ +#include + +_syscall2(int,stat,const char *,filename,struct stat *,stat_buf) diff --git a/linux-0.11-lab/newlibc/unistd/stime.c b/linux-0.11-lab/newlibc/unistd/stime.c new file mode 100644 index 0000000..87e3382 --- /dev/null +++ b/linux-0.11-lab/newlibc/unistd/stime.c @@ -0,0 +1,4 @@ +#define __LIBRARY__ +#include + +_syscall1(int,stime,time_t *,tptr) diff --git a/linux-0.11-lab/newlibc/unistd/symlink.c b/linux-0.11-lab/newlibc/unistd/symlink.c new file mode 100644 index 0000000..c22cfb3 --- /dev/null +++ b/linux-0.11-lab/newlibc/unistd/symlink.c @@ -0,0 +1,4 @@ +#define __LIBRARY__ +#include + +_syscall2(int,symlink,const char *,filename1,const char *,filename2) diff --git a/linux-0.11-lab/newlibc/unistd/sync.c b/linux-0.11-lab/newlibc/unistd/sync.c new file mode 100644 index 0000000..9c5ba50 --- /dev/null +++ b/linux-0.11-lab/newlibc/unistd/sync.c @@ -0,0 +1,4 @@ +#define __LIBRARY__ +#include + +_syscall0(int,sync) diff --git a/linux-0.11-lab/newlibc/unistd/time.c b/linux-0.11-lab/newlibc/unistd/time.c new file mode 100644 index 0000000..8de53b7 --- /dev/null +++ b/linux-0.11-lab/newlibc/unistd/time.c @@ -0,0 +1,4 @@ +#define __LIBRARY__ +#include + +_syscall1(time_t,time,time_t *,tptr) diff --git a/linux-0.11-lab/newlibc/unistd/times.c b/linux-0.11-lab/newlibc/unistd/times.c new file mode 100644 index 0000000..4abeed4 --- /dev/null +++ b/linux-0.11-lab/newlibc/unistd/times.c @@ -0,0 +1,4 @@ +#define __LIBRARY__ +#include + +_syscall1(time_t,times,struct tms *,tms_buf) diff --git a/linux-0.11-lab/newlibc/unistd/ulimit.c b/linux-0.11-lab/newlibc/unistd/ulimit.c new file mode 100644 index 0000000..7fd128b --- /dev/null +++ b/linux-0.11-lab/newlibc/unistd/ulimit.c @@ -0,0 +1,4 @@ +#define __LIBRARY__ +#include + +_syscall2(int,ulimit,int,cmd,long,limit) diff --git a/linux-0.11-lab/newlibc/unistd/umask.c b/linux-0.11-lab/newlibc/unistd/umask.c new file mode 100644 index 0000000..328ba48 --- /dev/null +++ b/linux-0.11-lab/newlibc/unistd/umask.c @@ -0,0 +1,4 @@ +#define __LIBRARY__ +#include + +_syscall1(mode_t,umask,mode_t,mask) diff --git a/linux-0.11-lab/newlibc/unistd/umount.c b/linux-0.11-lab/newlibc/unistd/umount.c new file mode 100644 index 0000000..5b35f10 --- /dev/null +++ b/linux-0.11-lab/newlibc/unistd/umount.c @@ -0,0 +1,4 @@ +#define __LIBRARY__ +#include + +_syscall1(int,umount,const char *,specialfile) diff --git a/linux-0.11-lab/newlibc/unistd/uname.c b/linux-0.11-lab/newlibc/unistd/uname.c new file mode 100644 index 0000000..3dcc6e7 --- /dev/null +++ b/linux-0.11-lab/newlibc/unistd/uname.c @@ -0,0 +1,4 @@ +#define __LIBRARY__ +#include + +_syscall1(int,uname,struct utsname *,uname_buf) diff --git a/linux-0.11-lab/newlibc/unistd/unlink.c b/linux-0.11-lab/newlibc/unistd/unlink.c new file mode 100644 index 0000000..1c8a163 --- /dev/null +++ b/linux-0.11-lab/newlibc/unistd/unlink.c @@ -0,0 +1,4 @@ +#define __LIBRARY__ +#include + +_syscall1(int,unlink,const char *,filename) diff --git a/linux-0.11-lab/newlibc/unistd/uselib.c b/linux-0.11-lab/newlibc/unistd/uselib.c new file mode 100644 index 0000000..b40d14e --- /dev/null +++ b/linux-0.11-lab/newlibc/unistd/uselib.c @@ -0,0 +1,4 @@ +#define __LIBRARY__ +#include + +_syscall1(int,uselib,const char *,filename) diff --git a/linux-0.11-lab/newlibc/unistd/ustat.c b/linux-0.11-lab/newlibc/unistd/ustat.c new file mode 100644 index 0000000..b6e2b45 --- /dev/null +++ b/linux-0.11-lab/newlibc/unistd/ustat.c @@ -0,0 +1,4 @@ +#define __LIBRARY__ +#include + +_syscall2(int,ustat,dev_t,dev,struct ustat *,ubuf) diff --git a/linux-0.11-lab/newlibc/unistd/utime.c b/linux-0.11-lab/newlibc/unistd/utime.c new file mode 100644 index 0000000..e4aa542 --- /dev/null +++ b/linux-0.11-lab/newlibc/unistd/utime.c @@ -0,0 +1,4 @@ +#define __LIBRARY__ +#include + +_syscall2(int,utime,const char *,filename,struct utimbuf *,times) diff --git a/linux-0.11-lab/newlibc/unistd/wait.c b/linux-0.11-lab/newlibc/unistd/wait.c new file mode 100644 index 0000000..a14555c --- /dev/null +++ b/linux-0.11-lab/newlibc/unistd/wait.c @@ -0,0 +1,10 @@ +#define __LIBRARY__ +#include +#include + +_syscall3(pid_t,waitpid,pid_t,pid,int *,wait_stat,int,options) + +pid_t wait(int * wait_stat) +{ + return waitpid(-1,wait_stat,0); +} diff --git a/linux-0.11-lab/newlibc/unistd/write.c b/linux-0.11-lab/newlibc/unistd/write.c new file mode 100644 index 0000000..2613f17 --- /dev/null +++ b/linux-0.11-lab/newlibc/unistd/write.c @@ -0,0 +1,4 @@ +#define __LIBRARY__ +#include + +_syscall3(int,write,int,fd,const char *,buf,off_t,count) diff --git a/newlibc.tgz b/newlibc.tgz new file mode 100755 index 0000000000000000000000000000000000000000..f6dfcf90f571f3789134be4a082313c40cbc7e53 GIT binary patch literal 188224 zcmV({K+?Y-iwFRlHr!wU1MEC|f7-^f`B(ZBQ|va#0U-o736671Ft+K%#uspt{!aUI zgtQnXLgMP-$7%E3@67H>2yo&wb)9?8vGS0#yYtxD-I>{$6+XN2+_7DG@;6=vUJb(# z_nmEiH_W=Yi|a|XZtOISnrSquPmC%yYdnGNzmuu-N}|{b0q$()xRw_r@!!wT!(P4| z|Ct;8ZIghH`}X!{$KTklZX1n8tyVX2{HqPTJ&ykaTub9WwuAYN9^E$$8sMFJ{Zr## z->%na{OhJ^?ljB>j(^SEu08?dz8Sgg`VSxf%9aXS(8h5O-HT}q)fX>}(u*pLZ(uYH zW>y4)fO%dC_Fex2^CEl7!ZGtpaLB@$<=^NCP8d${)r}%I@F5N$iC76}GL>K!IPL`R zjvK|HJ5FM(v3v(2#0v4$jUWmp@s$-aUhKvZp>qN|nK3`MV!}8HLae-jc@oZphyem2 z8w`282rWNm4qUnM6h{Xp4AIZS;L>%lG@e>9VT-4Td>mXd&XeeC89)z*$U##`3v>-$r`qqp=Fj^vq?BQ>L0g;Fz9!BJ=pIK+r3uzcnB?g zd(#>WS|_7!X9#b)qazq}4qJnL81)gTJA`5XV1!LNB|_6ZY4^_dyC;VnvU_~m>vs0@ z82Sfr+!?fw@U`{2+v|>gf!4`B9CSw~o#C*A2;ihom^wdqPDU_1B0NjXz3xD-+j`yW zz(Ie2z`wxowA1dkdIY@R9dz0w=nweP?4Jxf|8s_Tuom`P$E`!+Kmet$Z;o1{VIQdt zuw%os-iVk#81#>!*B^3z&xWFJ`>j!npic*VWEXjTbJQ6fAsq7D!oTfNw|_za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